Patchwork D5888: context: delete unused undelete()

login
register
mail settings
Submitter phabricator
Date Feb. 8, 2019, 12:44 p.m.
Message ID <e28e4217e1af49454966511cb7dda4b6@localhost.localdomain>
Download mbox | patch
Permalink /patch/38548/
State Not Applicable
Headers show

Comments

phabricator - Feb. 8, 2019, 12:44 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4bf166a020a7: context: delete unused undelete() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5888?vs=13902&id=13912

REVISION DETAIL
  https://phab.mercurial-scm.org/D5888

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -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)