You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Paul Burba <pt...@gmail.com> on 2010/09/09 16:56:28 UTC

[RFC] 'base' is what in --accept=base?

What do we expect 'svn merge --accept=base' to do when encountering
text conflicts?

While checking up on an old open issue
(http://subversion.tigris.org/issues/show_bug.cgi?id=3514) I was
surprised to find that "base" doesn't refer to the base of the merge
target, but rather the base of the merge source (i.e. the left side of
the merge).  For example:

(Example done with trunk@995460)

  >svn up
  At revision 7.

# Here is our merge target:

  >svn cat A_COPY\D\H\psi
  Branch content.

# Here is the conflicting change we are going to merge:

  >svn cat A\D\H\psi@2
  This is the file 'psi'.

  >svn cat A\D\H\psi@3
  New content

# Do the merge, requesting conflicts be resolved to base:

  >svn merge ^^/A A_COPY -c3 --accept base
  --- Merging r3 into 'A_COPY':
  U    A_COPY\D\H\psi
  --- Recording mergeinfo for merge of r3 into 'A_COPY':
   U   A_COPY

# The resolution chooses the "base" of the left side of the merge.

  >svn diff A_COPY\D\H\psi
  Index: A_COPY/D/H/psi
  ===================================================================
  --- A_COPY/D/H/psi      (revision 7)
  +++ A_COPY/D/H/psi      (working copy)
  @@ -1 +1 @@
  -BASE.
  +This is the file 'psi'.

Is this correct?  Or should A_COPY/D/H/psi be at its *own* base,
'Branch content.'?

svn merge --accept base has *never* worked in 1.5 or 1.6 (it segfaults
or throws an error) and there hasn't exactly been an uproar, so I
doubt many people are using this option; regardless I'd like it to
DTRT.

Paul

RE: [RFC] 'base' is what in --accept=base?

Posted by Bert Huijben <be...@vmoo.com>.

> -----Original Message-----
> From: Paul Burba [mailto:ptburba@gmail.com]
> Sent: donderdag 9 september 2010 18:56
> To: Subversion Development
> Subject: [RFC] 'base' is what in --accept=base?
> 
> What do we expect 'svn merge --accept=base' to do when encountering
> text conflicts?

(Guessing: )I think this was invented with the update/switch scenario, where you have a BASE version specifying the BASE version before the update started. (The real BASE version (in wc-db) is already bumped to the theirs version at that point.)

In that case it makes sense to call it base (vs mine vs theirs) or maybe older, but svn_client_*merge* uses the libsvn_wc merge code in a different way.

	Bert