changeset 23963:8f02682ff3b0 stable

subrepo: don't abort in add when non-hg subrepos are present (issue4513) This change should have been part of 9994f45ba714.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 27 Jan 2015 20:57:43 -0500
parents 1f3b94e8dc40
children f1c127df7c4f
files mercurial/subrepo.py tests/test-subrepo-git.t tests/test-subrepo-svn.t
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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