[RFC] Should bzr log -rA show parent/children of A

Marius Kruger amanic at gmail.com
Tue Jul 7 18:15:51 BST 2009


hi,

(my parent/children terminology my be wrong here)

---------- Forwarded message ----------
From: Marius Kruger <amanic at gmail.com>
Date: 2009/7/7
Subject: [Bug 325618] Re: bzr log -rA..B returns more revisions than expected

After spending a lot of time debugging this, I'm not 100% sure we want
to fix this any more.
If I understand correctly, the behaviour you see is because when we
show the log of the specified revisions, we show everything up to just
before we hit the mainline (the left parent).
So if we want to fix this, we need to stop logging revisions once we
hit the 'last revision' which could be implicitly specified by example
`bzr log  -n0 -r-2` which would currently display something like:
revno: 4510 [merge]
   revno: 4509.1.1

If we stop logging at rev -2 which is 4510,
`bzr log  -n0 -r-2` would now only show:
revno: 4510 [merge]

If you would like to see 4509.1.1, you would need to do so something like:
`bzr log  -n0 -r-3..-2`
revno: 4510 [merge]
   revno: 4509.1.1
revno: 4509 [merge]

or `bzr log  -n0 -r4509.1.1..-2`
revno: 4510 [merge]
   revno: 4509.1.1

So do we want this?


** Changed in: bzr
      Status: New => In Progress

--
bzr log -rA..B returns more revisions than expected
https://bugs.launchpad.net/bugs/325618
You received this bug notification because you are a member of bzr-core,
which is subscribed to Bazaar.

Status in Bazaar Version Control System: In Progress

Bug description:
A recent change (between bzr 1.11 and r3980) has broken the range
limits on bzr log.
For example using bzr 1.11:

$ bzr log -r3955.2.1..3967
------------------------------------------------------------
revno: 3967
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-01-28 17:40:48 +0000
message:
 (vila, jam) Make merge_content lca aware
   ------------------------------------------------------------
   revno: 3966.1.1
   committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
   branch nick: bzr.integration
   timestamp: Wed 2009-01-28 15:27:39 +0100
   message:
     Make merge_content lca aware
   ------------------------------------------------------------
   revno: 3948.1.7
   committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
   branch nick: spurious-conflicts
   timestamp: Fri 2009-01-23 22:06:48 +0100
   message:
     Slight refactoring and test fixing.

     * bzrlib/tests/test_merge.py:
     (TestMergerEntriesLCAOnDisk.test_modified_symlink): Passing now.

     * bzrlib/merge.py:
     (Merge3Merger._lca_multi_way): Fix doc reference.
     (Merge3Merger.merge_contents.contents_conflict): Try to delay
     this_pair evaulation to avoid unnecessary sha1 (impyling file read
     from disk) calculation. Also slightly refactor to avoid repeated
     file_id in trees calculations.
   ------------------------------------------------------------
   revno: 3948.1.6
   committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
   branch nick: spurious-conflicts
   timestamp: Fri 2009-01-23 20:45:02 +0100
   message:
     Remerge jam fix and its ancestry
       ------------------------------------------------------------
       revno: 3955.2.1
       committer: John Arbash Meinel <john at arbash-meinel.com>
       branch nick: jam-integration
       timestamp: Fri 2009-01-23 10:54:53 -0600
       message:
         Change the workings of merge_content to be lca aware.

but for bzr.dev r3980 returns:

$ bzr log -r3955.2.1..3967
------------------------------------------------------------
revno: 3967
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-01-28 17:40:48 +0000
message:
 (vila, jam) Make merge_content lca aware
   ------------------------------------------------------------
   revno: 3966.1.1
   committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
   branch nick: bzr.integration
   timestamp: Wed 2009-01-28 15:27:39 +0100
   message:
     Make merge_content lca aware
   ------------------------------------------------------------
   revno: 3948.1.7
   committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
   branch nick: spurious-conflicts
   timestamp: Fri 2009-01-23 22:06:48 +0100
   message:
     Slight refactoring and test fixing.

     * bzrlib/tests/test_merge.py:
     (TestMergerEntriesLCAOnDisk.test_modified_symlink): Passing now.

     * bzrlib/merge.py:
     (Merge3Merger._lca_multi_way): Fix doc reference.
     (Merge3Merger.merge_contents.contents_conflict): Try to delay
     this_pair evaulation to avoid unnecessary sha1 (impyling file read
     from disk) calculation. Also slightly refactor to avoid repeated
     file_id in trees calculations.
   ------------------------------------------------------------
   revno: 3948.1.6
   committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
   branch nick: spurious-conflicts
   timestamp: Fri 2009-01-23 20:45:02 +0100
   message:
     Remerge jam fix and its ancestry
       ------------------------------------------------------------
       revno: 3955.2.1
       committer: John Arbash Meinel <john at arbash-meinel.com>
       branch nick: jam-integration
       timestamp: Fri 2009-01-23 10:54:53 -0600
       message:
         Change the workings of merge_content to be lca aware.
   ------------------------------------------------------------
   revno: 3948.1.5
   committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
   branch nick: spurious-conflicts
   timestamp: Fri 2009-01-23 20:40:36 +0100
   message:
     merge jam fix
------------------------------------------------------------
revno: 3966
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-01-28 10:54:51 +0000
message:
 (Jelmer) Move ForeignVcsMapping.show_foreign_revid to ForeignVcs.
   ------------------------------------------------------------

<snip/>

   ------------------------------------------------------------
   revno: 3948.2.3
   committer: Martin Pool <mbp at sourcefrog.net>
   branch nick: progress
   timestamp: Wed 2009-01-21 03:38:16 -0200
   message:
     Make the interface from ProgressTask to ui more private
   ------------------------------------------------------------
   revno: 3948.2.2
   committer: Martin Pool <mbp at sourcefrog.net>
   branch nick: progress
   timestamp: Wed 2009-01-21 03:30:44 -0200
   message:
     Corrections to finishing progress bars
   ------------------------------------------------------------
   revno: 3948.2.1
   committer: Martin Pool <mbp at sourcefrog.net>
   branch nick: progress
   timestamp: Wed 2009-01-21 03:01:32 -0200
   message:
     Add ProgressTask repr

i.e. it has returned the log I would expect from "bzr log
-r3948.2.1..3967", not "bzr log -r3955.2.1..3967".
The problem only seems to be present when one of the revisions is a
merge revision.
Looking at the revision history in bzr visualize, I note that 3948.2.1
is the first revision after the thread containing 3955.2.1 branched
from the mainline at 3955.



-- 
<| regards
U| Marius
H| <><
Z| http://amanica.blogspot.com/
<|
E| http://bazaar-vcs.org/
<| because I don't trust version control systems with less than 19415 unit tests



More information about the bazaar mailing list