diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -997,7 +997,7 @@ def _histedit(ui, repo, state, *freeargs # check whether we should update away if repo.unfiltered().revs('parents() and (%n or %ln::)', state.parentctxnode, leafs | tmpnodes): - hg.clean(repo, state.topmost) + hg.clean(repo, state.topmost, show_stats=True, quietempty=True) cleanupnode(ui, repo, 'created', tmpnodes) cleanupnode(ui, repo, 'temp', leafs) except Exception: diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -663,12 +663,12 @@ def update(repo, node): # naming conflict in clone() _update = update -def clean(repo, node, show_stats=True): +def clean(repo, node, show_stats=True, quietempty=False): """forcibly switch the working directory to node, clobbering changes""" stats = updaterepo(repo, node, True) util.unlinkpath(repo.join('graftstate'), ignoremissing=True) if show_stats: - _showstats(repo, stats) + _showstats(repo, stats, quietempty) return stats[3] > 0 def merge(repo, node, force=None, remind=True): diff --git a/tests/test-histedit-no-change.t b/tests/test-histedit-no-change.t --- a/tests/test-histedit-no-change.t +++ b/tests/test-histedit-no-change.t @@ -207,5 +207,16 @@ modified files should survive the abort | @ 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a" +aborting and not changing files can skip mentioning updating (no) files + $ hg up + 5 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg commit --close-branch -m 'closebranch' + $ startediting 1 1 "(not changing anything)" # edit the 3rd of 3 changesets + % start editing the history (not changing anything) + | edit 292aec348d9e 6 closebranch + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + Make changes as needed, you may commit or record as needed now. + When you are finished, run hg histedit --continue to resume. + $ hg histedit --abort $ cd ..