[MERGE] Inventory-free checkout
Aaron Bentley
aaron at aaronbentley.com
Fri Jan 4 04:05:40 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> Aaron Bentley wrote:
>> John Arbash Meinel wrote:
>>> So list(wt) should actually be raising a DeprecationError.
>> I saw that too, but I need that functionality. So the only reasons to
>> deprecate it would be to change the name or return type.
>>
> You seem to only *need* to know if there is more than just a root.
> Having to build up the inventory and then stat the whole filesystem
> seems like a bad way to find that out.
That's not what I'm doing. There is more than one implementation of
WorkingTree.__iter__, and the WorkingTree4.__iter__ implementation uses
the dirstate directly, not Inventory.
I was very careful to make sure that at no time was an inventory
generated. I set up pdb to break at WorkingTree4._make_inventory. I
fixed all the callers until there were none left.
>> Perhaps I should mention that, for reasons I do not understand, the
>> WorkingTree being passed in has a file-id for .bzrignore, but no file.
>> So if I were to do iter_all_file_ids, an exception would be raised.
> Well, why was it succeeding in the past?
It looks like I was wrong. I've re-tested it, and I can't reproduce the
bug I thought I saw.
> Maybe we would want a "WT.is_empty()" function, or WT.is_populated().
I find such a specialized interface distasteful. What if I switch
WT.all_file_ids back to returning an iterator, and use that? Or I guess
now I can run iter_changes against the empty tree.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHfbCU0F+nu1YWqI0RApWdAJ0VcSp+3h91Ccks1riajmNdCQuyagCeKbzD
Qg8U0LbXKQMsCoxwjrMWYoI=
=iFDr
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list