Hello,
Is there a way I can know if a specific file is checked out with the CLC?
I need something like Status command line option of Source Safe.
Is there a way to output a result with the CLC. Maybe i could do a LISTCHECKOUTS > toto.txt and parse the result ?
I need help here!
Thank you very much
CLC - Status command in Vault ?
Moderator: SourceGear
Looks like parsing is the best way to do this with the current version of Vault. You can output to a text file. Output will look something like this:
I took a look at the LISTFOLDER command; it lists folder contents but only the version of files, and not any checkout info. I'll add a feature request for a command to retrieve file status from the working folder information.
Code: Select all
<checkoutlist>
<checkoutitem id="214">
<checkoutuser username="linda" version="1" repositorypath="$/addfiles/testfiles/xanadu1.txt" locktype="checkout" comment="" hostname="server/sourcegear.com" localpath="C:\_Vault2\addfiles\testfiles\xanadu1.txt" folderid="213" lockedwhen="12/29/05 4:38:43 PM" miscinfo="" />
</checkoutitem>
<checkoutitem id="215">
<checkoutuser username="linda" version="2" repositorypath="$/addfiles/testfiles/xanadu2.txt" locktype="checkout" comment="" hostname="server/sourcegear.com" localpath="C:\_Vault2\addfiles\testfiles\xanadu2.txt" folderid="213" lockedwhen="12/29/05 4:38:43 PM" miscinfo="" />
</checkoutitem>
<checkoutitem id="216">
<checkoutuser username="linda" version="1" repositorypath="$/addfiles/testfiles/xanadu3.txt" locktype="checkout" comment="" hostname="server/sourcegear.com" localpath="C:\_Vault2\addfiles\testfiles\xanadu3.txt" folderid="213" lockedwhen="12/29/05 4:38:43 PM" miscinfo="" />
</checkoutitem>
</checkoutlist>
<result success="yes" />
Last edited by lbauer on Fri Jan 06, 2006 4:41 pm, edited 1 time in total.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Linda,
I've got a question. Is the checkout list that you are getting only the local checkout list, or is it the list of all files checked out in the repository along with all of the users who have each of those files checked out?
I suspected that when you mentioned the working folder. I don't know what parentol wanted, but I am now curious if it's possible to find out (even from a list) all the users that have a particular file checked out (or if a file is checked out exclusively by some user).
Mike
I've got a question. Is the checkout list that you are getting only the local checkout list, or is it the list of all files checked out in the repository along with all of the users who have each of those files checked out?
I suspected that when you mentioned the working folder. I don't know what parentol wanted, but I am now curious if it's possible to find out (even from a list) all the users that have a particular file checked out (or if a file is checked out exclusively by some user).
Mike
LISTCHECKOUTS lists all the checkouts for a particular repository. In the previous example, only one user had any checkouts.
Here's an example with more user checkouts. Also, the results do show whether the checkout was exclusive or not:
LISTFOLDER shows the contents of a particular folder in the tree and the working folder association, if any, for the user running the command.
Results look like this:
With the html help included with the 3.1 Vault Command Line Client, it's easy to review the commands available and try them yourself. use the command, vault helphtml.
Here's an example with more user checkouts. Also, the results do show whether the checkout was exclusive or not:
Code: Select all
<vault>
<checkoutlist>
<checkoutitem id="8">
<checkoutuser username="linda" version="1" repositorypath="$/addfiles/bapp/xan
adu2.txt" locktype="checkout" comment="" hostname="server/sourcegear.com" loc
alpath="C:\_Vault\addfiles\bapp\xanadu2.txt" folderid="4" lockedwhen="1/6/06 9:4
3:55 AM" miscinfo="" />
</checkoutitem>
<checkoutitem id="14">
<checkoutuser username="liza" version="1" repositorypath="$/addfiles/bapp/xana
du8.txt" locktype="exclusive" comment="" hostname="server/sourcegear.com" loc
alpath="C:\_Vault2\addfiles\bapp\xanadu8.txt" folderid="4" lockedwhen="1/6/06 9:
44:13 AM" miscinfo="" />
</checkoutitem>
<checkoutitem id="12">
<checkoutuser username="admin" version="1" repositorypath="$/addfiles/bapp/xan
adu6.txt" locktype="exclusive" comment="" hostname="server/sourcegear.com" lo
calpath="C:\_Vault\addfiles\bapp\xanadu6.txt" folderid="4" lockedwhen="1/6/06 9:
44:37 AM" miscinfo="" />
</checkoutitem>
<checkoutitem id="268">
<checkoutuser username="admin" version="1" repositorypath="$/addfiles/bapp/fix
share.sql" locktype="checkout" comment="" hostname="server/sourcegear.com" lo
calpath="C:\_Vault\addfiles\bapp\fixshare.sql" folderid="4" lockedwhen="1/6/06 9
:44:43 AM" miscinfo="" />
</checkoutitem>
</checkoutlist>
<result success="yes" />
Results look like this:
Code: Select all
<vault>
<folder name="$/addfiles" workingfolder="C:\_Vault\addfiles">
<file name="Copy of xanadu7.txt" version="1" length="226" objectid="28" objectv
ersionid="28" />
<file name="audit.gif" version="1" length="19492" objectid="3" objectversionid=
"3" />
<file name="Created3_30.txt" version="2" length="17" objectid="32" objectversio
nid="433" />
<file name="xanadu2.txt" version="1" length="264" objectid="228" objectversioni
d="228" />
<file name="Created3_27.txt" version="1" length="15" objectid="29" objectversio
nid="29" />
<file name="xanadu6.txt" version="1" length="218" objectid="232" objectversioni
d="232" />
<file name="xanadu8.txt" version="1" length="363" objectid="234" objectversioni
d="234" />
</vault>
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager