Get Latest does not do that

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

Moderator: SourceGear

Post Reply
mculbreth
Posts: 20
Joined: Thu Jan 15, 2004 5:54 am
Contact:

Get Latest does not do that

Post by mculbreth » Tue Jan 20, 2004 5:36 pm

Helllo,

In version 1.2.3 the Get Latest Changes does not perform as expected sometimes. I have a C# project file (.csproj) in the Vault. It is set to version 62. On my local machine I have version 54. I can do a Get Latest Changes on the .csproj file from the Vault client but it won't get the latest--it stays at 54.

Now this is with "Attempt Automatic Merge" turned on. If I change this to "Overwrite" it works fine.

Does "Attempt Automatic Merge" actually do anything if there's a difference in file versions?

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

Post by dan » Wed Jan 21, 2004 8:39 am

Get will not overwrite a file if "Attempt Automatic Merge" is on IF you have made changes locally to the file, and the new contents of the file cannot be merged without conflicts.

You should check the status of the file (see Vault Properties from the source control menu). It might say Renegade too, which means you have modified the file, but not checked it out.

If this is the case, you can bring up the standalone GUI client, and invoke Show Merge on the file, and see what the conficts are.

mculbreth
Posts: 20
Joined: Thu Jan 15, 2004 5:54 am
Contact:

Post by mculbreth » Wed Jan 21, 2004 10:49 am

But I haven't made any local changes to the file. It's a project file, not something you would change without checking out the project.

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

Post by dan » Wed Jan 21, 2004 11:25 am

Hmm. Bring up the standalone GUI client, and find the project file in the repository, and see what its status is. It may be that the IDE changed the file without you knowing about it?

Also, I'm guessing you are using Visual Studio 2003?

-Dan

mculbreth
Posts: 20
Joined: Thu Jan 15, 2004 5:54 am
Contact:

Post by mculbreth » Wed Jan 21, 2004 11:28 am

Yes, VS.NET 2003. Most of my work is through there.

I just discovered another behavior:

I had checked out 4 files last night and done some work. This morning I did a Get Latest (from VS.NET) on the solution, and all of my changes were wiped. The vault put the edited files in the _sgbak directory so my work isn't lost, but it's still the wrong behavior. The files were marked as Edited in the Vault client.

There had been some talk in the past of time zones causing errors. Our Vault server is in Atlanta and I travel a bit--I'm in LA now.

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

Post by dan » Wed Jan 21, 2004 11:38 am

OK, that's a good clue. I'll try this out with different timezones. Do you manually change your timezone when travelling, or does it get automagically set when you login to a network?

Did the 4 files get overwritten because you had set the Get latest to default to Overwrite (due to the frustration with Attempt Auto Merge)?

Also, what is the Vault status that is reported for the project file?

mculbreth
Posts: 20
Joined: Thu Jan 15, 2004 5:54 am
Contact:

Post by mculbreth » Wed Jan 21, 2004 1:47 pm

I change the timezone manually. My Local Files flag is set to "Attempt Automatic Merge".

The project file's status was set to "Old" I believe. Next time I see it I'll send you some screen shots of it if that helps.

Guest

Post by Guest » Wed Jan 21, 2004 3:48 pm

OK, I reproduced this.

I changed timezones on a test machine, and the files all changed to Renegade. Doing a Get Latest then keeps them Renegade, as it should, because if a local file has been edited, an automerge isn't supposed to overwrite the file, but to merge any changes from the server into your local file and keep the local changes you might have. Unfortunately, there is a second bug that in this strange case, the server changes are not actually integrated into the file.

Obviously, this is a dumb bug to have, but the work-around is easy - if you change timezones, you'll need to re-Get all your files with the Overwrite option set, once for each time you change timezones.

We will be fixing this in a future release, but unfortunately, it won't make 2.0 :(

-Dan

pfoley
Posts: 9
Joined: Tue Feb 03, 2004 7:59 pm

Command line for overwrite?

Post by pfoley » Tue Feb 03, 2004 8:02 pm

Is there a command-line option to specify overwrite on get for 1.2.3?

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

Post by dan » Wed Feb 04, 2004 9:52 am

I believe you can use "-overwrite" and it will work, but this was not documented in v1.2

Post Reply