command line GETVERSION and performdeletions
Moderator: SourceGear
command line GETVERSION and performdeletions
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
Thanks,
Shawn
Re: command line GETVERSION and performdeletions
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?
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
SourceGear Technical Support
Re: command line GETVERSION and performdeletions
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.)
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.)
Re: command line GETVERSION and performdeletions
In other words, neither the CLC GETVERSION nor the GUI Get Tree are deleting the file as I expected.
Re: command line GETVERSION and performdeletions
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
I agree something isn't quite right here. I'm going to log a bug.
F:13840
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: command line GETVERSION and performdeletions
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
Re: command line GETVERSION and performdeletions
I'm sure that still has something to do with the getversion command. I have the details logged now. Thanks.
F:13840
F:13840
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: command line GETVERSION and performdeletions
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)
Re: command line GETVERSION and performdeletions
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?
Re: command line GETVERSION and performdeletions
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.
-
- Posts: 47
- Joined: Thu Jun 25, 2009 12:02 pm
Re: command line GETVERSION and performdeletions
Was this ever fixed?
Re: command line GETVERSION and performdeletions
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
SourceGear Technical Support
-
- Posts: 47
- Joined: Thu Jun 25, 2009 12:02 pm
Re: command line GETVERSION and performdeletions
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.
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.
Re: command line GETVERSION and performdeletions
It hasn't made a release yet. We still have the bug logged, that I can add your "vote" to it.
F:13840
F:13840
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support