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

svnversion on a file

From: David Glasser <glasser_at_mit.edu>
Date: 2006-08-04 20:31:47 CEST

svnversion gives a misleading error message when given a versioned
file as an argument, and "svnversion -h" only sort of implies that you
aren't supposed to do this. Do other folks think this is a bug? I
don't necessarily think svnversion should be bloated to give useful
information for this, but perhaps the error message should be more
like "'beep' is not a directory", and all the references to "path" in
the help text should be "directory". I'd be happy to make a patch to
do this if folks thought this was the right thing to do.

--dave

$ ls -l beep
-rw-r--r-- 1 glasser wheel 0 Aug 3 17:03 beep
$ svn st -v beep
                2 2 glasser beep
$ svnversion beep
'beep' not versioned, and not exported
$ svnversion -h
usage: svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]

  Produce a compact 'version number' for the working copy path
  WC_PATH. TRAIL_URL is the trailing portion of the URL used to
  determine if WC_PATH itself is switched (detection of switches
  within WC_PATH does not rely on TRAIL_URL). The version number
  is written to standard output. For example:

    $ svnversion . /repos/svn/trunk
    4168

  The version number will be a single number if the working
  copy is single revision, unmodified, not switched and with
  an URL that matches the TRAIL_URL argument. If the working
  copy is unusual the version number will be more complex:

   4123:4168 mixed revision working copy
   4168M modified working copy
   4123S switched working copy
   4123:4168MS mixed revision, modified, switched working copy

  If invoked on a directory that is not a working copy, an
  exported directory say, the program will output 'exported'.

  If invoked without arguments WC_PATH will be the current directory.

Valid options:
  -n [--no-newline] : do not output the trailing newline
  -c [--committed] : last changed rather than current revisions
  -h [--help] : display this help
  --version : show version information

-- 
David Glasser | glasser_at_mit.edu | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 4 20:32:17 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.