command line GETVERSION and performdeletions

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

Moderator: SourceGear

shoover
Posts: 12
Joined: Wed Dec 03, 2008 9:04 am

command line GETVERSION and performdeletions

Post by shoover » Wed Dec 03, 2008 9:10 am

vault help GETVERSION indicates that the performdeletions option is respected, but it doesn't seem to be working for me. Can you confirm if this should work or not? I'm on version 4.0.6.15954.

Thanks,
Shawn

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

Re: command line GETVERSION and performdeletions

Post by Beth » Wed Dec 03, 2008 9:54 am

Did the item that you expected to be deleted exist in that version you were getting? If so, it will be gotten.

Did that same item exist before that version? If not, then it will be ignored. Vault doesn't have any connection to it at that point in history.

Does it work for you in the Vault GUI client?
Beth Kieler
SourceGear Technical Support

shoover
Posts: 12
Joined: Wed Dec 03, 2008 9:04 am

Re: command line GETVERSION and performdeletions

Post by shoover » Wed Dec 03, 2008 10:19 am

I'm running vault getversion with the item as a folder. A file inside the folder existed in version 2 but was deleted by version 3. vault getversion 2 causes the file to be fetched. After vault getversion 3 (with -performdeletions removeworkingcopy) I expected the file to be deleted from my hard drive, but it was not.

In the Vault GUI client, I set my working folder to a new empty folder. I viewed the folder history by version, selected 2, and clicked Get Tree. At that point the file in question appeared ghosted in the file list. I again viewed the history, selected 3, and clicked Get Tree. The file remained ghosted. (My GUI client options are set to remove working copy only if unmodified.)

shoover
Posts: 12
Joined: Wed Dec 03, 2008 9:04 am

Re: command line GETVERSION and performdeletions

Post by shoover » Fri Dec 05, 2008 9:18 am

In other words, neither the CLC GETVERSION nor the GUI Get Tree are deleting the file as I expected.

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

Re: command line GETVERSION and performdeletions

Post by Beth » Fri Dec 05, 2008 11:22 am

What happens if someone else performs the deletions and you perform a Get?

I agree something isn't quite right here. I'm going to log a bug.

F:13840
Beth Kieler
SourceGear Technical Support

shoover
Posts: 12
Joined: Wed Dec 03, 2008 9:04 am

Re: command line GETVERSION and performdeletions

Post by shoover » Fri Dec 05, 2008 1:44 pm

GET didn't delete the file either. All of the commands returned success=true, but the file is still there (ghosted in the GUI). Here's what I did:

Code: Select all

vault getversion -useworkingfolder 2 $/Project c:\tmp\fresh # File should be present in 2, deleted in 3
vault setworkingfolder $/Project c:\tmp\fresh
vault get -performdeletions removeworkingcopy $/Project

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

Re: command line GETVERSION and performdeletions

Post by Beth » Fri Dec 05, 2008 5:12 pm

I'm sure that still has something to do with the getversion command. I have the details logged now. Thanks.

F:13840
Beth Kieler
SourceGear Technical Support

shoover
Posts: 12
Joined: Wed Dec 03, 2008 9:04 am

Re: command line GETVERSION and performdeletions

Post by shoover » Thu Jan 15, 2009 9:20 am

I'm testing a different approach using the .NET client API instead of the command line client. I'm passing GetOptions.PerformDeletions=PerformDeletionsType.RemoveWorkingCopy=true, but ServerOperations.ProcessCommentGetVersion isn't performing deletions. Any tips on how I can force deletions with the API? (Still on 4.0.6)

shannon

Re: command line GETVERSION and performdeletions

Post by shannon » Fri Jan 16, 2009 11:32 am

Performdeletions is only going to work with a get latest. It sounds like you may just want to clear the disk before doing your get?

shoover
Posts: 12
Joined: Wed Dec 03, 2008 9:04 am

Re: command line GETVERSION and performdeletions

Post by shoover » Fri Jan 16, 2009 12:20 pm

Yes, I didn't want the extra disk usage from deleting and recreating the entire directory every time, but finding deletes, renames, and moves from ProcessCommandTxDetail.Items and deleting them is working nicely.

shannon

Re: command line GETVERSION and performdeletions

Post by shannon » Fri Jan 16, 2009 1:23 pm

Glad to hear you've found a solution.

BSayatovic
Posts: 47
Joined: Thu Jun 25, 2009 12:02 pm

Re: command line GETVERSION and performdeletions

Post by BSayatovic » Thu Oct 06, 2011 7:01 am

Was this ever fixed?

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

Re: command line GETVERSION and performdeletions

Post by Beth » Thu Oct 06, 2011 8:37 am

It hasn't made a release yet. We still have the bug logged, that I can add your "vote" to if you'd like.
Beth Kieler
SourceGear Technical Support

BSayatovic
Posts: 47
Joined: Thu Jun 25, 2009 12:02 pm

Re: command line GETVERSION and performdeletions

Post by BSayatovic » Thu May 23, 2013 9:01 am

It's been a couple of years. Has this bug been fixed yet?

To be clear, in our CI environment, getting the latest to perform a build does NOT delete files from the working folder that have been deleted in the repository. This means the build is potentially including files that should no longer be there.

The work-around is to wipe out the local working folder before every build, but then getting the latest becomes a very expensive operation, adding time to the CI build duration.

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

Re: command line GETVERSION and performdeletions

Post by Beth » Thu May 23, 2013 3:20 pm

It hasn't made a release yet. We still have the bug logged, that I can add your "vote" to it.

F:13840
Beth Kieler
SourceGear Technical Support

Post Reply