New command line "find file" utility available

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

Moderator: SourceGear

DarrenS
Posts: 49
Joined: Wed Mar 17, 2004 4:56 pm
Location: Inglewood, CA

New command line "find file" utility available

Post by DarrenS » Thu Apr 29, 2004 3:22 pm

Based on Sourcegear.Jeremy's blog sample, I created a command line client to do something that seems much desired in Vault - search for files by filename. It allows you to use wildcards and even regular expressions, and has options for case sentivitity, version info and "last date modified". Run it with no arguments for usage info.

Feel free to check it out and let me know if you have any comments. It's in VaultPub under RecursiveFindFile. Use at your own risk etc.

anotherlab
Posts: 23
Joined: Mon Apr 26, 2004 8:52 am
Location: Albany, NY
Contact:

Where is VaultPub

Post by anotherlab » Fri Apr 30, 2004 7:50 am

Where can I download this file from?
Chris Miller
Tyler's VersaTrans Solution

DarrenS
Posts: 49
Joined: Wed Mar 17, 2004 4:56 pm
Location: Inglewood, CA

Post by DarrenS » Fri Apr 30, 2004 10:50 am


dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri Apr 30, 2004 12:59 pm

Darren,

Thanks so much for getting this together. If you don't mind, I think I'll compile it and put it up as an exe in a zip with the source so it will be easier to folks to download.

Also, the server it is currently on is actually vaultdemo, which we do wipe on occasion (it is a demo server that anyone can login to and do what they will with, so it needs to be cleaned out every so often). vaultpub is a seperate server we have for folks who are developing open source projects and want a free vault server to keep their source.

If you email me some contact info, we'd love to set you up with an account there, and move the source to a place where it won't get inadvertently wiped :)

Thanks again,

DarrenS
Posts: 49
Joined: Wed Mar 17, 2004 4:56 pm
Location: Inglewood, CA

Post by DarrenS » Fri May 14, 2004 11:02 am

OK, I uploaded a couple of utilities I wrote so others can use them. They're in the Vaultpub database, in the Vault_Tools repository.

FindFiles allows you to do a recursive search for files by filename, and allows you to use a regex. This is based on the code provided in Jeremy's blog posting.

VaultCmdLineClient is a customized version of the sample provided with Vault. I refactored the code, and it has two new options:

- GETLABELDIFFS - gives a full history report of all files changed between two labels of a project
- GETLABELLEDFILES - retrieves all files (recursively) that have been labelled with a particular label, under a given path.

I also added a "verbose" option to LISTUSERS that outputs all the default rights and active permissions for each users and for each project in the repository.

I checked in the EXEs too. You'll need to run them somewhere where they can locate the Vault assemblies - probably in the Vault client folder is a good idea.

I added usage info for at least GETLABELDIFFS.

Any questions, post them here and I'll try to respond.

DarrenS
Posts: 49
Joined: Wed Mar 17, 2004 4:56 pm
Location: Inglewood, CA

Post by DarrenS » Fri May 14, 2004 12:10 pm

I just uploaded another one - VaultSearch. It's a GUI version of the command line file search, written by a colleague of mine.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Wed May 19, 2004 8:54 am

Thanks so much for publishing all these Darren.

So that folks don't have to figure out how to connect to Vaultpub, I've provided downloads as Knowledge Base articles. They are available here:

<a href=http://support.sourcegear.com/viewtopic.php?t=1051> Find Files Command Line Utility </a>
<a href=http://support.sourcegear.com/viewtopic.php?t=1052> GUI version of Find Files/File Search Tool above </a>
<a href=http://support.sourcegear.com/viewtopic.php?t=1054> Modified Command Line Client that shows differences between labels </a>

DarrenS
Posts: 49
Joined: Wed Mar 17, 2004 4:56 pm
Location: Inglewood, CA

Post by DarrenS » Wed May 19, 2004 5:49 pm

Thanks Dan. We believe in Vault and want to support it - I think the "semi open source" approach you guys are taking is a good way to ensure the product thrives and grows.

