One removable drive and two machines causes "Edited&quo

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
icnocop

One removable drive and two machines causes "Edited&quo

Post by icnocop » Tue Aug 17, 2004 12:22 am

Hello.

I have a removable drive that I use with my laptop and desktop.

My working folders point to my removable drive.

When I am out of the office, I use my laptop to do all my work.
I am currently using SG Vault Client 2.0.4 on both my laptop and desktop.

Sometimes I do not check in my files until I am at the office.

But when I'm back in the office, and I attach my removable drive to my desktop, I get a file status of "Edited" on ALL my files in those folders that I have set working folders pointing to my removable drive.

This has happened to me a number of times and I have spent hours just trying to get it back to normal. Is there a simple way to fix this that I don't know about? I end up having to re-check in all my files, even if those files haven't changed.

Even though some files have not been changed, they still show up as "Edited" (and show up in the "Pending Change Set" with a "Modified" type)

I thought by changing my SG Vault Client options to save working folder data in the actual working folder, this kind of thing wouldn't happen. But I soon found that is not the case.

Does this have something to do with the client's cache files in %appdata% folder, for instance?

What is the proper way to set up this kind of environment?

Can this be something that can be resolved in a near future version?

(i.e. have an option to enable/disable a "quick" binary(?) comparison of files to really check if they've changed or not)

Thank you.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Tue Aug 17, 2004 9:26 am

Vault currently determines whether a file is edited by checking whether the datetime is the same as when it was last retrieved, so that is probably the problem - something is setting the datetime of those files. In a future release of Vault, we plan to add the capability to check the actual contents of the file to determine edited status (although this will be very slow on large working folders).

However, there is an option in Tools->Options->Check In that allows you to undo the checkin of a file that has not been changed. The test for this is based on the content of the file, and not the datetime. If that is set, you can check in all the files that have an "edited" status, and only the files that have actually been modified will be have their versions incremented on the server.

icnocop

Post by icnocop » Tue Aug 17, 2004 9:36 am

Great! I guess that works. Thank you! :)

icnocop

Post by icnocop » Tue Aug 17, 2004 10:54 am

This makes me wonder...

Where is the datetime of the last retrieval get saved (for each file)? It seems that this would be in the %appdata% folder.

I am pretty sure the only datetimes of the files that get changed are the modified datetimes. But the other files datetimes should be the same.

Thanks again.

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Wed Aug 18, 2004 8:53 am

The "last known good modified" datetime is saved in the _sgvault/state file. The location of the _sgvault folder can be changed: it can be down in %APPDATA%, or it can be inside the working folder, depending on your client option. It's true that Vault only watches the "modified" time on the file, not the access or creation times.

If you're using a removable drive with Vault, I would recommend turning on the "store working folder data inside working folders" option in the Windows Forms client's Options dialog. This will create _sgvault folders inside your working folders (on your removable drive), which will let them work with multiple client machines.

A little more on modification times and Vault:

Different filesystems have different precision in their modified times. NTFS is precise to some very small fraction of a second. FAT is precise to 1 second on Win32. Samba shares from Unix are also precise to 1 second. The .NET DateTime class is at least as precise as NTFS, so every time we write a file to disk, we immediately read its modified date back to be stored in the _sgvault/state file. This way we round our stored times to filesystem precision.

It may be possible that two different computers (different operating systems, maybe) read the same removable disk and report different precision to Vault. This would cause a file to appear as edited on one system and not edited on another.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

icnocop

Post by icnocop » Wed Aug 18, 2004 12:37 pm

Thank you for your reply.

Both machines are Windows XP Pro (NTFS formatted).

I already have set to "store working folder data inside working folders".

Sorry I forgot to mention these things as well as the fact that I am using CVS style.

Do you think I can delete some CacheMember_ files that exist in my %appdata% folder so that there won't be any out-dated cached client files that point to out-dated file statuses?

Because of this, SG Vault still wants to consume 90% CPU and >100MB RAM (even with the GUI client minimized), with a status of "Working". But this may be because I am trying to commit a whole bunch of files at once.

I plan to upgrade to 2.0.5 real soon, bur do you think client log files would help to assess the problem(s)?

Thank you.

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Wed Aug 18, 2004 12:42 pm

