mercurial/fileset.py
changeset 14685 394121d9f4fc
parent 14684 87b9d6a7d807
child 14689 25e4d2f35965
--- a/mercurial/fileset.py	Sat Jun 18 16:53:49 2011 -0500
+++ b/mercurial/fileset.py	Sat Jun 18 16:53:49 2011 -0500
@@ -335,10 +335,22 @@
 
     return s
 
+def copied(mctx, x):
+    """``copied()``
+    File that is recorded as being copied.
+    """
+    s = []
+    for f in mctx.subset:
+        p = mctx.ctx[f].parents()
+        if p and p[0].path() != f:
+            s.append(f)
+    return s
+
 symbols = {
     'added': added,
     'binary': binary,
     'clean': clean,
+    'copied': copied,
     'deleted': deleted,
     'encoding': encoding,
     'exec': exec_,