subrepo: don't abort in add when non-hg subrepos are present (issue4513) stable
authorMatt Harbison <matt_harbison@yahoo.com>
Tue, 27 Jan 2015 20:57:43 -0500
branchstable
changeset 23963 8f02682ff3b0
parent 23962 1f3b94e8dc40
child 23964 f1c127df7c4f
subrepo: don't abort in add when non-hg subrepos are present (issue4513) This change should have been part of 9994f45ba714.
mercurial/subrepo.py
tests/test-subrepo-git.t
tests/test-subrepo-svn.t
--- a/mercurial/subrepo.py	Tue Jan 27 10:14:23 2015 -0500
+++ b/mercurial/subrepo.py	Tue Jan 27 20:57:43 2015 -0500
@@ -435,7 +435,7 @@
         """
         raise NotImplementedError
 
-    def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly):
+    def add(self, ui, match, prefix, explicitonly, **opts):
         return []
 
     def addremove(self, matcher, prefix, opts, dry_run, similarity):
--- a/tests/test-subrepo-git.t	Tue Jan 27 10:14:23 2015 -0500
+++ b/tests/test-subrepo-git.t	Tue Jan 27 20:57:43 2015 -0500
@@ -133,6 +133,7 @@
   $ echo f > f
   $ hg status --subrepos
   ? s/f
+  $ hg add .
   $ git add f
   $ cd ..
 
--- a/tests/test-subrepo-svn.t	Tue Jan 27 10:14:23 2015 -0500
+++ b/tests/test-subrepo-svn.t	Tue Jan 27 20:57:43 2015 -0500
@@ -439,8 +439,9 @@
   $ hg add .hgsub
   $ hg ci -m addsub
   $ echo a > a
-  $ hg ci -Am adda
+  $ hg add .
   adding a
+  $ hg ci -m adda
   $ hg up 0
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ svn up -qr6 s