Command line to move files based on comment string

If you are having a problem using Vault, post a message here.
Post Reply
tranlongphu
Posts: 9
Joined: Thu May 29, 2008 6:53 pm

Command line to move files based on comment string

Post by tranlongphu » Sat Jul 12, 2014 8:03 am

I put in some special project name in the comments of files when I check them in.
I would like to use command line to retrieve those files with a specific text in the files comments.

Can tell me how to do it ?

Something in Command Line that is equivalent to:
_vaultClient.Connection.HistoryBegin( historyRequest, VaultHelper.ClientConfiguration.FileMaxMatchCount, ref filesMatched, ref token );

if ( filesMatched > 0 )
{
_vaultClient.Connection.HistoryFetch( token, 0, filesMatched - 1, ref historyItems );
}

Thanks.
Phu.

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

Re: Command line to move files based on comment string

Post by Beth » Mon Jul 14, 2014 7:35 am

It's not currently possible to perform a Get based on what is in a comment string. I can put in a feature request for that functionality.

You might want to consider some combination of labels, branches, or shares instead to keep file versions that belong to a particular project together. Here are a few KB articles that may help.

Eric Sink's Source Control How To: http://www.ericsink.com/scm/source_control.html
Best Practices for Managing Branches: http://support.sourcegear.com/viewtopic.php?t=193
Basics of using Label, Cloak, Share, Pin, Branch and Merging: http://support.sourcegear.com/viewtopic.php?t=9

If you'd like to discuss how this would work further, let me know. Then tell me about the layout of your repository and how you currently work.

Also, if using the Vault GUI client is an option for you, then you can perform a Show History and filter that history by comment, then perform a Get from the history it is showing.

F: 17794
Beth Kieler
SourceGear Technical Support

Post Reply