Rev 3754: Add missing method entries() in http://bazaar.launchpad.net/%7Evila/bzr/chk-repo
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Oct 30 15:15:25 GMT 2008
At http://bazaar.launchpad.net/%7Evila/bzr/chk-repo
------------------------------------------------------------
revno: 3754
revision-id: v.ladeuil+lp at free.fr-20081030151515-m5ghgz3n3thzghhi
parent: robertc at robertcollins.net-20081022064059-wb4jp5sdx2t2whn5
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: cmd-inventory
timestamp: Thu 2008-10-30 16:15:15 +0100
message:
Add missing method entries()
* inventory.py:
(CHKInventory.entries): Needed by cmd_inventory.when querying
revisions other than tip.
-------------- next part --------------
=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py 2008-10-22 06:40:59 +0000
+++ b/bzrlib/inventory.py 2008-10-30 15:15:15 +0000
@@ -1524,6 +1524,12 @@
"""Get the root entry."""
return self[self.root_id]
+ def entries(self):
+ """Return list of (path, ie) for all entries except the root."""
+ all = list(self.iter_entries())
+ # pop root
+ return all[1:]
+
class CHKInventoryDirectory(InventoryDirectory):
"""A directory in an inventory."""
More information about the bazaar-commits
mailing list