[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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.)


-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Dave Lawrence
Sent: Monday, August 06, 2007 5:08 AM
To: users@tortoisesvn.tigris.org
Subject: Re: Determining TrotoiseSVN version from a script.

Stefan Küng wrote:
> Bob Cunningham wrote:
>> I'm automating key portions of an error-prone manual process that
>> presently uses TortoiseSVN. The script will use the Cygwin
>> command-line svn client, and is intended to run autonomously (no
>> human interaction required).
> Use the official Subversion client for Windows. The cygwin svn client
> is
> *not* supported by the Subversion team.
> And more important: it doesn't use the same working copy format since
> it simulates a Linux client - working copies are *not* compatible
> between different OS.

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.
It may be preferable to keep automated processes well away from "general" working copies anyway (or it may be completely unacceptable to you, I can't really judge as I don't know what it is you're trying to automate).

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.

To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org

To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Mon Aug 6 18:22:41 2007

This is an archived mail posted to the TortoiseSVN Users mailing list.