# HG changeset patch # User Patrick Mezard # Date 1335517336 -7200 # Node ID 17a1f7690b49b385b61acbedb04fa4cd55f1153d # Parent f2cc0ffb09de1497bdae6bdd11b8152f6afa9a68 subrepo: fix default implementation of forget() (issue3404) diff -r f2cc0ffb09de -r 17a1f7690b49 mercurial/subrepo.py --- 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' \ diff -r f2cc0ffb09de -r 17a1f7690b49 tests/test-subrepo-git.t --- 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] diff -r f2cc0ffb09de -r 17a1f7690b49 tests/test-subrepo-svn.t --- 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]