Rev 1568: Add support for using text revid overrides. in http://people.samba.org/bzr/jelmer/bzr-svn/trunk
Jelmer Vernooij
jelmer at samba.org
Sat Aug 9 00:55:05 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/trunk
------------------------------------------------------------
revno: 1568
revision-id: jelmer at samba.org-20080808235503-0hsgvb1lm0uqsmcv
parent: jelmer at samba.org-20080808235312-n61qyziird0o9h20
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sat 2008-08-09 01:55:03 +0200
message:
Add support for using text revid overrides.
modified:
fileids.py fileids.py-20060714013623-u5iiyqqnko11grcf-1
=== modified file 'fileids.py'
--- a/fileids.py 2008-08-08 22:50:51 +0000
+++ b/fileids.py 2008-08-08 23:55:03 +0000
@@ -96,6 +96,7 @@
return map
+
class FileIdMap(object):
"""File id store.
@@ -107,6 +108,12 @@
self.apply_changes_fn = apply_changes_fn
self.repos = repos
+ def _use_text_revids(self, mapping, revmeta, map):
+ text_revids = mapping.import_text_parents(revmeta.revprops, revmeta.fileprops).items()
+ for path, revid in text_revids:
+ assert path in map
+ map[path] = (map[path][0], revid)
+
def apply_changes(self, revmeta, mapping, find_children=None):
"""Change file id map to incorporate specified changes.
@@ -163,6 +170,7 @@
(idmap, changes) = self.apply_changes(revmeta,
mapping, self.repos._log.find_children)
self.update_map(map, revid, idmap, changes)
+ self._use_text_revids(mapping, revmeta, map)
parent_revs = next_parent_revs
@@ -229,6 +237,7 @@
self.cache = FileIdMapCache(cache_transport)
self.actual = actual
self.apply_changes = actual.apply_changes
+ self._use_text_revids = actual._use_text_revids
self.repos = actual.repos
def get_map(self, uuid, revnum, branch, mapping):
@@ -281,6 +290,8 @@
revmeta, mapping, log_find_children)
self.actual.update_map(map, revid, idmap, changes)
+ self._use_text_revids(mapping, revmeta, map)
+ mutter('%r -> %r' % (revid, map))
parent_revs = next_parent_revs
More information about the bazaar-commits
mailing list