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

Re: RFC: Standardizing a 'svn:branch' (boolean) property

From: Trent Nelson <trent_at_snakebite.org>
Date: Mon, 16 Jul 2012 09:18:10 -0700

On Jul 16, 2012, at 8:11 AM, Bert Huijben wrote:

> Hi,
> On the Berlin hackathon the suggestion was raised that it might help that we
> standardize a new 'svn:branch' property to give tooling a hint on what
> directories are branches and which aren't.

Automatic branch ("root") identification is Enversion's bread and butter, so I might as well weigh in here.

Here's an example I've copied from [1]:

% evnadmin root-info /trunk trac
Looking up root '/trunk' in repository 'trac'...
Found '/trunk' in r10932's roots; created in r1.
Displaying root info for '/trunk' from r1:
{'/trunk/': {
    'created': 1,
    'creation_method': 'created',
    'copies': {
        174: [('/tags/trac-0.5-rc1/', 175)],
        182: [('/tags/trac-0.5/', 183)],
        192: [('/tags/trac-0.5.1/', 193)],
        1086: [('/branches/0.8-stable/', 1087)],
        1185: [('/branches/cmlenz-dev/rearch/', 1186)],
        1351: [('/branches/cboos-dev/xref-branch/', 1352)],
        1370: [('/branches/cmlenz-dev/vclayer/', 1371)],
        9871: [('/tags/trac-0.12/', 9872)],
        9937: [('/branches/0.12-stable/', 9938)],
        10647: [('/sandbox/ticket-3584/', 10648)],
        10649: [('/sandbox/ticket-3580/', 10650)]

That information (a safe Python dict) happens to be stored in a cumulative revprop called evn:roots. Each revision's evn:roots revprop is populated during the repository analysis process (`evnadmin analyze <repo>`).

The main difference between this approach and the approach you mentioned is that Enversion goes to extremes in order to avoid the need for manual intervention. i.e. the need for an administrator or power-user to come in and manually mark specific paths as 'roots'. I talk more about the motivation behind this approach in [2].

Having a cumulative revprop worked well because it catered for, say `svn cp ^/trunk_at_50 ^/branches/foo` when HEAD is 100 and svn:branch was set at r90. r50 has no svn:branch set, so /branches/foo doesn't pick up the 'I-am-a-root' metadata.

....which reminds me, I really should spend some time trying to get the word out about Enversion ;-)


[1]: https://github.com/tpn/enversion/blob/master/doc/quick-start.rst
[2]: http://svn.haxx.se/dev/archive-2011-10/0107.shtml
Received on 2012-07-16 18:18:44 CEST

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.