bzr status indentation of pending merges

Wesley J. Landaker wjl at icecavern.net
Sat Mar 8 02:27:31 GMT 2008


Hi folks,

Summary:

The display of pending merges when doing bzr status is somewhat
misleading/confusing, partly because of indentation, partly because of
the identification of revisions by their commit message.

Background:

I filed bug #199655 about this, under the impression that this was a
bug. The bug was closed as invalid because it was pointed out that this
actually was intentional. I now understand the reasoning behind this
decision, but I still think there is something lacking. It was
suggested that I should take this to the list, so here we go. =)

Details:

Here is a scenerio that happens all the time. I have a checkout from a
central branch. I then branch that checkout remotely, make a bunch of
changes, push them back to the checkout, and then at some point, go
back to the checkout, and run update. Now all of my pushed revisions
turn into pending merges. I review and commit, which (since this is a
checkout) pushse into the central branch as well. This is how it's all
supposed to work. So far so good, works like a charm!

The issue is that when I run 'bzr status', it seems sort of misleading.
For instance, I get something like:

(example from the bug I filed)
$ bzr status
modified:
  src/...
  src/...
  src/...
  src/...
unknown:
  src/...
  src/...
pending merges:
  Wesley J. Landaker 2008-03-07 Added informative message about ...
    Wesley J. Landaker 2008-03-07 Simpler naming for prebuild ...
    Wesley J. Landaker 2008-03-07 Interactive progarm now supports ...
    Wesley J. Landaker 2008-03-07 Refactored phase shifting ...
    Wesley J. Landaker 2008-03-07 Note that PSDONE is latched.

These are all completely orthogonal changes, but the way it's displayed
to the user, it seems to imply that the first listed merge is somehow
the parent of all the others. To emphasize this, imagine it looks
something like this (which is pretty common):

$ bzr status
modified:
  ...
pending merges:
  Wesley J. Landaker 2008-03-07 Whoops, fix typo.
    Wesley J. Landaker 2008-03-07 Update build system.
    Wesley J. Landaker 2008-03-07 Cool feature B.
    Wesley J. Landaker 2008-03-07 Cool feature A.

When looking at this, it makes it seem as though "Whoops, fix typo" is
some sort of master merge of build system updates and feature
implementations. But this is a different view of what I'd see if I
commit this, and then look at the log. After a merge, the log would
look like:

336 Master merge, with whatever comments I added.
  336.1.4 Whoops, fix typo.
  336.1.3 Update build system.
  336.1.2 Cool feature B.
  336.1.1 Cool feature A.

Now this is more clear that the typo fix is just the last in a sequence,
not the merge of anything.

Anyway, from the response I got in my original bug report, I think I
understand what this is intending to show. Basically, it's showing that
the revision that corresponds to "Whoops, fix typo" is the tip of the
sequence of revisions that is going to be merged. If there were
multiple indepedent *sequences* they would all be listed with similar
indentation, and it would be easy to tell them apart, e.g.:

pending merges:
  sequence #1 commit #3
    sequence #1 commit #2
    sequence #1 commit #1
  sequence #2 comment #2
    sequence #1 commit #1

I agree that that works to keep things delineated, but the problem in my
mind is that the indentation plus how the revisions are being
identified by their commit message. I know I have obviously been
confused about this output for the entire time I've ever used bzr, and
I'm not unfamiliar with VCS systems--I've been an early adopter on
SVN/monotone/darcs/git/hg (as you can see from my original bug report,
I thought it was just an output display bug).

Anyway, *I* now understand what's being displayed here, and why, so I
can live with it. But I wonder if this is confusing or potentially
confusing to anyone else, especially new users, and if there isn't an
easier way to show the same information without confusion.

For example (maybe a bad idea, just illustrating that there are
alternatives) add an astrisk on the first one in a sequence , instead
of indenting the rest:

pending merges:
  * sequence #1 commit #3
    sequence #1 commit #2
    sequence #1 commit #1
  * sequence #2 commit #2
    sequence #2 commit #1

In my mind, that would be much more illustrative of what is really going
to happen when I commit.

Anyway, I just want to throw this out for discussion or thought. It
doesn't bother me enough personally that I want to fight for a change.
I just hope you'll consider it. =)

-- 
Wesley J. Landaker <wjl at icecavern.net> <xmpp:wjl at icecavern.net>
OpenPGP FP: 4135 2A3B 4726 ACC5 9094  0097 F0A9 8A4C 4CD6 E3D2




More information about the bazaar mailing list