diff mercurial/subrepo.py @ 15474:95174c381525

forget: support forgetting explicit paths in subrepos Change the behavior of the forget command such that explicit paths in subrepos are handled by forgetting the file in the subrepo. This eliminates the previous behavior where if you called "hg forget" for an explicit path in a subrepo, it would state that the file is already untracked.
author David M. Carr <david@carrclan.us>
date Wed, 09 Nov 2011 19:46:51 -0500
parents 9e99d2bbb1b1
children 646759147717
line wrap: on
line diff
--- a/mercurial/subrepo.py	Wed Nov 09 19:46:49 2011 -0500
+++ b/mercurial/subrepo.py	Wed Nov 09 19:46:51 2011 -0500
@@ -360,6 +360,9 @@
         '''
         pass
 
+    def forget(self, files):
+        pass
+
 class hgsubrepo(abstractsubrepo):
     def __init__(self, ctx, path, state):
         self._path = path
@@ -553,6 +556,10 @@
         ctx = self._repo[None]
         return ctx.walk(match)
 
+    def forget(self, files):
+        ctx = self._repo[None]
+        ctx.forget(files)
+
 class svnsubrepo(abstractsubrepo):
     def __init__(self, ctx, path, state):
         self._path = path