Mercurial > hg
changeset 28340:c100dbd593e2
histedit: reword message when a changeset produces no changes
There are various ways to use histedit such that an item in
the list of things to perform will not result in a change
relative to the previous repository state.
When that happens, histedit does not keep the commit/message.
This changes the note to try to explain to the user that it
will not be present in their history.
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 02 Mar 2016 22:39:03 +0000 |
parents | 67fa77e40702 |
children | 8286f551b7ee |
files | hgext/histedit.py tests/test-histedit-fold-non-commute.t tests/test-histedit-non-commute.t |
diffstat | 3 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/histedit.py Wed Mar 02 22:09:18 2016 +0000 +++ b/hgext/histedit.py Wed Mar 02 22:39:03 2016 +0000 @@ -482,7 +482,7 @@ rulectx.""" ctx = self.repo['.'] if ctx.node() == self.state.parentctxnode: - self.repo.ui.warn(_('%s: empty changeset\n') % + self.repo.ui.warn(_('%s: skipping changeset (no changes)\n') % node.short(self.node)) return ctx, [(self.node, tuple())] if ctx.node() == self.node:
--- a/tests/test-histedit-fold-non-commute.t Wed Mar 02 22:09:18 2016 +0000 +++ b/tests/test-histedit-fold-non-commute.t Wed Mar 02 22:39:03 2016 +0000 @@ -117,12 +117,14 @@ (hg histedit --continue to resume) just continue this time +keep the non-commuting change, and thus the pending change will be dropped $ hg revert -r 'p1()' e $ hg resolve --mark e (no more unresolved files) continue: hg histedit --continue + $ hg diff $ hg histedit --continue 2>&1 | fixbundle - 7b4e2f4b7bcd: empty changeset + 7b4e2f4b7bcd: skipping changeset (no changes) log after edit $ hg log --graph @@ -262,7 +264,7 @@ (no more unresolved files) continue: hg histedit --continue $ hg histedit --continue 2>&1 | fixbundle - 7b4e2f4b7bcd: empty changeset + 7b4e2f4b7bcd: skipping changeset (no changes) log after edit $ hg log --graph
--- a/tests/test-histedit-non-commute.t Wed Mar 02 22:09:18 2016 +0000 +++ b/tests/test-histedit-non-commute.t Wed Mar 02 22:39:03 2016 +0000 @@ -171,7 +171,7 @@ (no more unresolved files) continue: hg histedit --continue $ hg histedit --continue 2>&1 | fixbundle - 7b4e2f4b7bcd: empty changeset + 7b4e2f4b7bcd: skipping changeset (no changes) log after edit $ hg log --graph @@ -254,7 +254,7 @@ (no more unresolved files) continue: hg histedit --continue $ hg histedit --continue 2>&1 | fixbundle - 7b4e2f4b7bcd: empty changeset + 7b4e2f4b7bcd: skipping changeset (no changes) post message fix $ hg log --graph