comparison mercurial/subrepo.py @ 23578:d0546e8e1def

subrepo: drop the 'ui' parameter to removefiles() 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 remove is to emit status and warning messages, and to check the verbose flag prior to printing files to be removed. 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:36:50 -0500
parents 597b071a0e0d
children e1c39f207719
comparison
equal deleted inserted replaced
23577:597b071a0e0d 23578:d0546e8e1def
497 pass 497 pass
498 498
499 def forget(self, 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, 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
505 filesystem. Return 0 on success, 1 on any warning. 505 filesystem. Return 0 on success, 1 on any warning.
506 """ 506 """
507 return 1 507 return 1
853 def forget(self, match, prefix): 853 def forget(self, match, prefix):
854 return cmdutil.forget(self.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, matcher, prefix, after, force, subrepos):
859 return cmdutil.remove(ui, self._repo, matcher, 859 return cmdutil.remove(self.ui, self._repo, matcher,
860 os.path.join(prefix, self._path), after, force, 860 os.path.join(prefix, self._path), after, force,
861 subrepos) 861 subrepos)
862 862
863 @annotatesubrepoerror 863 @annotatesubrepoerror
864 def revert(self, ui, substate, *pats, **opts): 864 def revert(self, ui, substate, *pats, **opts):