Mercurial > hg
comparison mercurial/cmdutil.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 |
---|---|
2073 | 2073 |
2074 if subrepos or matchessubrepo(m, subpath): | 2074 if subrepos or matchessubrepo(m, subpath): |
2075 sub = wctx.sub(subpath) | 2075 sub = wctx.sub(subpath) |
2076 try: | 2076 try: |
2077 submatch = matchmod.narrowmatcher(subpath, m) | 2077 submatch = matchmod.narrowmatcher(subpath, m) |
2078 if sub.removefiles(ui, submatch, prefix, after, force, | 2078 if sub.removefiles(submatch, prefix, after, force, subrepos): |
2079 subrepos): | |
2080 ret = 1 | 2079 ret = 1 |
2081 except error.LookupError: | 2080 except error.LookupError: |
2082 ui.status(_("skipping missing subrepository: %s\n") | 2081 ui.status(_("skipping missing subrepository: %s\n") |
2083 % join(subpath)) | 2082 % join(subpath)) |
2084 | 2083 |