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

Re: Dropping Subversion

From: B Smith-Mannschott <bsmith.occs_at_gmail.com>
Date: Tue, 27 Jan 2009 20:18:41 +0100

On Tue, Jan 27, 2009 at 5:17 PM, Petra Margaritoff
<petra.margaritoff_at_cognimed.de> wrote:
>> This is
>> because of the lack of "labels", or tags "a la" CVS (multiple stamps on
>> arbitrary file/revision combo).
>
> We have a similar issue: We would like to place "labels" or "tags" on certain revisions of certain files in order to mark them as "peer reviewed", "integration-tested" etc. Having done that it is easy to check, whether all files of a revision have undergone the required QA measures.
> In earlier days we were using RCS for that, which worked fine. I consider SVN to be much more convenient, but the lack of this feature is a potential show-stopper for us.
> I am sure many companies must have similar requirements and have obviously found a solution we didn't find so far. Any suggestions and alternative solutions would therefore be highly appreciated.
>
> Petra

Have you considered doing something like the two functions below.
(They are both shell functions for fish, which I'm currently learning,
but should be translatable into something more conventional like bash,
python, perl...)

To mark a particular revision of a particular file as having been
reviewed, we set the property "reviewed-ok" on the file to be the
"Checksum" (md5) of the file's current contents (i.e. those that have
been approved).

function mark-reviewed-ok
        set checksum (svn info $argv[1] | grep Checksum | cut -d " " -f2)
        svn ps reviewed-ok $checksum $argv[1]
end

This property, will be carried forward into future revisions of the
file, renames, property changes etc. This is ok. In order to determine
if a particular revision of a particular file should be considered
"reviewed" we compare the value of "reviewed-ok" (if any) with the
file's current Checksum. If the two match, it is reviewed and
approved, if not then it isn't reviewed and approved.

function is-reviewed-ok
        set checksum1 (svn pg reviewed-ok $argv[1])
        set checksum2 (svn info $argv[1] | grep Checksum | cut -d " " -f2)
        if test $checksum1 = $checksum2
                echo "OK $argv[1]"
                exit 0
        else
                echo "NO $argv[1]"
                exit 1
        end
end

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1059968
Received on 2009-01-27 20:19:01 CET

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.