mercurial/subrepo.py
changeset 23550 7fa2189c1e87
parent 23540 f274d27f1994
child 23571 9626120e017b
--- a/mercurial/subrepo.py	Sat Nov 01 22:56:49 2014 -0700
+++ b/mercurial/subrepo.py	Sun Dec 14 11:34:51 2014 +0100
@@ -1656,6 +1656,17 @@
         elif match(gitprefix): #Subrepo is matched
             ui.write(self._gitcommand(cmd))
 
+    def revert(self, ui, substate, *pats, **opts):
+        ui.status(_('reverting subrepo %s\n') % substate[0])
+        if not opts.get('no_backup'):
+            ui.warn('%s: reverting %s subrepos without '
+                    '--no-backup is unsupported\n'
+                    % (substate[0], substate[2]))
+            return []
+
+        self.get(substate, overwrite=True)
+        return []
+
     def shortid(self, revid):
         return revid[:7]