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

Verifying a file version

From: Headley, Ronald (PSC/ISMS/EAD-CTR) <Ronald.Headley_at_PSC.hhs.gov>
Date: Wed, 13 Jan 2010 17:02:20 -0500

Good evening.

 

We recently encountered an issue where an incorrect version, or more
specifically, a non-existing version, of a file was promoted to
production. We want to enhance our process to ensure we, at a minimal,
export an existing version of a file. Can anyone suggest a command that
will check the file version (without parsing the output of the list
command; I'd rather check the execution of the command with "echo $?" or
something to that effect)? See examples below for further details.

 

In this example, we execute a list on a file for a specific version. As
you can see, the list succeeded.

 

$ svn list -r42 -v
svn://<server>.<xxx>.<yyy>.<zzz>:000/Repository/<filename>

     42 <username> 540672 Feb 17 2009 <filename>

$ echo $?

0

 

In this example, we execute a list on a file for a specific version. As
you can see, the list succeeded. However, we hoped it would fail since
the only version of the file is 42.

 

$ svn list -r61 -v
svn://<server>.<xxx>.<yyy>.<zzz>:000/Repository/<filename>

     42 <username> 540672 Feb 17 2009 <filename>

$ echo $?

0

 

In this example, we again execute a list on a file for a specific
version. This time the version exceeded the highest versioned directory
tree, which is 61.

 

$ svn list -r65 -v
svn://<server>.<xxx>.<yyy>.<zzz>:000/Repository/<filename>

svn: No such revision 65

$ echo $?

1

 

Thank you,

 

Ron Headley
Contractor
HHS/PSC/ISMS/ESS PMO (Program Management Office)

(a SDVOSB)
301-525-3801 (cell)

 
Received on 2010-01-13 23:15:45 CET

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

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