Rev 2156: Simplify fetching of old file ids a bit. in http://people.samba.org/bzr/jelmer/bzr-svn/0.5
Jelmer Vernooij
jelmer at samba.org
Thu Dec 4 20:05:15 GMT 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.5
------------------------------------------------------------
revno: 2156
revision-id: jelmer at samba.org-20081204200511-m4vfq80fr15z6hve
parent: jelmer at samba.org-20081204172126-yarwkh67jey5d1ei
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Thu 2008-12-04 21:05:11 +0100
message:
Simplify fetching of old file ids a bit.
modified:
fetch.py fetch.py-20060625004942-x2lfaib8ra707a8p-1
=== modified file 'fetch.py'
--- a/fetch.py 2008-12-04 00:57:40 +0000
+++ b/fetch.py 2008-12-04 20:05:11 +0000
@@ -548,7 +548,8 @@
def _get_old_id(self, parent_id, old_path):
assert isinstance(old_path, unicode)
assert isinstance(parent_id, str)
- return self.old_inventory[parent_id].children[urlutils.basename(old_path)].file_id
+ basename = urlutils.basename(old_path)
+ return self.old_inventory[parent_id].children[basename].file_id
def _get_existing_id(self, old_parent_id, new_parent_id, path):
assert isinstance(path, unicode)
@@ -557,7 +558,7 @@
ret = self._get_id_map().get(path)
if ret is not None:
return ret
- return self.old_inventory[old_parent_id].children[urlutils.basename(path)].file_id
+ return self._get_old_id(old_parent_id, path)
def _get_new_id(self, new_path):
assert isinstance(new_path, unicode)
More information about the bazaar-commits
mailing list