Rename Bug

If you are having a problem using Vault, post a message here.
Post Reply
IanG
Posts: 64
Joined: Thu Oct 25, 2007 8:11 am
Location: UK
Contact:

Rename Bug

Post by IanG » Thu Mar 19, 2015 5:33 am

Hi one of my users is reporting a problem with the way vault handles file renames, others including myself have had issues similar issues in the past but have been unable to narrow the process for repeating it down.
OK. This is what I think happens – I’m not sure all these steps are necessary to reproduce but it is what I did:

You have a file checked in to the repository. Let’s call it FileA. In Visual Studio (not sure this is important or not):
1. Rename File A to FileB.
2. Make changes to FileB.
3. Add a new file called FileA.
4. Try and check-in and you get an error about duplicate ID’s.
5. To get round this error, check-in the rename on its own first.
6. Now check-in any remaining pending changes.

The changes you have made in step 2 above are NOT in the repository, but they remain in your working copy.

If you do a get latest version, FileB is renegade (even though nothing has been changing this file since step 2 except Vault). To avoid having the changes overwritten in your working copy and to update the repository you need to checkout FileB without overwriting, then check-in.

For me there are 2 bugs here:
1. The first check-in at step 4 should work. It is a perfectly reasonable thing to do during development. This is however relatively minor as it doesn’t cause loss of any code changes.
2. The check-in of a rename in step 5 should include any changes made to the renamed file OR there should be a separate pending “edit” change on FileB so there is no way to lose your changes to this file in step 2 above. This is a serious bug as it happens silently and it effects the integrity of the code in the repository.
As you can see this leads to a situation where code changes are lost and has caused us a number or problems,
We are running VaultPro V8.0.0 (30192) and visual studio pro 2013 v12.0.31101.00 Update 4.

A fix for this would be greatly appreciated.
Rgrds Ian

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Rename Bug

Post by Beth » Fri Mar 20, 2015 3:24 pm

Are you performing the rename in Visual Studio or in the Vault GUI client?

If anything is overwritten, you can retrieve it using the Vault GUI client. Right-click the parent folder for what was lost and select Properties. In there is a deleted items tab. There you can restore lost files.

If edits are what were lost, you can view history on one file and roll back to the previous version. If that's not an option, then you can get both files to disk and use DiffMerge on them. To run the DiffMerge that installs with the client, go to the client installation folder and run sgdm.exe. That will run DiffMerge.

In the meantime, I will test this out.
Beth Kieler
SourceGear Technical Support

IanG
Posts: 64
Joined: Thu Oct 25, 2007 8:11 am
Location: UK
Contact:

Re: Rename Bug

Post by IanG » Wed Mar 25, 2015 9:26 am

Hi,
the rename would be from within VisualStudio.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Rename Bug

Post by Beth » Thu Apr 02, 2015 4:12 pm

I've reproduced the issue you are having and will log a bug. In the meantime I'm checking for a work-around so that you can continue forward.

F: 18101
Beth Kieler
SourceGear Technical Support

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Rename Bug

Post by Beth » Fri Apr 03, 2015 8:37 am

I re-read this and performed the wrong steps. I will give this another try.
Beth Kieler
SourceGear Technical Support

Post Reply