Mercurial > hg
changeset 25755:72d395e399c1
cmdutil: remove useless dirstate.normallookup() invocation in revert()
Explicit 'dirstate.normallookup()' invocation in 'revert()' is useless
now, because previous patch fixed the relevant issue by writing
in-memory dirstate changes out at the end of dirty check.
'dirstate.normallookup()' invocation was introduced by 21b33f0460e0 to
avoid occasional test failure (see issue4583 for detail). This is
partial backout of it (added tests are still left).
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 08 Jul 2015 17:01:09 +0900 |
parents | 19cc443aac34 |
children | a4a41525180c |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Wed Jul 08 17:01:09 2015 +0900 +++ b/mercurial/cmdutil.py Wed Jul 08 17:01:09 2015 +0900 @@ -3068,7 +3068,7 @@ node = ctx.node() def checkout(f): fc = ctx[f] - return repo.wwrite(f, fc.data(), fc.flags()) + repo.wwrite(f, fc.data(), fc.flags()) audit_path = pathutil.pathauditor(repo.root) for f in actions['forget'][0]: @@ -3135,13 +3135,9 @@ del fp else: for f in actions['revert'][0]: - wsize = checkout(f) + checkout(f) if normal: normal(f) - elif wsize == repo.dirstate._map[f][2]: - # changes may be overlooked without normallookup, - # if size isn't changed at reverting - repo.dirstate.normallookup(f) for f in actions['add'][0]: # Don't checkout modified files, they are already created by the diff