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

Re: Detecting merges

From: Russ Brown <pickscrape_at_gmail.com>
Date: 2005-06-16 01:02:16 CEST

Olivier Sannier wrote:
> Russ Brown wrote:
>
>> Hello,
>>
>> Is there any way (other than depending on developers providing
>> parsable commit logs) of detecting at the hook stage whether a given
>> commit contains a merge or not?
>>
>> What I want to be able to do is set a revision property automatically
>> in such cases, which I intend to use in other scripts for helping to
>> calculate required merges (among other things).
>>
> Maybe I'm being stupid here, but don't all commits contain a merge?
> I mean, if I commit something, it's a change to the file, hence, a merge
> is required to get this change.
> Or maybe you have another meaning for the word "merge" which I'm not
> getting here.
>

That is technically true, in that any commit consists of the original
files merged with changes from the working copy. However, what I'm
specifically talking about is a commit that consists of the original
files in the working copy merged with changes brought about by
subversion's 'merge' command. i.e, a merge from branch to trunk, or
merge from trunk to branch etc.

As Ben has already pointed out, that's simply not currently possible,
which is a shame. In that case, the only solutions I can think of are
for a hook script to detect the merge from the commit comment, or by the
user explicitly declaring a commit by some interface; both of which are
prone to the user forgetting.

I fully understand the complexities in the 'full merge tracking'
problem. That being the case, how hard would it be to make Subversion
set a boolean revprop on revisions that contain 'a merge of some sort'?
 From what I can figure, that would require the 'merge' command leaving
some sort of trace for 'commit' to pick up and apply to the revision.
That trace would clearly need to be 'reverted' once all merged-files had
been reverted.

I realise that wouldn't be a proper merge tracking feature, but it would
be immediately useful in a number of situations right now.

Thanks.

> Cheers
> Olivier
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 16 01:03:57 2005

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