Small patch for CHK branch to fix some tests

Martin Pool mbp at canonical.com
Mon Nov 10 06:12:51 GMT 2008


On Tue, Nov 4, 2008 at 12:40 PM, Andrew Bennetts
<andrew.bennetts at canonical.com> wrote:
> Hi Robert,
>
> I haven't run the full suite, but this patch appears to help at least
> test_upgrade_preserves_signatures, and makes one variant of test_fetch_knit3 get
> a little further along too.  I bumped into these yesterday while playing with
> usertest on your branch.

Here's an analogous change to commit, which is needed for commit to
work when a CHK RevisionTree is used as the basis.

I think the XXX comment just here would be a good idea -- it should be
possible to remove this method -- but I don't want to do it right now.

-- 
Martin <http://launchpad.net/~mbp/>

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: mbp at sourcefrog.net-20081110060816-awjurbz1zq485qtu
# target_branch: http://sourcefrog.net/bzr/robertc-repository
# testament_sha1: 0b4242e3e13a1c408bdf9ae4f3e6b4087125e170
# timestamp: 2008-11-10 16:08:36 +1000
# source_branch: http://sourcefrog.net/bzr/repository-trivial
# base_revision_id: robertc at robertcollins.net-20081106231431-\
#   km10poyn95ifnjkh
#
# Begin patch
=== modified file 'bzrlib/commit.py'
--- bzrlib/commit.py	2008-11-06 23:00:22 +0000
+++ bzrlib/commit.py	2008-11-10 06:08:16 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006, 2007 Canonical Ltd
+# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -698,8 +698,7 @@
     def _report_and_accumulate_deletes(self):
         # XXX: Could the list of deleted paths and ids be instead taken from
         # _populate_from_inventory?
-        deleted_ids = set(self.basis_inv._byid.keys()) - \
-            set(self.builder.new_inventory._byid.keys())
+        deleted_ids = set(self.basis_inv) - set(self.builder.new_inventory)
         if deleted_ids:
             self.any_entries_deleted = True
             deleted = [(self.basis_tree.id2path(file_id), file_id)

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBW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OC2pC2ToF5S630ZO65xs
13UXHieKhklHUFYGiVQwrMk6IzbGyW0leMKxtAEY52wViVQQRxOhBwJq7uxxZvLecW90qXkrM44a
ISLGXQyjCpPl9CeQFhxT1z2iclMU5iNAmU53brmGTmpbWufM4Uqyv4E//F3JFOFCQxSRUUw=



More information about the bazaar mailing list