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

Re: Diff shows added svn:mergeinfo prop as lots of new merges

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Mon, 12 Sep 2011 15:33:18 +0100

On Mon, 2011-09-12 at 10:00 -0400, Mark Phippard wrote:
> On Mon, Sep 12, 2011 at 9:50 AM, Julian Foad <julian.foad_at_wandisco.com> wrote:
> >> If merge brought in legitimate
> >> > changes to the svn:mergeinfo property. diff is supposed to show the
> >> > changes, and those are changes.
> >
> > I said this is a choice, and that if we want to display raw changes to
> > the property then that is a valid alternative but then we shouldn't be
> > using the terminology "Merged: xxx" to describe the change when "xxx"
> > was not in fact merged.
> >
> > Certainly the trivial way to close this "issue" is just to change the
> > wording of the currently displayed messages.
>
> I think this is where we differ.
>
> Suppose you merge some changes from /branch1 to /branch2 and commit in r100.

Here's how this looks in a simple test with 1.7.0-rc2. (My r5 is your
r100.)

$ svn merge ^/branch1 branch2
--- Merging r2 through r4 into 'branch2':
A branch2/D
--- Recording mergeinfo for merge of r2 through r4 into 'branch2':
 U branch2
$ svn ci -m ""
Sending branch2
Adding branch2/D

Committed revision 5.

> Now you merge r100 into /branch3.

$ svn up
Updating '.':
At revision 5.
$ svn merge ^/branch2 branch3
--- Merging r3 through r5 into 'branch3':
A branch3/D
 U branch3
--- Recording mergeinfo for merge of r3 through r5 into 'branch3':
 G branch3

> The mergeinfo from this merge will indicate that you merged r100 from
> /branch2 but it will also contain the mergeinfo from the merge of
> branch1 into branch2.

$ svn diff
Index: branch3
===================================================================
--- branch3 (revision 5)
+++ branch3 (working copy)

Property changes on: branch3
___________________________________________________________________
Added: svn:mergeinfo
   Merged /branch1:r2-4
   Merged /branch2:r3-5

> I think this is correct and worth showing in
> the diff output.

I agree that it's useful and necessary to see the merge described as
coming from both branch1 and branch2. Did I write something that seemed
to say otherwise?

> I also do not really know how you could display it
> differently after the fact.

Like this, for example:

$ svn diff
Index: branch3
===================================================================
--- branch3 (revision 5)
+++ branch3 (working copy)

Property changes on: branch3
___________________________________________________________________
Added: svn:mergeinfo

Mergeinfo differences
===================================================================
Changes merged to 'branch3':
   Merged /branch1:r2-4
   Merged /branch2:r3-5

> Is it possible that this is sometimes confusing? Sure. But that does
> not mean it is wrong and as we have all pointed out in this thread,
> this has not exactly been a problem people seem to be reporting or
> experiencing.

I am interested in this because it represents a significant *part* of a
bigger problem that I am currently getting my teeth into, which is
trying to describe merges to our users in an understandable way. I
repeat: I agree this particular piece of UI output is not one that users
have complained about specifically. The point is, it is important to me
that we have ways to communicate such things effectively. I want to be
able to have a way of describing the merge, and then present that
description in not just here in 'diff' but for example in some revised
form of the 'svn mergeinfo' command or wherever we decide to do it, but
we ought to be able to do it somewhere, and discussing how it would work
is a good way to get there.

- Julian
Received on 2011-09-12 16:34:22 CEST

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