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

RE: Verifying a file version

From: Headley, Ronald (PSC/ISMS/EAD-CTR) <Ronald.Headley_at_PSC.hhs.gov>
Date: Thu, 14 Jan 2010 11:30:47 -0500

Thanks Andy. We really want to work with a file version, or revision, as opposed to a tree revision. Suppose there are three revisions of File-1 in the repository and one revision of File-2.

File-1 revision 63
File-1 revision 64
File-2 revision 65
File-1 revision 66

Suppose we want to deploy File-1 revision 66 but the developer specifies revision 65 (which doesn't exist) when creating the deployment package (HP Kintana). In this scenario, File-1 revision 64 will be exported and deployed. This is what happened and is what we want to avoid. Do you have any suggestions?

Perhaps the wrong tool was selected or perhaps it is not setup correctly or we're not using it correctly. Either way, it is what we have to work with and we're trying to improve our processes. We're also looking at establishing baselines for our systems using SVN. Can this be done?

Any suggestions would be greatly appreciated.

Ron Headley
Contractor
HHS/PSC/ISMS/ESS PMO (Program Management Office)
(a SDVOSB)
301-525-3801 (cell)

-----Original Message-----
From: Andy Levy [mailto:andy.levy_at_gmail.com]
Sent: Wednesday, January 13, 2010 6:24 PM
To: Headley, Ronald (PSC/ISMS/EAD-CTR)
Cc: users_at_subversion.apache.org
Subject: Re: Verifying a file version

On Wed, Jan 13, 2010 at 17:02, Headley, Ronald (PSC/ISMS/EAD-CTR)
<Ronald.Headley_at_psc.hhs.gov> wrote:
> 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.
>

Use svn info. svn list really seems like the wrong tool for the job
here. You'll still have to parse the output of svn info to read the
Last Changed Revision line.

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

Why would you expect it to fail? You asked for svn ls as of revision
42, and the file existed at that revision.

>
> $ svn list -r61 -v
> svn://<server>.<xxx>.<yyy>.<zzz>:000/Repository/<filename>
>
> †††† 42 <username>†††††† 540672 Feb 17† 2009 <filename>
>
> $ echo $?
>
> 0

If the file hasn't been changed since r42, this still seems correct.
Received on 2010-01-14 17:31:49 CET

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