Rev 3498: Tolerate ghost parents of revision 1 (abentley, #235055) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Jun 17 07:47:26 BST 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3498
revision-id:pqm at pqm.ubuntu.com-20080617064715-bmm5fdshd3gzgyac
parent: pqm at pqm.ubuntu.com-20080616174225-2eokonl40p9ogzbw
parent: aaron at aaronbentley.com-20080616165505-72azw96gince2kp0
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2008-06-17 07:47:15 +0100
message:
Tolerate ghost parents of revision 1 (abentley, #235055)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/tests/branch_implementations/test_revision_history.py test_revision_histor-20070326062311-v7co92liyuchb80w-1
------------------------------------------------------------
revno: 3495.2.1
revision-id:aaron at aaronbentley.com-20080616165505-72azw96gince2kp0
parent: pqm at pqm.ubuntu.com-20080612170229-8h3mrl35jgqhs0gt
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: ghost-parent
timestamp: Mon 2008-06-16 12:55:05 -0400
message:
Tolerate ghosts in mainline (#235055)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/tests/branch_implementations/test_revision_history.py test_revision_histor-20070326062311-v7co92liyuchb80w-1
=== modified file 'NEWS'
--- a/NEWS 2008-06-16 17:14:10 +0000
+++ b/NEWS 2008-06-17 06:47:15 +0000
@@ -29,6 +29,9 @@
Cygwin Bazaar.
(Matt McClure, #209281)
+ * revision_history now tolerates mainline ghosts for Branch format 6.
+ (Aaron Bentley, #235055)
+
DOCUMENTATION:
* Updated developer documentation.
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2008-06-07 22:15:25 +0000
+++ b/bzrlib/branch.py 2008-06-16 16:55:05 +0000
@@ -1934,7 +1934,8 @@
def _gen_revision_history(self):
"""Generate the revision history from last revision
"""
- self._extend_partial_history()
+ last_revno, last_revision = self.last_revision_info()
+ self._extend_partial_history(stop_index=last_revno-1)
return list(reversed(self._partial_revision_history_cache))
def _extend_partial_history(self, stop_index=None, stop_revision=None):
=== modified file 'bzrlib/tests/branch_implementations/test_revision_history.py'
--- a/bzrlib/tests/branch_implementations/test_revision_history.py 2008-04-08 06:38:34 +0000
+++ b/bzrlib/tests/branch_implementations/test_revision_history.py 2008-06-16 16:55:05 +0000
@@ -203,4 +203,12 @@
branch.unlock()
+class TestRevisionHistory(TestCaseWithBranch):
+ def test_parent_ghost(self):
+ tree = self.make_branch_and_tree('tree')
+ tree.add_parent_tree_id('ghost-revision',
+ allow_leftmost_as_ghost=True)
+ tree.commit('first non-ghost commit', rev_id='non-ghost-revision')
+ self.assertEqual(['non-ghost-revision'],
+ tree.branch.revision_history())
More information about the bazaar-commits
mailing list