diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1124,7 +1124,7 @@ if next: index += 1 else: - index += 1 + index -= 1 changeaction(state, pos, KEY_LIST[index % len(KEY_LIST)]) def changeview(state, delta, unit): diff --git a/mercurial/similar.py b/mercurial/similar.py --- a/mercurial/similar.py +++ b/mercurial/similar.py @@ -63,6 +63,7 @@ equal += len(line) lengths = len(text) + len(orig) + if lengths > 0: return equal * 2.0 / lengths def score(fctx1, fctx2):