Rev 4404: (Jelmer) deal with text revisions that originated in revisions that in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Jun 3 23:23:04 BST 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4404
revision-id: pqm at pqm.ubuntu.com-20090603222259-m1s1zm751w82h7bj
parent: pqm at pqm.ubuntu.com-20090603210845-kkjz982mww9ahwml
parent: jelmer at samba.org-20090603212852-jf7cmmjw2iwqhxen
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-06-03 23:22:59 +0100
message:
(Jelmer) deal with text revisions that originated in revisions that
are ghosts in reconcile.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/tests/per_repository/test_reconcile.py test_reconcile.py-20060223022332-572ef70a3288e369
------------------------------------------------------------
revno: 4385.3.2
revision-id: jelmer at samba.org-20090603212852-jf7cmmjw2iwqhxen
parent: jelmer at samba.org-20090528150558-ojk43tysnz4xs2jq
parent: pqm at pqm.ubuntu.com-20090603210845-kkjz982mww9ahwml
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: referenced-ghost-text
timestamp: Wed 2009-06-03 23:28:52 +0200
message:
Merge bzr.dev.
added:
bzrlib/send.py send.py-20090521192735-j7cdb33ykmtmzx4w-1
bzrlib/tests/per_repository_reference/test_fetch.py test_fetch.py-20090511214909-25pkgmoam913lrji-1
bzrlib/tests/per_repository_reference/test_initialize.py test_initialize.py-20090527083941-4rz2urcthjet5e2i-1
bzrlib/tests/per_repository_reference/test_unlock.py test_unlock.py-20090526160031-14lvypj5pbrndnyz-1
renamed:
bzrlib/tests/workingtree_implementations/test_get_file_with_stat.py => bzrlib/tests/tree_implementations/test_get_file_with_stat.py test_get_file_with_s-20080922035909-lhdovrr36jpxmu0v-1
modified:
Makefile Makefile-20050805140406-d96e3498bb61c5bb
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/diff.py diff.py-20050309040759-26944fbbf2ebbf36
bzrlib/foreign.py foreign.py-20081112170002-olsxmandkk8qyfuq-1
bzrlib/groupcompress.py groupcompress.py-20080705181503-ccbxd6xuy1bdnrpu-8
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/mutabletree.py mutabletree.py-20060906023413-4wlkalbdpsxi2r4y-2
bzrlib/plugins/launchpad/test_register.py test_register.py-20060315182712-40f5dda945c829a8
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repofmt/groupcompress_repo.py repofmt.py-20080715094215-wp1qfvoo7093c8qr-1
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/serializer.py serializer.py-20090402143702-wmkh9cfjhwpju0qi-1
bzrlib/smart/repository.py repository.py-20061128022038-vr5wy5bubyb8xttk-1
bzrlib/tests/blackbox/test_add.py test_add.py-20060518072250-857e4f86f54a30b2
bzrlib/tests/blackbox/test_export.py test_export.py-20051229024010-e6c26658e460fb1c
bzrlib/tests/branch_implementations/test_branch.py testbranch.py-20050711070244-121d632bc37d7253
bzrlib/tests/inventory_implementations/basics.py basics.py-20070903044446-kdjwbiu1p1zi9phs-1
bzrlib/tests/per_repository/test_fetch.py test_fetch.py-20070814052151-5cxha9slx4c93uog-1
bzrlib/tests/per_repository/test_fileid_involved.py test_file_involved.py-20051215205901-728a172d1014daaa
bzrlib/tests/per_repository/test_write_group.py test_write_group.py-20070716105516-89n34xtogq5frn0m-1
bzrlib/tests/per_repository_reference/__init__.py __init__.py-20080220025549-nnm2s80it1lvcwnc-2
bzrlib/tests/per_repository_reference/test_default_stacking.py test_default_stackin-20090311055345-9ajahgm58oq3wh6h-1
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
bzrlib/tests/test_foreign.py test_foreign.py-20081125004048-ywb901edgp9lluxo-1
bzrlib/tests/test_graph.py test_graph_walker.py-20070525030405-enq4r60hhi9xrujc-1
bzrlib/tests/test_groupcompress.py test_groupcompress.p-20080705181503-ccbxd6xuy1bdnrpu-13
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
bzrlib/tests/test_pack_repository.py test_pack_repository-20080801043947-eaw0e6h2gu75kwmy-1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
bzrlib/tests/test_serializer.py test_serializer.py-20090403213933-q6x117y8t9fbeyoz-1
bzrlib/tests/test_ui.py test_ui.py-20051130162854-458e667a7414af09
bzrlib/tests/tree_implementations/__init__.py __init__.py-20060717075546-420s7b0bj9hzeowi-2
bzrlib/tests/workingtree_implementations/__init__.py __init__.py-20060203003124-b2aa5aca21a8bfad
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
bzrlib/tree.py tree.py-20050309040759-9d5f2496be663e77
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/tests/tree_implementations/test_get_file_with_stat.py test_get_file_with_s-20080922035909-lhdovrr36jpxmu0v-1
------------------------------------------------------------
revno: 4385.3.1
revision-id: jelmer at samba.org-20090528150558-ojk43tysnz4xs2jq
parent: pqm at pqm.ubuntu.com-20090528085340-bfw8729wfm9kmfmd
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: referenced-ghost-text
timestamp: Thu 2009-05-28 17:05:58 +0200
message:
Reconcile can now deal with text revisions that originated in revisions that are ghosts.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/tests/per_repository/test_reconcile.py test_reconcile.py-20060223022332-572ef70a3288e369
=== modified file 'NEWS'
--- a/NEWS 2009-06-03 06:43:45 +0000
+++ b/NEWS 2009-06-03 21:28:52 +0000
@@ -56,6 +56,9 @@
the fetched revisions, not in the stacked-on ancestry.
(John Arbash Meinel)
+* Reconcile can now deal with text revisions that originated in revisions
+ that are ghosts. (Jelmer Vernooij, #336749)
+
* The ''bzr diff'' now catches OSError from osutils.rmtree and logs a
helpful message to the trace file, unless the temp directory really was
removed (which would be very strange). Since the diff operation has
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py 2009-05-28 09:35:53 +0000
+++ b/bzrlib/repofmt/pack_repo.py 2009-06-03 21:28:52 +0000
@@ -1306,7 +1306,7 @@
# space (we only topo sort the revisions, which is smaller).
topo_order = tsort.topo_sort(ancestors)
rev_order = dict(zip(topo_order, range(len(topo_order))))
- bad_texts.sort(key=lambda key:rev_order[key[0][1]])
+ bad_texts.sort(key=lambda key:rev_order.get(key[0][1], 0))
transaction = repo.get_transaction()
file_id_index = GraphIndexPrefixAdapter(
self.new_pack.text_index,
=== modified file 'bzrlib/tests/per_repository/test_reconcile.py'
--- a/bzrlib/tests/per_repository/test_reconcile.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/per_repository/test_reconcile.py 2009-05-28 15:05:58 +0000
@@ -264,6 +264,40 @@
self.assertEqual([None, 'the_ghost', 'ghost'], repo.get_ancestry('ghost'))
self.assertEqual([None, 'the_ghost'], repo.get_ancestry('the_ghost'))
+ def test_text_from_ghost_revision(self):
+ repo = self.make_repository('text-from-ghost')
+ inv = Inventory(revision_id='final-revid')
+ inv.root.revision = 'root-revid'
+ ie = inv.add_path('bla', 'file', 'myfileid')
+ ie.revision = 'ghostrevid'
+ ie.text_size = 42
+ ie.text_sha1 = "bee68c8acd989f5f1765b4660695275948bf5c00"
+ rev = bzrlib.revision.Revision(timestamp=0,
+ timezone=None,
+ committer="Foo Bar <foo at example.com>",
+ message="Message",
+ revision_id='final-revid')
+ repo.lock_write()
+ try:
+ repo.start_write_group()
+ try:
+ repo.add_revision('final-revid', rev, inv)
+ try:
+ repo.texts.add_lines(('myfileid', 'ghostrevid'),
+ (('myfileid', 'ghost-text-parent'),),
+ ["line1\n", "line2\n"])
+ except errors.RevisionNotPresent:
+ raise TestSkipped("text ghost parents not supported")
+ if repo.supports_rich_root():
+ root_id = inv.root.file_id
+ repo.texts.add_lines((inv.root.file_id, inv.root.revision),
+ [], [])
+ finally:
+ repo.commit_write_group()
+ finally:
+ repo.unlock()
+ repo.reconcile(thorough=True)
+
class TestReconcileWithIncorrectRevisionCache(TestReconcile):
"""Ancestry data gets cached in knits and weaves should be reconcilable.
More information about the bazaar-commits
mailing list