Mercurial > hg > mercurial-source
changeset 23977:6156edaa82aa stable
revert: move prefetch to after the actions logic
The prefetch logic came before the actual population of the actions collection,
so it was always being passed an empty action list. This fixes it by moving it
to after that logic.
The only consumer of this function at the moment is remotefilelog, and I
verified it works with this change.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 27 Jan 2015 19:52:26 -0800 |
parents | f1c127df7c4f |
children | 2d2c0a8eeeb8 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2765,9 +2765,6 @@ (unknown, actions['unknown'], discard), ) - needdata = ('revert', 'add', 'undelete') - _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata]) - wctx = repo[None] for abs, (rel, exact) in sorted(names.items()): # target file to be touch on disk (relative to cwd) @@ -2797,6 +2794,9 @@ if not opts.get('dry_run'): + needdata = ('revert', 'add', 'undelete') + _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata]) + _performrevert(repo, parents, ctx, actions) # get the list of subrepos that must be reverted