mercurial/scmutil.py
changeset 42710 87c4cd89b539
parent 42576 ea6558db1011
child 42711 53c07f08fea1
--- a/mercurial/scmutil.py	Tue Aug 06 03:17:40 2019 +0200
+++ b/mercurial/scmutil.py	Wed Jun 12 13:42:22 2019 +0100
@@ -1984,3 +1984,12 @@
                      "ancestors(head() and not bookmark(%s)) - "
                      "ancestors(bookmark() and not bookmark(%s))",
                      mark, mark, mark)
+
+def computechangesetfilesadded(ctx):
+    """return the list of files added in a changeset
+    """
+    added = []
+    for f in ctx.files():
+        if not any(f in p for p in ctx.parents()):
+            added.append(f)
+    return added