Rev 2061: Fix iterating over all history when copies of history data have happened. in file:///data/jelmer/bzr-svn/0.5/
Jelmer Vernooij
jelmer at samba.org
Mon Nov 24 03:10:16 GMT 2008
At file:///data/jelmer/bzr-svn/0.5/
------------------------------------------------------------
revno: 2061
revision-id: jelmer at samba.org-20081124031012-tlz43srmrvfrkqy8
parent: jelmer at samba.org-20081121173703-s4dzk5g2ljmdzeyl
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Mon 2008-11-24 04:10:12 +0100
message:
Fix iterating over all history when copies of history data have happened.
modified:
revmeta.py revmeta.py-20080901215045-n8a6arqybs9ez5hl-1
=== modified file 'revmeta.py'
--- a/revmeta.py 2008-11-21 17:37:03 +0000
+++ b/revmeta.py 2008-11-24 03:10:12 +0000
@@ -718,24 +718,31 @@
prefixes = layout.get_project_prefixes(project)
else:
prefixes = [""]
+ unusual_history = {}
+ metabranches_history = {}
unusual = set()
for (paths, revnum, revprops) in self._log.iter_changes(prefixes, from_revnum, to_revnum, pb=pb):
bps = {}
if pb:
pb.update("discovering revisions", revnum, from_revnum-revnum)
+ metabranches.update(metabranches_history.get(revnum, {}))
+ unusual.update(unusual_history.get(revnum, set()))
+
for p in sorted(paths):
action = paths[p][0]
try:
(_, bp, ip) = layout.split_project_path(p, project)
except svn_errors.NotSvnBranchPath:
- for u in unusual:
- if p.startswith("%s/" % u):
- bps[u] = metabranches[u]
+ pass
else:
if action != 'D' or ip != "":
bps[bp] = get_metabranch(bp)
+ for u in unusual:
+ if p.startswith("%s/" % u):
+ bps[u] = get_metabranch(u)
+
# Apply renames and the like for the next round
for new_name, old_name, old_rev in changes.apply_reverse_changes(metabranches.keys(), paths):
@@ -748,9 +755,9 @@
data = metabranches[new_name]
del metabranches[new_name]
if mapping_check_path(old_name):
- metabranches[old_name] = data
+ metabranches_history.setdefault(old_rev, {})[old_name] = data
if not layout.is_branch_or_tag(old_name, project):
- unusual.add(old_name)
+ unusual_history.setdefault(old_rev, set()).add(old_name)
for bp in bps:
revmeta = self.get_revision(bp, revnum, paths, revprops, metabranch=bps[bp])
More information about the bazaar-commits
mailing list