context: delete unused undelete()
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 07 Feb 2019 21:48:24 -0800
changeset 41611 4bf166a020a7
parent 41610 d683aca738cd
child 41612 fbd4ce55bcbd
context: delete unused undelete() Maybe it's been unused since c8e2a5ea7062 (mq: avoid data loss upon qfold + qmv (issue3058), 2011-10-20), maybe not. Differential Revision: https://phab.mercurial-scm.org/D5888
mercurial/context.py
--- a/mercurial/context.py	Wed Feb 06 22:32:50 2019 -0800
+++ b/mercurial/context.py	Thu Feb 07 21:48:24 2019 -0800
@@ -1364,19 +1364,6 @@
                     self._repo.dirstate.drop(f)
             return rejected
 
-    def undelete(self, list):
-        pctxs = self.parents()
-        with self._repo.wlock():
-            ds = self._repo.dirstate
-            for f in list:
-                if self._repo.dirstate[f] != 'r':
-                    self._repo.ui.warn(_("%s not removed!\n") % ds.pathto(f))
-                else:
-                    fctx = f in pctxs[0] and pctxs[0][f] or pctxs[1][f]
-                    t = fctx.data()
-                    self._repo.wwrite(f, t, fctx.flags())
-                    self._repo.dirstate.normal(f)
-
     def copy(self, source, dest):
         try:
             st = self._repo.wvfs.lstat(dest)