Rev 108: Allow backing MapTree onto a tree that is not a MutableTree. in file:///home/jelmer/bzr/bzr-rebase/trunk/
Jelmer Vernooij
jelmer at samba.org
Fri Oct 10 02:13:46 BST 2008
At file:///home/jelmer/bzr/bzr-rebase/trunk/
------------------------------------------------------------
revno: 108
revision-id: jelmer at samba.org-20081010011224-iiaek4qjf4hlc523
parent: jelmer at samba.org-20081009163254-mvb6x89zq7b0tzkq
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Fri 2008-10-10 03:12:24 +0200
message:
Allow backing MapTree onto a tree that is not a MutableTree.
=== modified file 'maptree.py'
--- a/maptree.py 2008-10-09 16:32:54 +0000
+++ b/maptree.py 2008-10-10 01:12:24 +0000
@@ -117,8 +117,11 @@
path=path)
def get_file_with_stat(self, file_id, path=None):
- return self.oldtree.get_file_with_stat(file_id=self.old_id(file_id),
+ if getattr(self.oldtree, "get_file_with_stat", None) is not None:
+ return self.oldtree.get_file_with_stat(file_id=self.old_id(file_id),
path=path)
+ else:
+ return self.get_file(file_id, path), None
def get_file(self, file_id, path=None):
if path is None:
More information about the bazaar-commits
mailing list