I need to be able to set either a label or a comment for a file and then be able to retrieve it again at a later date.
Currently, I can set a label and I can set a comment, but I'm have a job figuring out how to retrieve them. is there any way to get a label or a comment associated with a version of a file? I've looked at the available properties in the VaultClientFile object and also GetFileProperties, but no label info seems there, and the comment field always seems to be blank, no matter what I set it to.
Rob
retrieving label or comment from a file
Moderator: SourceGear
-
- Posts: 10
- Joined: Fri May 28, 2010 3:09 am
Re: retrieving label or comment from a file
I've done some more digging, and found how to get the information I need using ProcessCommandHistory. The only stumbling block I've got now is that while I can create a label, I need to be able to create a comment to go with it. Not having much success in finding how to do this...
-
- Posts: 10
- Joined: Fri May 28, 2010 3:09 am
Re: retrieving label or comment from a file
Looks like I've managed to find out how to do this myself - for information purposes, here's what I did:
I set the 'ServerOperations.client.Comment' field to the comment I wanted and then did the 'ServerOperations.ProcessCommandLabel' method. Lo and behold, the comment field was set. It also works for other operations such as Check in and Check out.
I set the 'ServerOperations.client.Comment' field to the comment I wanted and then did the 'ServerOperations.ProcessCommandLabel' method. Lo and behold, the comment field was set. It also works for other operations such as Check in and Check out.
Re: retrieving label or comment from a file
Thank you for posting what you found. This should help other users as well.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support