histedit: omit useless message from abort
specifically:
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
--- a/hgext/histedit.py Mon Dec 14 23:13:25 2015 +0000
+++ b/hgext/histedit.py Mon Dec 14 22:08:14 2015 +0000
@@ -997,7 +997,7 @@
# 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:
--- a/mercurial/hg.py Mon Dec 14 23:13:25 2015 +0000
+++ b/mercurial/hg.py Mon Dec 14 22:08:14 2015 +0000
@@ -663,12 +663,12 @@
# 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):
--- a/tests/test-histedit-no-change.t Mon Dec 14 23:13:25 2015 +0000
+++ b/tests/test-histedit-no-change.t Mon Dec 14 22:08:14 2015 +0000
@@ -207,5 +207,16 @@
|
@ 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 ..