The only place information about disk files is stored is in the _sgvault/state files. The CacheMember files store information about the server's data (current tree structure, latest version of files on the server), and items to be added/deleted/branched/labeled to the repository, but they don't store information about checkins/commits.

If the delay is happening when you try to commit the files from a removable drive, it may be the CRC calculation. The client calculates a CRC for each file it's about to send to the server, so the server can verify the file was transmitted without a problem. Each byte of every committed file must be read to compute this CRC, which could take a while on a slower device.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

icnocop
Posts: 46
Joined: Wed Aug 18, 2004 12:41 pm

Post by icnocop » Wed Aug 18, 2004 5:20 pm

Ok. thank you very much for the clarification.

The device is using a USB 2.0 interface.

I will need to try use a FireWire interface and hopefully that will speed things up.

Thanks again.

icnocop
Posts: 46
Joined: Wed Aug 18, 2004 12:41 pm

Post by icnocop » Thu Aug 19, 2004 1:09 pm

Unfortunately, using a FireWire device did not solve the problem.

The weird thing is that I can not find any CacheMember files on my local system.

I could only find "state" files in my _sgvault folder, which is in my working folder, but it seems to be a binary file.

What could be wrong?

I upgraded to v2.0.5 and disabled folder security, but performance is still slow. For example, it would take more than 1 hour to commit 20 files.

I enabled client side logging. This created a 45MB log file that indicated a whole bunch of mutex object being locked and released, but nothing else that I could tell was out of the ordinary.

When I renamed my root working folder, so that all my files appear "Missing", the client was more responsive. But obviously because it did not really have any files to worry about, since all of them appear to be "Missing".

So where could the working folder mappings be stored on my machine?

Thank you.

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Thu Aug 19, 2004 1:13 pm

To find your CacheMember files you need to turn on searching hidden files. If you set your root folder to a permanent drive, can you check things in faster? Does the long period of CPU usage go down when you try to check them in this way? Are the files very large?
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

icnocop
Posts: 46
Joined: Wed Aug 18, 2004 12:41 pm

Post by icnocop » Thu Aug 19, 2004 2:20 pm

The option to search hidden files and folders was turned on.

The CacheMember files exist on my laptop, but not on my desktop.

Maybe they were accidently deleted?

I read that these files should get re-created, but I do not see that.

The source code files were not that big, < 100KB.

Once I removed all my working folder paths in the SG Vault Client, I still see items in my "Pending Change Set" tab.

But after I do a "Get Latest Version" of those files, they no longer appear in that tab.

I even uninstalled the SG Vault Client and reinstalled, but that did not re-generate the CacheMember files. Also, the "Pending Change Set" items are still there.

Any advice?

Thank you.

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Fri Aug 20, 2004 8:36 am

What kind of items are in the pending change set? See this KB article to locate your cache files. They will be created if they don't exist when Vault runs, and Vault never deletes them.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

icnocop
Posts: 46
Joined: Wed Aug 18, 2004 12:41 pm

Post by icnocop » Mon Aug 23, 2004 5:26 pm

There are a few items in my Pending Change Set, having Details of "Size Unchanged" and a "Modified" Type.

However, when I look in the project's file pane (on the top right) the files have a Status of "Missing".

I have looked for those cache files everywhere, but they do not exist.

The SourceGear folder in my Application Data folder does not exist. I must have deleted this by accident a while ago.

But it is weird that there are still some items in my "Pending Change Set" and it is also weird that those cache files are not getting re-created.

I am having to resort to using my laptop for now.

Thank you.

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Tue Aug 24, 2004 8:45 am

Weird. If you type %APPDATA% into a Windows Explorer location bar, where does it take you? The application data path can be mapped to a network server (if you have roaming profiles enabled for your domain, for example).
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

icnocop
Posts: 46
Joined: Wed Aug 18, 2004 12:41 pm

Post by icnocop » Thu Aug 26, 2004 4:49 pm

Ok, i didn't know that i could type "%appdata%" in the windows explorer.

When I did that, it took me to "C:\WINDOWS\Application Data".

And all this time I thought my appdata was in C:\Documents and Settings\Me\Application Data"

I do see my cache files after all!

Sorry for "wasting" your time.

Thank you very much for the great product and support! :)

Post Reply