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

Re: Tweaking 1.5.x's Mergeinfo (Was: svn commit: r30390 - branches/1.5.x)

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Wed, 09 Apr 2008 10:53:19 -0400

Hyrum K. Wright wrote:
>> Hyrum - any thoughts as to what happened? I recall in IRC you were
>> had some questions about how exactly to merge the 1.5.x-r30215 branch
>> to 1.5.x. What did you ultimately end up doing?
> After a couple of failed attempts, the command I ultimately ended up
> running was:
> $ svn merge -c 30236,30238,30245,30288
> https://svn.collab.net/repos/svn/branches/1.5.x-r30215

I cut the 1.5.x-r30215 branch from the 1.5.x branch. You should have needed
only to do:

    svn merge https://svn.collab.net/repos/svn/branches/1.5.x-r30215 \

I tried to replay this scenario (which ought to be time-safe, right?), but I
got an error:

$ cd projects/subversion-1.5.x
$ svn merge http://svn.collab.net/repos/svn/branches/1.5.x-r30215@30348 .
subversion/libsvn_ra_neon/util.c:711: (apr_err=160013)
svn: File not found: revision 30447, path '/branches/1.5.x-r30215'

'svn help merge' contains this:

        3. merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [WCPATH]
   3. In the third form, SOURCE can be either a URL or a working copy
      path (in which case its corresponding URL is used). SOURCE (in
      revision REV) is compared as it existed between revisions N and M
      for each revision range provided. If REV is not specified, HEAD
      is assumed. '-c M' is equivalent to '-r <M-1>:M', and '-c -M'
      does the reverse: '-r M:<M-1>'. If no revision ranges are
      specified, the default range of 0:HEAD is used. Multiple '-c'
      and/or '-r' instances may be specified, and mixing of forward
      and reverse ranges is allowed.

Maybe I got bit by the default range of 0:HEAD? That's a stupid default, by
the way, and inconsistent with our policy of allowing specified peg
revisions dictate the upper bound on the operative revision range. But
anyway, I tried with the obvious workaround:

$ svn merge http://svn.collab.net/repos/svn/branches/1.5.x-r30215@30348 . \
subversion/libsvn_ra_neon/util.c:711: (apr_err=160013)
svn: Working copy path 'CHANGES' does not exist in repository

Ooookay. Well, I'll use 'svn log' to find a real range, then.

$ svn log -q --stop-on-copy \
       http://svn.collab.net/repos/svn/branches/1.5.x-r30215@30348 \
   | grep '^r' | tail -1
r30222 | cmpilato | 2008-04-03 13:38:30 -0400 (Thu, 03 Apr 2008)

(Sidebar: 'svn help log' indicates that HEAD:1 is the default revision
range even when a peg revision to the URL is supplied. Clearly, that's a
lie. How many bugs are we up to now?)

Anyway, back to using a real range for this merge:

$ svn merge http://svn.collab.net/repos/svn/branches/1.5.x-r30215@30348
-r30222:30348 .
--- Merging r30223 through r30348 into '.':
U subversion/include/svn_client.h
U subversion/libsvn_client/util.c
U subversion/libsvn_client/mergeinfo.c
U subversion/tests/cmdline/mergeinfo_tests.py
U subversion/tests/cmdline/svntest/actions.py
D subversion/tests/cmdline/svntest/parsers.py
U subversion/svn/cl.h
U subversion/svn/mergeinfo-cmd.c
U subversion/svn/util.c
U subversion/svn/main.c
  G .
$ svn st
  M .
M subversion/include/svn_client.h
M subversion/libsvn_client/util.c
M subversion/libsvn_client/mergeinfo.c
M subversion/tests/cmdline/mergeinfo_tests.py
D subversion/tests/cmdline/svntest/parsers.py
M subversion/tests/cmdline/svntest/actions.py
M subversion/svn/cl.h
M subversion/svn/mergeinfo-cmd.c
M subversion/svn/util.c
M subversion/svn/main.c
$ svn diff --depth empty

Property changes on: .
Modified: svn:mergeinfo
    Reverse-merged /branches/svn-mergeinfo-enhancements:r30122
    Merged /trunk:r30215,30221,30225-30226,30230,30243,30286
    Merged /branches/1.5.x-r30215:r30223-30348
    Merged /branches/svn-mergeinfo-enhancements:r30045-30121,30123-30214

Oh boy. That's all so very not good. My guess? The svn:mergeinfo property
actually stored on the backport branch first blew away the one stored on in
the 1.5.x branch, and then was modified to include the current merge operation.

C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-04-09 16:53:33 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.