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
Get a deleted file without committing an undelete?
Moderator: SourceGear
Re: Get a deleted file without committing an undelete?
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.
Re: Get a deleted file without committing an undelete?
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.
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
SourceGear
Technical Support Manager
Re: Get a deleted file without committing an undelete?
Ok, that's a bit convoluted, but it'll definitely work. Thank you!
Re: Get a deleted file without committing an undelete?
Yes, it is a work-around, but at least it does what you need.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager