diff mercurial/subrepo.py @ 12270:166b9866580a

add: recurse into subrepositories with --subrepos/-S flag
author Martin Geisler <mg@lazybytes.net>
date Mon, 13 Sep 2010 13:09:20 +0200
parents 21eb85e9ea94
children 42ecd56399d7
line wrap: on
line diff
--- a/mercurial/subrepo.py	Mon Sep 13 13:09:11 2010 +0200
+++ b/mercurial/subrepo.py	Mon Sep 13 13:09:20 2010 +0200
@@ -255,6 +255,8 @@
         """
         raise NotImplementedError
 
+    def add(self, ui, match, dryrun, prefix):
+        return []
 
     def status(self, rev2, **opts):
         return [], [], [], [], [], [], []
@@ -291,6 +293,10 @@
                 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 status(self, rev2, **opts):
         try:
             rev1 = self._state[1]