Comments
Patch
@@ -466,12 +466,7 @@ class changectx(basectx):
(source == 'compatibility' and
self._changeset.filesremoved is not None)):
return self._changeset.filesremoved or []
-
- removed = []
- for f in self.files():
- if f not in self:
- removed.append(f)
- return removed
+ return scmutil.computechangesetfilesremoved(self)
@propertycache
def _copies(self):
@@ -1993,3 +1993,12 @@ def computechangesetfilesadded(ctx):
if not any(f in p for p in ctx.parents()):
added.append(f)
return added
+
+def computechangesetfilesremoved(ctx):
+ """return the list of files removed in a changeset
+ """
+ removed = []
+ for f in ctx.files():
+ if f not in ctx:
+ removed.append(f)
+ return removed