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

Re: [RFC/PATCH] Allow merge to apply only svn:mergeinfo diffs

From: Paul Burba <ptburba_at_gmail.com>
Date: Tue, 27 Oct 2009 09:37:30 -0400

On Tue, Oct 27, 2009 at 8:25 AM, Mark Phippard <markphip_at_gmail.com> wrote:
> On Thu, Oct 22, 2009 at 1:17 PM, Paul Burba <ptburba_at_gmail.com> wrote:
>
>> Committed r40190.  Only differences between that and the previously
>> posted patch are new help text on the --record-only option and a doc
>> string tweak for svn_client_merge3().
>
> Something I just thought of ... did you take care not to commit
> self-referential mergeinfo when applying these diffs?  A common
> use-case for --record-only is to use it after a reintegrate merge to
> record that revision on the source branch so that you do not have to
> delete it.

Mark,

This should not be a problem. Since we actually are doing an editor
drive, all the code that normally prevents self-referential mergeinfo
during a "normal" merge is still used. For example (using
trunk_at_40230):

# Make a change on a "branch"
>echo a change on a branch > A_COPY\mu

>svn ci -m ""
Sending A_COPY\mu
Transmitting file data .
Committed revision 8.

>svn up
At revision 8.

# Synch that "branch" with "trunk"
>svn merge ^^/A A_COPY --accept theirs-conflict
--- Merging r2 through r8 into 'A_COPY':
U A_COPY\B\E\beta
U A_COPY\D\G\rho
U A_COPY\D\H\omega
U A_COPY\D\H\psi

>svn pl -vR
Properties on 'A_COPY':
  svn:mergeinfo
    /A:2-8

>svn ci -m ""
Sending A_COPY
Sending A_COPY\B\E\beta
Sending A_COPY\D\G\rho
Sending A_COPY\D\H\omega
Sending A_COPY\D\H\psi
Transmitting file data ....
Committed revision 9.

>svn up
At revision 9.

# Reintegrate the "branch" back to "trunk"
>svn merge ^^/A_COPY A --reintegrate
--- Merging differences between repository URLs into 'A':
U A\mu

>svn ci -m ""
Sending A
Sending A\mu
Transmitting file data .
Committed revision 10.

>svn up
At revision 10.

# Now mark r10 as already merged from "trunk" to "branch"
# so we can continue merging in that direction without recreating
# "branch".
#
# r10 includes the self-referential mergeinfo '/A_COPY:r2-9' which
# should *not* be recorded...
>svn diff -r9:10 --depth empty ^^/A

Property changes on: .
___________________________________________________________________
Added: svn:mergeinfo
   Merged /A_COPY:r2-9

# ...and is not:
>svn merge ^^/A A_COPY --record-only -c10

>svn diff

Property changes on: A_COPY
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /A:r10

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411670
Received on 2009-10-27 14:37:43 CET

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