merge should show base always, or at least configurably

Bug #562669 reported by Jelmer Vernooij
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

It would be nice if Bazaar could provide the contents of a conflicting text region as they were in the base revision in addition to the contents in the THIS and OTHER revisions (where relevant). This can often be useful when resolving merge conflicts.

Revision history for this message
Martin Pool (mbp) wrote :

merge or remerge --show-base?

Perhaps this should be made more obvious in documentation or turned on by default when possible?

Changed in bzr:
status: New → Fix Released
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 562669] [NEW] provide base text in text conflicts

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jelmer Vernooij wrote:
> Public bug reported:
>
> It would be nice if Bazaar could provide the contents of a conflicting
> text region as they were in the base revision in addition to the
> contents in the THIS and OTHER revisions (where relevant). This can
> often be useful when resolving merge conflicts.
>
> ** Affects: bzr
> Importance: Undecided
> Status: New
>

You mean 'bzr merge --show-base' ?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvFM8gACgkQJdeBCYSNAAMLfwCg0Y9G7UnyOz5vCG+PNrU7V3bG
HpEAnR8mXhanTy7Fe8/j/bmEsqDvwFkG
=RUs4
-----END PGP SIGNATURE-----

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 562669] Re: provide base text in text conflicts

On Wed, 2010-04-14 at 00:37 +0000, Martin Pool wrote:
> merge or remerge --show-base?
>
> Perhaps this should be made more obvious in documentation or turned on
> by default when possible?
I was under the impression that this would just print the revision
number of the base revision. Obviously I was mistaken. :-)

It would be nice to have a configuration option for this, indeed
possibly defaulting to default. I can't think of a situation where I
would *not* want this.

Cheers,

Jelmer

Revision history for this message
Martin Pool (mbp) wrote :

An alias is not a good workaround because it clashes with --weave.

It sounds like the help needs to be better too.

summary: - provide base text in text conflicts
+ merge should show base always, or at least configurably
Changed in bzr:
status: Fix Released → Confirmed
importance: Undecided → Medium
tags: added: config easy merge
Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/14/2010 12:03 PM, Jelmer Vernooij wrote:

> It would be nice to have a configuration option for this, indeed
> possibly defaulting to default. I can't think of a situation where I
> would *not* want this.

You might not want it because it is incompatible with --reprocess, and
you might want that instead.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvXnZcACgkQ0F+nu1YWqI1s4QCfW7pcJMZjsjWJI/T3Yalu2eSQ
wZsAn0iFjV4jJlLXn/db5w6e2h5y7YHe
=Z7gS
-----END PGP SIGNATURE-----

Revision history for this message
Robert Collins (lifeless) wrote :

Would having --reprocess turn it off be sufficient?

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> Would having --reprocess turn it off be sufficient?
>

At the moment we default to --reprocess being on, because it generally
provides a more sane region of conflict. If you supply --show-base then
we disable --reprocess. If you supply both, then it complains.

In general, I find --reprocess more useful than --show-base, which is
why we defaulted that way.

The specifics as to why --reprocess and --show-base are incompatible.
Specifically, --reprocess finds common regions in THIS and OTHER in the
conflicted areas. But those are not common to BASE otherwise it would
not have conflicted.

Imagine:

BASE: abc
THIS: adefc
OTHER: axefyc

In this case merge will give:

a
<<<<
d
e
f
=====
x
e
f
y
>>>>>
c

- --reprocess will give

a
<<<<
d
=====
x
>>>>>
e
f
<<<<<
=====
y
>>>>>
c

Show base would give:
a
<<<<
d
e
f
|||||
b
=====
x
e
f
y
>>>>>
c

But where does 'b' go after --reprocess?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvYpKUACgkQJdeBCYSNAAP0AgCgsYFud7QDminijJXrNLBMsC4B
wxsAn2PQy4VVxd/Oc7gS31AZ9Jt9w8a6
=yWua
-----END PGP SIGNATURE-----

Revision history for this message
Vincent Ladeuil (vila) wrote :

'b' disappears because it's not involved in a conflict anymore.

So --reprocess --show-base could give:

a
<<<<
d
|||||
=====
x
>>>>>
e
f
<<<<<
|||||
=====
y
>>>>>
c

Revision history for this message
Stefan Monnier (monnier) wrote :

FWIW, I much prefer the --show-base output because it's easy to go from the --show-base output to the --reprocess output (e.g. you can do that with Emacs's smerge-mode), whereas the reverse is simply impossible (that is, without doing the equivalent of re-merging).

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.