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)

 

Reply via email to