For the record, my talented colleague that wrote the GUI client is John Miller. I checked with him and he's ready for the dizzying heights of fame provided by getting a mention on the Vault fora.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Thu May 20, 2004 7:23 am

DarrenS wrote: For the record, my talented colleague that wrote the GUI client is John Miller. I checked with him and he's ready for the dizzying heights of fame provided by getting a mention on the Vault fora.
OK, but be warned - It is likely that he won't be able to walk into public places anymore without being mobbed by crazed teenage Vault fanatics :lol:

jnapier
Posts: 42
Joined: Fri Mar 05, 2004 12:18 pm

Post by jnapier » Wed Aug 04, 2004 10:56 am

Is there a way to checkout the files that have been found by the utility

ramesh

Post by ramesh » Sun Nov 21, 2004 1:41 am

First off, thanks for posting the modified vault commandline.

I had a need to modify the REMEMBERLOGIN command to work without specifying a repository. I made the modification and was using it. However, I found that due to some reason, SETLABELWORKINGFOLDER does not work as advertised. If I pass in a repository folder, say $/top/second/third, this command sets the working folder to be just third! Then a subsequent call to GETLABEL complains. In addition, the GETLABEL in this version does not support -labelworkingfolder option. So I am stuck.

Really, what I would like is for the GETLABEL command work with the -labelworkingfolder option enabled and working. I don't really need the SETLABELWORKINGFOLDER to work in that case.

BTW, I don't want to use the -destpath option for the getlabel command as I would like the _sgVault folders to get created under the working folders during a nightly build, so that the developers can get the folders with their builds - this will avoid the "Missing" issues.

Alternatively, if someone can point me to the latest "original" vault commandline source code, that would also work.

Thanks!

christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Post by christian » Sun Nov 21, 2004 10:18 am

Dan / DarrenS,

I've just asked the guys at FinalBuilder2 (http://www.atozed.com/finalbuilder/) to add a new Vault action to their list of inbuilt commands - Vault Diff action. The idea here is a FinalBuilder action gives a nice GUI designer / property sheet that enables you to add specific actions that get fired in sequence as part of a "nightly build". These designers are translated at run-time into command-line or API calls that are issued to Vault.

They've added this to their TODO list for FB3 due out soon. Not sure how the guys at FB turn these requests into reality - do they just look at the publicly available help files for Vault and then "code something up". Or do they collaborate with you guys at Source gear to come up with their code?

Obviously, if the FB guys only go on the help files from Vault then they're going to miss out on the functionality that Darren has written.

I'm all for maximising the Vault features that are available from products like FinalBuilder so is it possible that these Diff features written by Darren get included in the Vault command-line "out of the box"?

Thanks
Christian

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Nov 22, 2004 9:22 am

christian wrote:I'm all for maximising the Vault features that are available from products like FinalBuilder so is it possible that these Diff features written by Darren get included in the Vault command-line "out of the box"?
Darren's work has been incorported into the 3.0 command line client, so the FB folks should be able to get it as part of an offiical release (real soon now...:))

christian
Posts: 202
Joined: Tue Sep 14, 2004 1:02 pm
Location: UK

Post by christian » Mon Nov 22, 2004 9:29 am

Fantastic. I'll go over to FB forums and let them know.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Mon Nov 22, 2004 11:07 am

ramesh wrote:Really, what I would like is for the GETLABEL command work with the -labelworkingfolder option enabled and working. I don't really need the SETLABELWORKINGFOLDER to work in that case.

BTW, I don't want to use the -destpath option for the getlabel command as I would like the _sgVault folders to get created under the working folders during a nightly build, so that the developers can get the folders with their builds - this will avoid the "Missing" issues.
Ramesh,

I think what you are asking for was fixed in the 2.0.1 client? The SETLABELWORKINGFOLDER command was removed then, and replaced by a "labelworkingfolder" option in the GETLABEL command. Can you verify, or is there a bug that still exists there that we don't know about?

Thanks,

Post Reply