You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Johan Corveleyn <jc...@gmail.com> on 2013/06/20 03:45:58 UTC

Merging unrelated branches - release notes

The checks that protect the user from accidentally merging unrelated
branches (also used for the mergeinfo command IIRC): are these new in
1.8? Are these mentioned somewhere in the release notes? I can't seem
to find anything about this.

--
Johan

Re: Merging unrelated branches - release notes

Posted by Johan Corveleyn <jc...@gmail.com>.
On Thu, Jun 20, 2013 at 4:53 PM, C. Michael Pilato <cm...@collab.net> wrote:
> On 06/20/2013 09:24 AM, Johan Corveleyn wrote:
>> I think this is an important change (improvement) that deserves
>> mention in the release notes, rather than being burried in the huge
>> CHANGES list. WANdisco even put it in their announcement mail
>> "WANdisco offers Apache Subversion 1.8" (as one of five items they
>> considered important enough to mention explicitly).
>>
>> Just my 0.02 €
>
> Let's evaluate the change on its own merits, please, not on the basis of
> some company's marketing fluff.  It's not uncommon in press releases to see
> even the littlest things billed as more world-changing than they really are,
> and I daresay WANdisco's Marketing folks aren't unique in this respect.

Agreed. I just added that marketing mention as a random data point to
illustrate that some folks consider this important (and it reminded me
of the feature myself actually). But I agree that it's significant
enough in its own right, making abstraction of any marketing ... (and
that that's the only thing that matters).

--
Johan

Re: Merging unrelated branches - release notes

Posted by Julian Foad <ju...@btopenworld.com>.
Daniel Shahaf wrote:

> On Thu, Jun 20, 2013 at 09:55:20PM +0100, Julian Foad wrote:
>>  It's checked in 'svn' first, and if you call the client layer
>> directly then the requirement is still there but you'll get a
>> lower level  error for it, [...]
>> 
>>  (The check in 'svn' appears to have been removed in trunk already,
>> since branching 1.8.x, probably as part of efficiency improvements.)
> 
> Are you talking about r1493424?  That revision is nominated for backport:
> 
> * r1493424
>    Remove unnecessary check for branches ancestry from
>    command line client. All required checks are already performed in
>    libsvn_client.
>    Justification:
>      There is no reason to command line and third-party use different
>      codepath for ancestory checks. Simple performance fix.
> 
> I voted +0 on that since I agree with the rationale that 'svn' should not
> perform validations that libsvn_client does (that avoids code duplication).

Yes, that would be it.  I've now voted for that as well.

- Julian

Re: Merging unrelated branches - release notes

Posted by Daniel Shahaf <da...@apache.org>.
On Thu, Jun 20, 2013 at 09:55:20PM +0100, Julian Foad wrote:
> Johan Corveleyn wrote:
> 
> > On Thu, Jun 20, 2013 at 7:27 PM, C. Michael Pilato <cm...@collab.net> 
> > wrote:
> >>  On 06/20/2013 12:21 PM, Julian Foad wrote:
> >>>  I'll add it to the "Command-line client improvements (client)" section.
> >>> 
> >>>  How about this patch?
> >> 
> >>  +1
> 
> Committed in r1495180.
> 
> > Is this a command-line only change? This is only enforced by 'svn' and
> > not in the client layer?
> 
> It's checked in 'svn' first, and if you call the client layer directly then the requirement is still there but you'll get a lower level error for it, something like this:
> 
> subversion/svn/util.c:548,
> subversion/libsvn_client/merge.c:11822,
> subversion/libsvn_client/merge.c:12590,
> subversion/libsvn_client/merge.c:12412: (apr_err=SVN_ERR_CLIENT_NOT_READY_TO_MERGE)
> svn: E195016: 'https://.../subversion@1495063' must be ancestrally related to 'https://.../subversion/trunk@1495063'
> 
> (The check in 'svn' appears to have been removed in trunk already, since branching 1.8.x, probably as part of efficiency improvements.)

Are you talking about r1493424?  That revision is nominated for backport:

 * r1493424
   Remove unnecessary check for branches ancestry from
   command line client. All required checks are already performed in
   libsvn_client.
   Justification:
     There is no reason to command line and third-party use different
     codepath for ancestory checks. Simple performance fix.

I voted +0 on that since I agree with the rationale that 'svn' should not
perform validations that libsvn_client does (that avoids code duplication).

Daniel

Re: Merging unrelated branches - release notes

Posted by Julian Foad <ju...@btopenworld.com>.
Johan Corveleyn wrote:

> On Thu, Jun 20, 2013 at 7:27 PM, C. Michael Pilato <cm...@collab.net> 
> wrote:
>>  On 06/20/2013 12:21 PM, Julian Foad wrote:
>>>  I'll add it to the "Command-line client improvements (client)" section.
>>> 
>>>  How about this patch?
>> 
>>  +1

Committed in r1495180.

> Is this a command-line only change? This is only enforced by 'svn' and
> not in the client layer?

It's checked in 'svn' first, and if you call the client layer directly then the requirement is still there but you'll get a lower level error for it, something like this:

subversion/svn/util.c:548,
subversion/libsvn_client/merge.c:11822,
subversion/libsvn_client/merge.c:12590,
subversion/libsvn_client/merge.c:12412: (apr_err=SVN_ERR_CLIENT_NOT_READY_TO_MERGE)
svn: E195016: 'https://.../subversion@1495063' must be ancestrally related to 'https://.../subversion/trunk@1495063'

(The check in 'svn' appears to have been removed in trunk already, since branching 1.8.x, probably as part of efficiency improvements.)

- Julian

Re: Merging unrelated branches - release notes

Posted by Johan Corveleyn <jc...@gmail.com>.
On Thu, Jun 20, 2013 at 7:27 PM, C. Michael Pilato <cm...@collab.net> wrote:
> On 06/20/2013 12:21 PM, Julian Foad wrote:
>> I'll add it to the "Command-line client improvements (client)" section.
>>
>> How about this patch?
>
> +1

Is this a command-line only change? This is only enforced by 'svn' and
not in the client layer?

--
Johan

Re: Merging unrelated branches - release notes

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 06/20/2013 12:21 PM, Julian Foad wrote:
> I'll add it to the "Command-line client improvements (client)" section.
> 
> How about this patch?

+1


-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Re: Merging unrelated branches - release notes

Posted by Julian Foad <ju...@btopenworld.com>.
C. Michael Pilato wrote:
> On 06/20/2013 09:24 AM, Johan Corveleyn wrote:
>>  I think this is an important change (improvement) that deserves
>>  mention in the release notes, rather than being burried in the huge
>>  CHANGES list. [...]
> 
> [...]
> 
> I agree that the feature is a good one to highlight.  Top 5 in the release?
> Puh-lease.  But it certainly deserves a release note mention, if only
> because it's a behavior change that someone might be counting on continuing
> to work.  Maybe they created a branch in the past as a parallel import
> instead of via the 'svn copy' construct, and have been merging just fine
> between that branch and another -- in 1.7, that seems to have worked fine:
[...]

OK, that sounds reasonable.  Thanks for pointing it out.  I'll add it to the "Command-line client improvements (client)" section.

How about this patch?

[[[
Index: publish/docs/release-notes/1.8.html
===================================================================
--- publish/docs/release-notes/1.8.html    (revision 1494993)
+++ publish/docs/release-notes/1.8.html    (working copy)
@@ -1863,6 +1863,28 @@

 </div>  <!-- svn-log-search -->

+<div class="h4" id="svn-merge-check-related">
+<h4>'svn merge' will refuse to merge from an unrelated branch
+  <a class="sectionlink" href="#svn-merge-check-related"
+    title="Link to this section">&para;</a>
+</h4>
+
+<p>The <tt>svn merge</tt> command without a revision range
+now checks that the source branch is related to the target branch, and
+fails if not. Branches are 'related' if their histories, when traced
+back following copies, eventually arrive at the same node. One useful
+case is when an automatic merge is attempted from the wrong level of
+subdirectory in an otherwise related branch. Example:</p>
+<pre>$ svn merge ^/trunk branch-wc/subdir
+svn: E205000: Source and target must be different but related branches
+svn: E205000: Source and target have no common ancestor: 'https://.../trunk@head' and 'branch-wc/subdir@unspecified'
+</pre>
+
+<p>It is still possible to merge from an unrelated branch by specifying a
+revision range, even a catch-all range such as <tt>1:HEAD</tt>.</p>
+
+</div>  <!-- svn-merge-check-related -->
+
 </div>  <!-- cmdline -->

 <div class="h3" id="custom-keywords">
]]]

- Julian


Re: Merging unrelated branches - release notes

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 06/20/2013 09:24 AM, Johan Corveleyn wrote:
> I think this is an important change (improvement) that deserves
> mention in the release notes, rather than being burried in the huge
> CHANGES list. WANdisco even put it in their announcement mail
> "WANdisco offers Apache Subversion 1.8" (as one of five items they
> considered important enough to mention explicitly).
> 
> Just my 0.02 €

Let's evaluate the change on its own merits, please, not on the basis of
some company's marketing fluff.  It's not uncommon in press releases to see
even the littlest things billed as more world-changing than they really are,
and I daresay WANdisco's Marketing folks aren't unique in this respect.

I agree that the feature is a good one to highlight.  Top 5 in the release?
 Puh-lease.  But it certainly deserves a release note mention, if only
because it's a behavior change that someone might be counting on continuing
to work.  Maybe they created a branch in the past as a parallel import
instead of via the 'svn copy' construct, and have been merging just fine
between that branch and another -- in 1.7, that seems to have worked fine:

{{{
$ svn export A Z
A    Z/B
A    Z/B/lambda
A    Z/B/E
[...]
A    Z/D/H/chi
A    Z/D/H/omega
A    Z/D/H/psi
Export complete.
$ svn add Z
A         Z
A         Z/mu
A         Z/B
[...]
A         Z/D/H/chi
A         Z/D/H/omega
A         Z/D/H/psi
$ svn ci -m ""
Adding         Z
Adding         Z/B
Adding         Z/B/E
[...]
Adding         Z/D/H/psi
Adding         Z/D/gamma
Adding         Z/mu
Transmitting file data ...........
Committed revision 2.
$ echo "foo" >> A/mu
$ svn ci -m ""
Sending        A/mu
Transmitting file data .
Committed revision 3.
$ svn merge ^/A Z
--- Merging r2 through r3 into 'Z':
U    Z/mu
--- Recording mergeinfo for merge of r2 through r3 into 'Z':
 U   Z
$ svn diff
Index: Z
===================================================================
--- Z	(revision 1)
+++ Z	(working copy)

Property changes on: Z
___________________________________________________________________
Added: svn:mergeinfo
   Merged /A:r2-3
Index: Z/mu
===================================================================
--- Z/mu	(revision 2)
+++ Z/mu	(working copy)
@@ -1 +1,2 @@
 This is the file 'mu'.
+foo
$
}}}

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development


Re: Merging unrelated branches - release notes

Posted by Johan Corveleyn <jc...@gmail.com>.
On Thu, Jun 20, 2013 at 3:03 PM, Julian Foad <ju...@btopenworld.com> wrote:
> C. Michael Pilato wrote:
>
>> On 06/19/2013 09:45 PM, Johan Corveleyn wrote:
>>>  The checks that protect the user from accidentally merging unrelated
>>>  branches (also used for the mergeinfo command IIRC): are these new in
>>>  1.8? Are these mentioned somewhere in the release notes? I can't seem
>>>  to find anything about this.
>>
>> This does appear to be new in 1.8.  At least, my 1.7 client doesn't complain
>> about merges between non-related directories.
>
> Yes, I added the checks for 1.8.
>
> It's mentioned in CHANGES under "Minor new features and improvements (client-side)" as "reject some attempts to merge between unrelated branches (r1215273)".
>
> It's not mentioned in the release notes.

I think this is an important change (improvement) that deserves
mention in the release notes, rather than being burried in the huge
CHANGES list. WANdisco even put it in their announcement mail
"WANdisco offers Apache Subversion 1.8" (as one of five items they
considered important enough to mention explicitly).

Just my 0.02 €
--
Johan

Re: Merging unrelated branches - release notes

Posted by Julian Foad <ju...@btopenworld.com>.
C. Michael Pilato wrote:

> On 06/19/2013 09:45 PM, Johan Corveleyn wrote:
>>  The checks that protect the user from accidentally merging unrelated
>>  branches (also used for the mergeinfo command IIRC): are these new in
>>  1.8? Are these mentioned somewhere in the release notes? I can't seem
>>  to find anything about this.
> 
> This does appear to be new in 1.8.  At least, my 1.7 client doesn't complain
> about merges between non-related directories.

Yes, I added the checks for 1.8.

It's mentioned in CHANGES under "Minor new features and improvements (client-side)" as "reject some attempts to merge between unrelated branches (r1215273)".

It's not mentioned in the release notes.

- Julian

Re: Merging unrelated branches - release notes

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 06/19/2013 09:45 PM, Johan Corveleyn wrote:
> The checks that protect the user from accidentally merging unrelated
> branches (also used for the mergeinfo command IIRC): are these new in
> 1.8? Are these mentioned somewhere in the release notes? I can't seem
> to find anything about this.

This does appear to be new in 1.8.  At least, my 1.7 client doesn't complain
about merges between non-related directories.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development