Rev 2320: Clarify docstrings, avoid regenerating foreign revid unnecessarily. in http://people.samba.org/bzr/jelmer/bzr-svn/0.5
Jelmer Vernooij
jelmer at samba.org
Fri Jan 16 23:57:52 GMT 2009
At http://people.samba.org/bzr/jelmer/bzr-svn/0.5
------------------------------------------------------------
revno: 2320
revision-id: jelmer at samba.org-20090116235749-qf3wl555yvvi44sv
parent: jelmer at samba.org-20090116233016-a60u9ewrcjrcek8q
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Sat 2009-01-17 00:57:49 +0100
message:
Clarify docstrings, avoid regenerating foreign revid unnecessarily.
modified:
fileids.py fileids.py-20060714013623-u5iiyqqnko11grcf-1
=== modified file 'fileids.py'
--- a/fileids.py 2009-01-16 23:30:16 +0000
+++ b/fileids.py 2009-01-16 23:57:49 +0000
@@ -36,10 +36,10 @@
def apply_idmap_delta(map, revid, delta, changes):
"""Update a file id map.
- :param map: Existing file id map.
+ :param map: Existing file id map that needs to be updated
:param revid: Revision id of the id map
- :param delta: Id map for just the delta
- :param changes: Changes in revid.
+ :param delta: Id map delta.
+ :param changes: Changes for the revision in question.
"""
for p in changes:
inv_p = p.decode("utf-8")
@@ -169,8 +169,9 @@
else:
get_children = None
+ foreign_revid = revmeta.get_foreign_revid()
def new_file_id(x):
- return mapping.generate_file_id(revmeta.get_foreign_revid(), x)
+ return mapping.generate_file_id(foreign_revid, x)
idmap = self.apply_changes_fn(new_file_id, changes, get_children)
idmap.update(revmeta.get_fileid_map(mapping))
More information about the bazaar-commits
mailing list