mercurial/context.py
changeset 34787 754b5117622f
parent 34783 0c812885586b
child 34833 07bbb208a924
--- a/mercurial/context.py	Sun Oct 15 20:36:29 2017 -0700
+++ b/mercurial/context.py	Sun Oct 15 20:36:29 2017 -0700
@@ -1935,6 +1935,11 @@
         self._repo.wwrite(self._path, data, flags,
                           backgroundclose=backgroundclose)
 
+    def markcopied(self, src):
+        """marks this file a copy of `src`"""
+        if self._repo.dirstate[self._path] in "nma":
+            self._repo.dirstate.copy(src, self._path)
+
     def clearunknown(self):
         """Removes conflicting items in the working directory so that
         ``write()`` can be called successfully.