Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 23579:e1c39f207719
subrepo: drop the 'ui' parameter to revert()
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 revert is to emit status and warning messages, and to
check the verbose flag prior to printing the action to be performed on a file.
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. Unlike other methods where the matcher is passed along and narrowed, a
new matcher is created in each repo, and therefore the bad() method already used
the local repo's ui.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 13 Dec 2014 19:44:55 -0500 |
parents | d0546e8e1def |
children | 69cd91d04117 |
comparison
equal
deleted
inserted
replaced
23578:d0546e8e1def | 23579:e1c39f207719 |
---|---|
2799 targetsubs = sorted(s for s in ctx.substate if subrepomatch(s)) | 2799 targetsubs = sorted(s for s in ctx.substate if subrepomatch(s)) |
2800 | 2800 |
2801 if targetsubs: | 2801 if targetsubs: |
2802 # Revert the subrepos on the revert list | 2802 # Revert the subrepos on the revert list |
2803 for sub in targetsubs: | 2803 for sub in targetsubs: |
2804 ctx.sub(sub).revert(ui, ctx.substate[sub], *pats, **opts) | 2804 ctx.sub(sub).revert(ctx.substate[sub], *pats, **opts) |
2805 finally: | 2805 finally: |
2806 wlock.release() | 2806 wlock.release() |
2807 | 2807 |
2808 def _revertprefetch(repo, ctx, *files): | 2808 def _revertprefetch(repo, ctx, *files): |
2809 """Let extension changing the storage layer prefetch content""" | 2809 """Let extension changing the storage layer prefetch content""" |