command line - .bat file test for checkout?

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

Moderator: SourceGear

Post Reply
Don Thimsen
Posts: 114
Joined: Fri Mar 05, 2004 11:18 am
Location: Raleigh, NC

command line - .bat file test for checkout?

Post by Don Thimsen » Mon Apr 19, 2004 7:12 pm

Does anyone have an examine of a .bat script that tests a single file to determine checkout status? I'd like to kill the script if a file has been checked out.

Thanks,
Don

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

Post by dan » Tue Apr 20, 2004 7:59 am

I don't have a .bat file example, but they way to do it would be to use the "listcheckouts" command, which returns all checkouts for the current repository, and then loop through each xml entry to find the one that corresponds to the file you want.

This is not very optimal of course. Another approach would be to use the command line source as an example, and write your own program using the client API that takes a single file, and returns whether it is checked out or not. See Jeremy's blog at http://weblogs.asp.net/Jeremy_Sheeley/ to get setup for that.

Post Reply