subrepo: fix default implementation of forget() (issue3404) stable
authorPatrick Mezard <patrick@mezard.eu>
Fri, 27 Apr 2012 11:02:16 +0200
branchstable
changeset 16527 17a1f7690b49
parent 16526 f2cc0ffb09de
child 16528 5d803620ca05
subrepo: fix default implementation of forget() (issue3404)
mercurial/subrepo.py
tests/test-subrepo-git.t
tests/test-subrepo-svn.t
--- a/mercurial/subrepo.py	Fri Apr 27 10:17:55 2012 +0200
+++ b/mercurial/subrepo.py	Fri Apr 27 11:02:16 2012 +0200
@@ -366,7 +366,7 @@
         pass
 
     def forget(self, ui, match, prefix):
-        return []
+        return ([], [])
 
     def revert(self, ui, substate, *pats, **opts):
         ui.warn('%s: reverting %s subrepos is unsupported\n' \
--- a/tests/test-subrepo-git.t	Fri Apr 27 10:17:55 2012 +0200
+++ b/tests/test-subrepo-git.t	Fri Apr 27 11:02:16 2012 +0200
@@ -507,3 +507,8 @@
   da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
   $ cd ..
 
+Test forgetting files, not implemented in git subrepo, used to
+traceback
+  $ hg forget 'notafile*'
+  notafile*: No such file or directory
+  [1]
--- a/tests/test-subrepo-svn.t	Fri Apr 27 10:17:55 2012 +0200
+++ b/tests/test-subrepo-svn.t	Fri Apr 27 11:02:16 2012 +0200
@@ -548,3 +548,10 @@
   archiving (s): 2/2 files (100.00%)
   archiving (recreated): 0/1 files (0.00%)
   archiving (recreated): 1/1 files (100.00%)
+
+Test forgetting files, not implemented in svn subrepo, used to
+traceback
+
+  $ hg forget 'notafile*'
+  notafile*: No such file or directory
+  [1]