Small patch for CHK branch to fix some tests

Robert Collins robertc at robertcollins.net
Mon Nov 10 07:01:32 GMT 2008


On Mon, 2008-11-10 at 16:12 +1000, Martin Pool wrote:
> 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.

So, I think this would be better as:

-        deleted_ids = set(self.basis_inv._byid.keys()) - \
-            set(self.builder.new_inventory._byid.keys())
+        if isinstance(self.basis_inv, Inventory):
            deleted_ids = set(self.basis_inv._byid.keys()) - \
                set(self.builder.new_inventory._byid.keys())
+        else:
             deleted_ids = set(self.basis_inv) - \
                 set(self.builder.new_inventory)

because of previous performance testing in commit.

-Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081110/c21d97e3/attachment.pgp 


More information about the bazaar mailing list