Mercurial > public > mercurial-scm > hg
comparison mercurial/subrepo.py @ 23577:597b071a0e0d
subrepo: drop the 'ui' parameter to forget()
This no longer needs to be explicitly passed because the subrepo object tracks
the 'ui' reference since fcbc66b5da6a. See the change to 'archive' for details
about the differences between the output level in the root repo and subrepo 'ui'
object.
The only use for 'ui' in forget is to emit status and warning messages, and to
check the verbose flag prior to printing files to be forgotten. The bad()
method on the matcher still uses the root repo's ui, because narrowing the
matcher doesn't change the ui object.
The local repo's ui was already being used to print a warning message in
wctx.forget() and for 'ui.slash' when walking dirstate in the repo.status()
call.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 13 Dec 2014 19:23:30 -0500 |
parents | 70a7478c33de |
children | d0546e8e1def |
comparison
equal
deleted
inserted
replaced
23576:70a7478c33de | 23577:597b071a0e0d |
---|---|
494 walk recursively through the directory tree, finding all files | 494 walk recursively through the directory tree, finding all files |
495 matched by the match function | 495 matched by the match function |
496 ''' | 496 ''' |
497 pass | 497 pass |
498 | 498 |
499 def forget(self, ui, match, prefix): | 499 def forget(self, match, prefix): |
500 return ([], []) | 500 return ([], []) |
501 | 501 |
502 def removefiles(self, ui, matcher, prefix, after, force, subrepos): | 502 def removefiles(self, ui, matcher, prefix, after, force, subrepos): |
503 """remove the matched files from the subrepository and the filesystem, | 503 """remove the matched files from the subrepository and the filesystem, |
504 possibly by force and/or after the file has been removed from the | 504 possibly by force and/or after the file has been removed from the |
848 def walk(self, match): | 848 def walk(self, match): |
849 ctx = self._repo[None] | 849 ctx = self._repo[None] |
850 return ctx.walk(match) | 850 return ctx.walk(match) |
851 | 851 |
852 @annotatesubrepoerror | 852 @annotatesubrepoerror |
853 def forget(self, ui, match, prefix): | 853 def forget(self, match, prefix): |
854 return cmdutil.forget(ui, self._repo, match, | 854 return cmdutil.forget(self.ui, self._repo, match, |
855 os.path.join(prefix, self._path), True) | 855 os.path.join(prefix, self._path), True) |
856 | 856 |
857 @annotatesubrepoerror | 857 @annotatesubrepoerror |
858 def removefiles(self, ui, matcher, prefix, after, force, subrepos): | 858 def removefiles(self, ui, matcher, prefix, after, force, subrepos): |
859 return cmdutil.remove(ui, self._repo, matcher, | 859 return cmdutil.remove(ui, self._repo, matcher, |