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

Re: Branch root identification -- a (really) simple proposal

From: Paul Burba <ptburba_at_gmail.com>
Date: Tue, 29 Sep 2009 12:41:34 -0400

On Wed, Sep 9, 2009 at 11:54 AM, Mark Phippard <markphip_at_gmail.com> wrote:

> On Wed, Sep 9, 2009 at 11:46 AM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
>> I was thinking today about how Subversion offers all this flexibility in
>> terms of branch creation ("it's just a copy of a directory!") but sometimes
>> at the cost of some benefits you might otherwise get from a first-class
>> branch object.
>>
>> Could a really, really simple solution help here?  What if Subversion
>> recognized a directory property (say, "svn:branch-root") as an indicator
>> that that directory is the root of a branch (where by "branch", I mean "line
>> of development", which includes trunk and tags)?  Benefits could include:
>>
>>  * the fact that the property would naturally get set on copies of that
>>    directory, ensuring that branches of the directory are annotated as
>>    such.
>>
>>  * helping the client discourage commits of subsets of a branch.
>>
>>  * helping the client warn users about merging at anything less than
>>    the branch level.
>>
>>  * helping tools like ViewVC and Trac identify branches, and add UI
>>    goodness accordingly.
>>
>> It sounds too simple to be truly useful.  What do others think?
>
> I have been trying to think about how we can retroactively improve
> merge tracking and was thinking of something similar where you could
> (optionally) flag your root folder with a property like this.  If
> Merge sees the property it could record all mergeinfo only at that
> location.  I was not thinking of denying the ability to perform a
> merge at a subtree, but to still record it at the root as if it was a
> whole-branch merge.
>
> This would allow tools like TruMerge to fire off a bunch of subtree
> merges and have them all recorded properly at the branch root.

Mark,

For the sake of discussion let's hand-wave on the problems of mixed
revision WCs, switched subtrees, and incomplete (no root) "branch"
checkouts. Let's just assume we don't allow any of that and recording
mergeinfo at the root of the branch for a subtree merge is feasible.

What if subtree merge is not done by TruMerge and so may represent
only a partial application of some change? If we record that
(partial) merge in the branch root's mergeinfo we would need a way to
flag that it is not in fact a whole-branch merge; something akin to
'*', but with the meaning "we have merged this revision to some
subtree(s) but it effects other subtrees and we have not merged it to
those". This would add even great complexity to mergeinfo and merge
tracking, something I'm hesitant to do. Or am I misunderstanding what
you suggest?

Paul

> Would you just set this property any time a folder is copied, or would
> it be better to add a --branch option to svn copy to designate when to
> use it?  Or even an svn branch subcommand?
>
> I'd probably like to see us go further and define an svn:project-root
> property with information on the branches and tags root folder
> locations.  Then this could be used to also simplify the syntax of
> other commands where branches/tags are used.  Of course there are a
> lot of devils in those details.
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2401706
Received on 2009-09-29 18:42:06 CEST

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