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

RE: Re: Dropping Subversion

From: Jack Repenning <jrepenning_at_collab.net>
Date: Tue, 27 Jan 2009 09:41:10 -0800 (PST)

> You are right, properties would be just the thing. To my knowledge though, properties are available only
> - either for ALL files of ONE revision (versioned properties)
> - or for ONE file in ALL revisions (unversioned properties)
> What I would need is a property I can set on a file basis and which is valid for only one revision, say
> foo.c rev. 44 - PEER_REVIEWED_OK
> foo.h rev. 42 - PEER_REVIEWED_NOK
> foo.h rev. 43 - PEER_REVIEWED_OK

Your description of the scope of properties is not quite right. Properties are available:

 - for ALL files of ONE revision (revision properties, note the name change)

 - or for one file (or directory) in a specified revision and all subsequent versions (versioned properties)

Other than the name changes, the point is that you can *specify* a versioned property with exactly the granularity you want here, but it also applies to later versions (which you don't want).

A common way around this is to make the value of the property name the revision, so

> foo.c rev. 44 - PEER_REVIEWED_OK = 44
> foo.h rev. 42 - PEER_REVIEWED_NOK = 42
> foo.h rev. 43 - PEER_REVIEWED_OK = 43

Or, let me renumber and reorder your example slightly, to make the point:

> foo.h rev. 42 - PEER_REVIEWED_NOK = 42
> foo.h rev. 44 - PEER_REVIEWED_OK = 44
> foo.c rev. 46 - PEER_REVIEWED_OK = 46

The interpertations:

r42 has NOK value 42, and no OK value. It was reviewed and rejected.

r43 has NOK=42, no OK. Since there's no matching property value, rev 43 has not been reviewed at all.

r44 has NOK=42 and OK=44: an OK value matches its revision, so it has been reviewed and accepted, and if anyone cares, the last time it was rejected was r42. (Your process might choose to remove the NOK when planting the OK, and vice versa, so there's at most one value at any time, but I'll skip that part for the moment.)

r45 has NOK=42 and OK=44. Neither matches its rev number, so it is unreviewed

r46 has NOK=42 and OK=46: the OK value matches, so this is reviewed and approved.

A conceptually simpler technique is to remove both OK and NOK whenever they no longer apply, so an un-reviewed change would have neither, and a reviewed change would have exactly one.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1059667
Received on 2009-01-27 18:42:12 CET

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