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
command line - .bat file test for checkout?
Moderator: SourceGear
-
- Posts: 114
- Joined: Fri Mar 05, 2004 11:18 am
- Location: Raleigh, NC
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.
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.