Possible bug in Unshelve with new files/folders

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

Moderator: SourceGear

Post Reply
jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Possible bug in Unshelve with new files/folders

Post by jstarbird » Tue Jan 12, 2010 7:07 pm

Vault 5.0.2.18753

I tried a search for this so please excuse me if this is a repeat post.

We found an issue with Unshelving if the entire contents of the Shelve Set is Adding Files or Folders. When another user Unshelves the shelve set they will not be prompted to set a working folder and if one isn't set for the parent no files will end up downloaded but the user is not told of any errors. If a previous working folder is set for the parent then it automatically downloads them to that location but it still does not prompt the user for a Working folder which it seems to do for non-new files/folders shelve sets.

Steps to reproduce:
1 - Have a user Add a Folder containing files that do not exist in Vault. Then create a Shelve Set of that transaction.
2 - Have another user on another system access that Shelve Set and Unshelve it. The user is not prompted to set a Working Folder for the Shelve Set, one bug, and if no previously set Working Folder is set, for the parent folder, the process just ends with no warning dialogs and the files do not end up on the persons system, second bug.


Thanks,
J

shannon

Re: Possible bug in Unshelve with new files/folders

Post by shannon » Wed Jan 13, 2010 8:27 am

This is actually working as intended. All add file and add folder operations are unshelved to a temporary location, not to the working folder. After you unshelve, take a close look at the Unshelve Operation Results dialog that appears. For example, there should be two lines for an unshelved add file operation: one will tell you where the file was downloaded to (you can right-click this one to "Jump to" that location), the other will give the results of the attempt to pend an add for that file. If you don't already have an add pended for a file with that name and destination, it should also have appeared in the pending changeset.

This behavior may seem odd, but there is a reason for it. When we unshelve an item that is already under version control, even if you choose to overwrite an existing copy of that file, we back it up. For items that aren't under version control, this won't happen. If another user unshelves your changeset and you both happen to be working on an uncontrolled file, say a .project file, in the same location, downloading that file directly to the working folder could overwrite their file without their knowledge.

There is more information about the unshelve process in the Client Help, under the topic "How Do I Unshelve Changes?"

jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Re: Possible bug in Unshelve with new files/folders

Post by jstarbird » Wed Jan 13, 2010 11:09 am

actually that is what it isn't doing. Only if the user has mapped a working folder to the parent does anything happen, including the final dialog you mention. So for example:

I add the folder "special" and all it's files on my system to $/source/java
Then create a Shelve Set and Unshelve that on another system where the user has not mapped a working folder to either source or java and the client says it's downloading files but once it's done with that nothing happens. No dialog and nothing appears in the Pending Change Set.
If that user has java mapped to say c:\source\java then the files are put under that folder just as you would expect when adding them and that final dialog you mention does appear and the files do appear in the Pending Change Set.
I've been able to reproduce this on multiple systems. I tested it on the same system for each circumstance as well, so the only thing that was changed was adding a working folder.


Thanks,
J

shannon

Re: Possible bug in Unshelve with new files/folders

Post by shannon » Wed Jan 13, 2010 12:05 pm

Fair enough. I tried to reproduce what you were seeing before I posted and I saw exactly what I expected, not what you're seeing. I'll give it another try and post back.

shannon

Re: Possible bug in Unshelve with new files/folders

Post by shannon » Thu Jan 14, 2010 10:24 am

We're still not able to reproduce what you're seeing. Does anything show up in either the messages pane of the gui client or the log file (%temp%/VaultGuiClient.txt)?

jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Re: Possible bug in Unshelve with new files/folders

Post by jstarbird » Mon Jan 18, 2010 3:17 pm

Shannon,
no nothing shows up in the Messages pane and nothing in the log file. Basically all that happens is that I see the the lower left corner of the Vault client saying it's Downloading Files and then once it's done I'm just back to the ShelveSet Details dialog. We never get the Success dialog and no other messages. Nothing in the Pending Change Set either. I even exited the client, deleted the log and tried again to make sure I wasn't misreading and a log file doesn't even get created.

Just to clarify, whatever section the files are being added to must not have ANY working folders set on parent folders up to and including the $ root folder.


Thanks,
J

shannon

Re: Possible bug in Unshelve with new files/folders

Post by shannon » Mon Jan 18, 2010 4:08 pm

I have a few more questions.

Can you check your server log for anything pertinent (%WINDIR%\Temp\sgvault\sgvault.log)?

Are both your server and client version 5.0.2?

Thanks,
Shannon

shannon

Re: Possible bug in Unshelve with new files/folders

Post by shannon » Mon Jan 18, 2010 4:38 pm

I think I've figured out your problem. How deep is this folder structure that you're trying to add? I'm guessing that the subpath to the deepest item is too long once you add it to the temp path we're using as the unshelve destination in the case where there is no working folder set.

If you check %temp%, one of your UnshelveAddOps* folders probably contains at least some of the files that were downloaded (until it reached a path length that was too long for windows to handle).

Try shelving/unshelving a folder with a shallower structure the same way, does that work properly?

jstarbird
Posts: 146
Joined: Wed Jul 22, 2009 11:49 am

Re: Possible bug in Unshelve with new files/folders

Post by jstarbird » Mon Jan 18, 2010 6:35 pm

That does seem to be the issue. Is there someway to set the Temp path used by Vault to shorten this a bit since it does not prompt for a Working Folder? Or I guess adding a Feature Request to have it prompt for that instead of defaulting to the temp folder.
I'm hoping not many people will run into this, I think we only hit this as we just moved to Vault and so people had not set some of their parent working folders.


Thanks,
J

shannon

Re: Possible bug in Unshelve with new files/folders

Post by shannon » Tue Jan 19, 2010 9:04 am

For now, the obvious work around is to set a working folder. You're the first to run into this case and I don't expect many to encounter it. I've logged a bug and we'll investigate the best way to fix it. Thank you for the report and also for your help in finding the cause.

id:15184

Post Reply