Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 16070:f11eee00c652 stable
forget: show warning messages for forgetting in subrepo correctly
in 'cmdutil.forget()':
for f in match.files():
if match.exact(f) or not explicitonly:
....
is equal to:
for f in match.files():
if True:
....
because 'f' from 'match.files()' should 'match.exact(f)':
- 'match.files()' returns 'self._files'
- 'match.exact(f)' examines 'f in self._fmap',
- 'self._fmap' of match is 'set(self._files)'
then, 'explicitonly' wants to suppress warning messges, if it is true
(= 'cmdutil.forget()' is invoked from 'subrepo.forget()').
so, current code should be fixed as:
if not explicitonly:
for f in match.files():
....
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 06 Feb 2012 14:37:49 +0900 |
parents | 2bd54ffaa27e |
children | f7e0d95d0a0b |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sat Feb 04 00:02:05 2012 +0000 +++ b/mercurial/cmdutil.py Mon Feb 06 14:37:49 2012 +0900 @@ -1224,8 +1224,8 @@ ui.status(_("skipping missing subrepository: %s\n") % join(subpath)) - for f in match.files(): - if match.exact(f) or not explicitonly: + if not explicitonly: + for f in match.files(): if f not in repo.dirstate and not os.path.isdir(match.rel(join(f))): if f not in forgot: if os.path.exists(match.rel(join(f))):