diff mercurial/subrepo.py @ 15911:c654eac03452

add: fix subrepo recursion for explicit path handling When support for handling explicit paths in subrepos was added to the add command (9e99d2bbb1b1), subrepo recursion wasn't taken into account. This change adds an explicitonly argument to cmdutil.add to allow controlling which levels of recursion should include only explicit paths versus all matched paths.
author David M. Carr <david@carrclan.us>
date Tue, 17 Jan 2012 19:10:58 -0500
parents 4bc715f2a356
children 2bd54ffaa27e
line wrap: on
line diff
--- a/mercurial/subrepo.py	Tue Jan 17 19:10:54 2012 -0500
+++ b/mercurial/subrepo.py	Tue Jan 17 19:10:58 2012 -0500
@@ -310,7 +310,7 @@
         """
         raise NotImplementedError
 
-    def add(self, ui, match, dryrun, prefix):
+    def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly):
         return []
 
     def status(self, rev2, **opts):
@@ -396,9 +396,9 @@
                 addpathconfig('default-push', defpushpath)
             fp.close()
 
-    def add(self, ui, match, dryrun, prefix):
-        return cmdutil.add(ui, self._repo, match, dryrun, True,
-                           os.path.join(prefix, self._path))
+    def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly):
+        return cmdutil.add(ui, self._repo, match, dryrun, listsubrepos,
+                           os.path.join(prefix, self._path), explicitonly)
 
     def status(self, rev2, **opts):
         try: