Get a deleted file without committing an undelete?

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

Moderator: SourceGear

Post Reply
dmagliola
Posts: 13
Joined: Tue Mar 18, 2008 7:26 pm

Get a deleted file without committing an undelete?

Post by dmagliola » Wed Apr 06, 2011 7:31 am

Hi,

I have a repository in which I have a bunch of "one time scripts" which I commit for reference, but after a while I end up deleting them because they're no longer useful and I don't want them cluttering my working folder.

However, many times I find the need to go back and look into one of those to copy a piece of code for a new script, or things like that. The only way I've found to do this is to "undelete" them, which automatically makes a commit, and then I re-delete the file, which is another commit.

This is not serious, but it's very annoying.

Is there any way to get the contents of a deleted file without undeleting it? (or, more specifically, without making a commit)

Thank you!
Daniel

GregM
Posts: 485
Joined: Sat Mar 13, 2004 9:00 am

Re: Get a deleted file without committing an undelete?

Post by GregM » Wed Apr 06, 2011 8:01 am

I've often wondered the same thing. Even being able to do a history query on it would be sufficient, since then we have full access to everything that the history dialog can do, such as get or diff.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Get a deleted file without committing an undelete?

Post by lbauer » Wed Apr 06, 2011 9:35 am

I experimented with this and there doesn't seem to be a way to get just the deleted file. However you can get the folder version prior to the time you deleted the file. First, Show History on the parent folder and query by Actions->Delete. This will give you the version of the folder at the time you deleted the file. Note the folder version of the Delete.

Then, in History Explorer, choose Query->Filter/Sort of Show History again on the folder and select View Folder History by Version. This will give you a list of all folder versions Select the version prior to the Delete operation, and click Get Tree. You can get to a non-working folder. You'll get all the files that were in the folder in that version, but you can delete unneeded files and you'll have your deleted file without undeleting, etc.

You can also do something similar if you label the folder before you delete the file(s) and then do a Get by Label on the folder, which will fetch everything in that folder before the Delete.
Linda Bauer
SourceGear
Technical Support Manager

dmagliola
Posts: 13
Joined: Tue Mar 18, 2008 7:26 pm

Re: Get a deleted file without committing an undelete?

Post by dmagliola » Wed Apr 06, 2011 9:46 am

Ok, that's a bit convoluted, but it'll definitely work. Thank you!

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Get a deleted file without committing an undelete?

Post by lbauer » Wed Apr 06, 2011 10:38 am

Yes, it is a work-around, but at least it does what you need.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply