You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Eric Estievenart <er...@neolane.com> on 2013/07/05 19:28:30 UTC

Some sync merges no more allowed with 1.8 client ?

Hello there (and congrats for the release !),

I was about to directly file a bug but finally decided to go through the proper process...

As we are planning to move from 1.7 to 1.8, we already migrated a few clients
(not yet the server), and the following change, as I suspected, hit us:
* reject some attempts to merge between unrelated branches (r1215273)

Previous sync merges which were accepted in 1.7 are now forbidden in 1.8,
and there is no way to bypass the check.

With a 1.8 client (still on a 1.7 server), we now have errors like: 

svn: E205000: Try 'svn help merge' for more information
svn: E205000: Source and target must be different but related branches
svn: E205000: Source and target have no common ancestor: 'svn://myserver/app/v1@head' and '.@unspecified'
(Whereas the sync merge worked flawlessly with all 1.7 clients, with proper merge tracking).

I tried with --ignore-ancestry and/or --force options, without much success.
The only work-around was to perform the merge from a 1.7 client.

Of course the layout of the repository is historical and a bit complex;
I'll try to represent it here: (hoping you have a fixed font...)


/app/v2-dev                            /------------------
/app/v2-candidate                 /---/-------------------
/app/v2-stable               /---/------------------------
/v2                  /------/                         (no more used)
/app/v3-dev         /               /---------------------
/app/v3-candidate  /           /---/----------------------
/app/v3-stable    /        /--/---------------------------
                 /        /
/app/trunk      /  /-----/--------------------------------
/trunk      ---/--/                                  (no more used)
(largely eluded: less versions, no feature branches, etc.)

The sync merges which no more works are like:
/app/v2-dev => /app/v3-dev

As you can see, none is a direct ancestor of the other, but they share
a common one: /trunk (despite renamed as /app/trunk).
And this has been working perfectly with 1.7 for months, so we'd like to keep
she same process once we upgrade both the server and the clients to 1.8.

Few questions:
- How do you define unrelated branches ? For me v2-dev and v3-dev are related...
- Is this, as I suspect, a real bug/regression of r1215273, or are we out-of-spec ?
- If I should file a bug, do you need more infos ?
   I really don't think that detailed compiler options are needed,
   but I may provide a test script reproducing the issue.

If you need a better overview of our process, here are a few details:

Each supported version (v2 and v3) has 3 dedicated branches:
-stable is the official latest release version. Only urgent hotfixes are done here.
-candidate is for internal testing (by QA). Only regressions are fixed.
 Once fully tested/validated, it is reintegrated into -stable for release (and revived with a record-only)
-dev is for daily work, non-urgent fixes, features development (through branches).
 On beginning of cycles, it is reintegrated into -candidate (and revived with a record-only)

Hotfixes (from -stable) and regression fixes (from -candidate) are immediately
propagated upwards (to -candidate and -dev branches) so they also get tested by
all developers.
Changes from v2-dev are regularly propagated to v3-dev;
so are those from v3-dev to trunk.

Environment:
- server: debian 1.7.9-1+nmu1 (amd64)
- client: debian 1.8.0-1+WANdisco (amd64)

Sincerely
-- 
Eric


Re: Some sync merges no more allowed with 1.8 client ?

Posted by Branko Čibej <br...@wandisco.com>.
On 05.07.2013 19:28, Eric Estievenart wrote:
> Of course the layout of the repository is historical and a bit complex;
> I'll try to represent it here: (hoping you have a fixed font...)
>
>
> /app/v2-dev                            /------------------
> /app/v2-candidate                 /---/-------------------
> /app/v2-stable               /---/------------------------
> /v2                  /------/                         (no more used)
> /app/v3-dev         /               /---------------------
> /app/v3-candidate  /           /---/----------------------
> /app/v3-stable    /        /--/---------------------------
>                  /        /
> /app/trunk      /  /-----/--------------------------------
> /trunk      ---/--/                                  (no more used)
> (largely eluded: less versions, no feature branches, etc.)
>
> The sync merges which no more works are like:
> /app/v2-dev => /app/v3-dev
>
> As you can see, none is a direct ancestor of the other, but they share
> a common one: /trunk (despite renamed as /app/trunk).
> And this has been working perfectly with 1.7 for months, so we'd like to keep
> she same process once we upgrade both the server and the clients to 1.8.

Can you confirm that all the branches created by copying (svn copy) from
the source, as you've described in this diagram?

How were the /app/trunk and /app/v2-stable branches created? Are they
just renamed /trunk and /v2?

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com

RE: Some sync merges no more allowed with 1.8 client ?

Posted by Eric Estievenart <er...@neolane.com>.
On Mon, Jul 08, 2013 at 13:40, Stefan Sperling wrote:

> You could rewrite history, creating copyfrom pointers in old revisions.
> Create a new repository, create the common ancestor branch in the first commit, create the other branches as copies, and then replay your existing history on top of that using svnadmin dump/load.
> See http://svnbook.red-bean.com/en/1.7/svn.reposadmin.maint.html#svn.reposadmin.maint.migrate
> for more information.

Yep, I finished analyzing the problem.
There are 2-3 unconventional branches like:
r12345: A /app/version3
r12346: A /app/version3/feature1 (copy from /app/version2/feature1)
r12347: A /app/version3/feature2 (copy from /app/version2/feature2)
(Instead of a simple A /app/version3 (copy from /app/version2)
...
I' ll dump/load up to revision 12344, commit a proper copy, stuff 2-3 dummy revs to keep the same revision numbers,
and load the remaining after. This should go fine without too much trouble, while keeping history,
and maybe not invalidating working copies (I hope).

> The --ignore-ancestry switch also disables merge-tracking, which is not ideal in this case.
Indeed. That's not what we want !

> You could use the 2-URL merge syntax for the time being:
> svn merge ^/app/v2-dev@70081 ^/app/v2-dev@HEAD svn/v3-dev
> That should work since it won't trigger the new "automatic sync/reintegrate merge" logic in Subversion 1.8.
> However, it also requires you to keep track of the number of the revision number the v3 branch was last synced up to (r70081 in this example).
Of course, but it's tedious and error prone. We'll only use that if we can't find a better solution which properly tracks the mergeinfos.

--
Eric Estievenart

Re: Some sync merges no more allowed with 1.8 client ?

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Jul 08, 2013 at 11:30:28AM +0200, Eric Estievenart wrote:
> I'm currently investigating the details and implications of these horrors, but I feel we are a bit doomed.

You could rewrite history, creating copyfrom pointers in old revisions.

Create a new repository, create the common ancestor branch in the first
commit, create the other branches as copies, and then replay your existing
history on top of that using svnadmin dump/load.
See http://svnbook.red-bean.com/en/1.7/svn.reposadmin.maint.html#svn.reposadmin.maint.migrate
for more information.

That's an involved process. But it should fix your history and make 1.8
clients happy. It might also invalidate all existing working copies,
so everyone will need to run 'svn checkout' again...

> Daniel Shahaf wrote on Sat, Jul 06, 2013 at 18:00:
> > I believe '--ignore-ancestry' is supposed to override this particular check.
> 
> Well, I already tested that, with and without --force, without more success.

The --ignore-ancestry switch also disables merge-tracking, which is
not ideal in this case.

 
> > The code has changed on 1.8.x@HEAD since 1.8.0[1], so 1.8.1 will behave differently.  (It will probably just issue a different error message, since [1] claims that it didn't change the checks being done.)
> So I just compiled a svn (on trunk@1500602), and get the following errors:
> 
> $ svn --version
> .... svn, version 1.9.0-dev (under development) ....
> $ cd svn/v3-dev
> $ svn merge ^/app/v2-dev
> svn: E195016: 'svn://......./app/v2-dev@70081' must be ancestrally related to 'svn://......./app/v3-dev@70081'
> $ svn merge ^/app/v2-dev  --ignore-ancestry
> svn: E200004: Cannot merge automatically while ignoring mergeinfo
> 
> We'll continue our investigations, and keep you updated.

You could use the 2-URL merge syntax for the time being:

 svn merge ^/app/v2-dev@70081 ^/app/v2-dev@HEAD svn/v3-dev

That should work since it won't trigger the new "automatic
sync/reintegrate merge" logic in Subversion 1.8.
However, it also requires you to keep track of the number of the revision
number the v3 branch was last synced up to (r70081 in this example).

RE: Some sync merges no more allowed with 1.8 client ?

Posted by Eric Estievenart <er...@neolane.com>.
Branko Čibej wrote on Fri, 05 Jul 2013 22:12:34 GMT:
> Can you confirm that all the branches created by copying (svn copy) from the source, as you've described in this diagram?
Damn you are right. Some unexperimented people thought years ago that they were more clever than the system,
created empty folders at the branches root, and then copied some sub-folders into them...

So svn 1.8 reluctancy to do the merges seems legitimate in these cases.
I'm currently investigating the details and implications of these horrors, but I feel we are a bit doomed.

I fear we will have to rework the layout of our repository, in order to reset properly the branches ancestry.

Daniel Shahaf wrote on Sat, Jul 06, 2013 at 18:00:
> I believe '--ignore-ancestry' is supposed to override this particular check.

Well, I already tested that, with and without --force, without more success.

> The code has changed on 1.8.x@HEAD since 1.8.0[1], so 1.8.1 will behave differently.  (It will probably just issue a different error message, since [1] claims that it didn't change the checks being done.)
So I just compiled a svn (on trunk@1500602), and get the following errors:

$ svn --version
.... svn, version 1.9.0-dev (under development) ....
$ cd svn/v3-dev
$ svn merge ^/app/v2-dev
svn: E195016: 'svn://......./app/v2-dev@70081' must be ancestrally related to 'svn://......./app/v3-dev@70081'
$ svn merge ^/app/v2-dev  --ignore-ancestry
svn: E200004: Cannot merge automatically while ignoring mergeinfo

We'll continue our investigations, and keep you updated.

Thanks
-- 
Eric Estievenart

Re: Some sync merges no more allowed with 1.8 client ?

Posted by Daniel Shahaf <da...@elego.de>.
Eric Estievenart wrote on Fri, Jul 05, 2013 at 19:28:30 +0200:
> svn: E205000: Try 'svn help merge' for more information
> svn: E205000: Source and target must be different but related branches
> svn: E205000: Source and target have no common ancestor: 'svn://myserver/app/v1@head' and '.@unspecified'
> (Whereas the sync merge worked flawlessly with all 1.7 clients, with proper merge tracking).

I believe '--ignore-ancestry' is supposed to override this particular check.

The code has changed on 1.8.x@HEAD since 1.8.0[1], so 1.8.1 will behave
differently.  (It will probably just issue a different error message,
since [1] claims that it didn't change the checks being done.)

Daniel



[1] 
% $svn mergeinfo --show-revs=eligible ^/subversion/{branches/1.8.x,tags/1.8.0}/subversion/svn/merge-cmd.c --log
------------------------------------------------------------------------
r1495282 | svn-role | 2013-06-21 04:00:42 +0000 (Fri, 21 Jun 2013) | 14 lines

Merge r1493424 from trunk:

 * 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.
   Votes:
     +1: ivan, rhuijben, julianfoad
     +0: danielsh (note: svn_client__youngest_common_ancestor can be striken;
                         no callers left)