[MERGE] Fix bug #248427 by adding a --change option to log.

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Sep 25 08:20:33 BST 2008


>>>>> "john" == John Arbash Meinel <john at arbash-meinel.com> writes:

    john> James Westby wrote:
    >> On Wed, 2008-09-24 at 15:48 +0200, Vincent Ladeuil wrote:
    >>> Aaron said:
    >>> > log uses an inclusive set, so log -r 1..2 displays the log
    >>> > messages for revisions 1 and 2. diff -r 1..2 displays only the
    >>> > changes introduced by 2. diff -c 2 is equivalent to "diff -r
    >>> > 1..2".
    >>> 
    >>> In order to be consistent, from an *UI* POV, log -c 2 should
    >>> therefore display the logs for revision 2 only.
    >>> 
    >>> That requires defining a 'change' option *specific* to log.
    >> 
    >> Can we make log exclusive so that the inconsistency with diff
    >> is removed?
    >> 
    >> It would break compatibility with old versions, and would mean
    >> that we would have to decide what to do with "bzr log -rx"
    >> 

With this patch 'bzr log -c n' == 'bzr log -r n'. Syntactic
sugar, really.

    >> I don't see why it has to be inclusive, and there have been
    >> a few requests for some way to make it exclusive. "before:"
    >> would allow you to make it inclusive much more easily than
    >> it is to make the current one exclusive as well I believe.
    >> 
    >> Thanks,
    >> 
    >> James
    >> 
    >> 
    >> 

    john> I've considered doing that. Though in this particular
    john> case, it is actually going to cause the opposite effect
    john> for elmo et al.

    john> Specifically, if I was implementing "bzr log -c" (in
    john> exclusive mode). I would show the log of the revision,
    john> *and* the log of all merged revisions.

That's what this patch does.

    john> Which sounds explicitly like what elmo does not
    john> want. 

Including or excluding merged revisions sounds like a log option
actually handled by the log formatters, not something tied to the
revision range.

    john> He wants to only see the log of the specific
    john> revision. Which is also what Scott seemed to be asking
    john> for.

This relates to the '[RFC] How various commands display
revisions' thread: do we want to give a better control to the
user and how.

As of today, if you don't want to see the merged revisions, you
need to use a format that doesn't show them: --line or --short.

The patch having been approved, I'll merge it, but IMHO, we
should continue to discuss the matter, and the thread mentioned
above sounds like a good place :D

    Vincent



More information about the bazaar mailing list