RE: Re: Determining TrotoiseSVN version from a script.
From: Bob Cunningham <bcunningham_at_sandel.com>
Date: 2007-08-06 18:24:26 CEST
Cygwin has full access to Windows file systems, and can launch any Windows executable. I frequently do this manually under Bash, or automatically via any of a multitude of Cygwin tools (there are hundreds of them).
If TortoiseProc output a string to stdout with it's version, ANY program running on Windows that can capture stdout or can accept a pipe on stdin can run TortoiseProc and access that string. It would be trivial for Ant or Make or a script to capture such a string.
Too bad that string doesn't exist.
Anyhow, we run our automated build tools on local changes before committing them. There's no choice in this matter, since it is part of our QA policy: "Don't check in anything that breaks the automated build!" Our development team spans several time zones, and our automated builds run continuously, checking every checkin against a large array of automated tests and code quality tools. Creating bugs is one issue: Sharing them across state borders should be a crime!
(I apologize for top-posting: I'm stuck using Outlook, which doesn't do proper quoting. Arrgh.)
-BobC
-----Original Message-----
Stefan Küng wrote:
If your script runs in Cygwin then that doesn't really allow to you use the Win32 client. Cygwin SVN may be unsupported officially but here's a bit of advice from some who's been using it in scripts:
Consider running your automated processes (whatever they are) on a completely separate working copy never to be touched by Tortoise SVN.
If you can separate out automated stuff into separate working copies, consider using a different admin dir, eg .svn for TortoiseSVN and _svn for your scripts (read up about the "dot net hack" -- this environment can be set locally to your script leaving tortoise unaffected). Another benefit of this is that it stops the TSVN status cache from nosing around in your scripted copies.
I use PySVN in Cygwin, (I had to compile it) If you know Python then it's fairly easy to get to grips with - I switched to it because I got fed up of having to do string parsing on svn's stdout, which is designed to be human readable so contains awkward constructs such as sentences, which are not great things to have to process automatically.
---------------------------------------------------------------------
---------------------------------------------------------------------
|
This is an archived mail posted to the TortoiseSVN Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.