diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -149,9 +149,7 @@ def _computeforwardmissing(a, b): This is its own function so extensions can easily wrap this call to see what files _forwardcopies is about to process. """ - missing = set(b.manifest().iterkeys()) - missing.difference_update(a.manifest().iterkeys()) - return missing + return b.manifest().filesnotin(a.manifest()) def _forwardcopies(a, b): '''find {dst@b: src@a} copy mapping where a is an ancestor of b''' diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -38,6 +38,12 @@ class manifestdict(dict): ret._flags[fn] = flags return ret + def filesnotin(self, m2): + '''Set of files in this manifest that are not in the other''' + files = set(self.iterkeys()) + files.difference_update(m2.iterkeys()) + return files + def matches(self, match): '''generate a new manifest filtered by the match argument''' if match.always():