Renaming files and Shelving in Visual Studio

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

Moderator: SourceGear

Post Reply
buckey
Posts: 22
Joined: Fri Feb 12, 2010 3:21 pm

Renaming files and Shelving in Visual Studio

Post by buckey » Fri May 21, 2010 1:47 pm

One of our users recently reported an issue where he renamed a .aspx file in Visual Studio, then shelved that file. Everything appeard correct in the shelf, but when unshelving he noticed that the .aspx page had the correctly re-named name, but the child files (the .aspx.cs and .aspx.cs.resx) reverted to their old name. The renamed file as well as both child files (also renamed) were shelved. When he tried to manually rename the files after he unshelved them he received a message that he needed to rename files from the parent; however, the parent was already renamed.

Similarly, after renaming a .aspx file, he noticed when he un-did his checkouts only the .aspx was correctly returned to its original name; the child files remained re-named.

Lastly, he noticed that after shelving, then undoing his checkout he receives an "Unspecified error" when trying to re-name again.

Thank you for your help.
Connections Academy Software Development Team

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

Re: Renaming files and Shelving in Visual Studio

Post by Beth » Fri May 21, 2010 2:00 pm

Which version of Visual Studio and which version of Vault are you using?
Beth Kieler
SourceGear Technical Support

buckey
Posts: 22
Joined: Fri Feb 12, 2010 3:21 pm

Re: Renaming files and Shelving in Visual Studio

Post by buckey » Tue Jun 01, 2010 12:09 pm

Vault is version 5.02.

Visual studio is version 9.030729.1 SP

Thank you.
Connections Academy Software Development Team

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

Re: Renaming files and Shelving in Visual Studio

Post by Beth » Mon Aug 09, 2010 9:12 am

We weren't able to reproduce your scenario here, but here's what we found so far with renaming and shelving.

The file being renamed in these tests is file.aspx. There is a child called file.aspx.cs that gets renamed automatically from this process.

First rename:
1) Rename the file
2) Shelve the file, but choose the option to undo the changes in the working folder.
3) Unshelve. The renamed files are back in the pending changes as before. The solution file is modified as well due to the rename.

Second rename test:
1) Rename the file
2) Shelve the file, but don't choose the option to undo the changes in the working folder.
3) Unshelve with overwrite.
4) Receive an error that the rename fails, because that action is a duplicate transaction (already in the pending change set).
5) Solution file is modified successfully.

In your case, if any kind of undo was manually performed, then your user should perform a refresh.

At this point, I'd recommend the user trying a refresh and then posting a screenshot of the state the files are in if they won't commit or rename.
Beth Kieler
SourceGear Technical Support

Post Reply