Mercurial > hg
changeset 25657:dcc56e10c23b
revert: change the direction of revert -i
After the discussion on the list about hg revert -i, it seems like we are
satisfied with what we called proposition 2. It shows the changes to revert in
the same direction as hg diff. This patch makes it the default option.
It changes all the + in - and vice versa in the tests for revert -i.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Tue, 23 Jun 2015 14:28:15 -0700 |
parents | 88d244f4edfd |
children | e93036747902 |
files | mercurial/cmdutil.py tests/test-revert-interactive.t |
diffstat | 2 files changed, 33 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Tue Jun 23 13:46:58 2015 -0700 +++ b/mercurial/cmdutil.py Tue Jun 23 14:28:15 2015 -0700 @@ -3102,7 +3102,7 @@ diffopts.git = True reversehunks = repo.ui.configbool('experimental', 'revertalternateinteractivemode', - False) + True) if reversehunks: diff = patch.diff(repo, ctx.node(), None, m, opts=diffopts) else:
--- a/tests/test-revert-interactive.t Tue Jun 23 13:46:58 2015 -0700 +++ b/tests/test-revert-interactive.t Tue Jun 23 14:28:15 2015 -0700 @@ -56,8 +56,8 @@ 2 hunks, 2 lines changed examine changes to 'f'? [Ynesfdaq?] y - @@ -1,6 +1,5 @@ - -a + @@ -1,5 +1,6 @@ + +a 1 2 3 @@ -65,21 +65,21 @@ 5 record change 1/6 to 'f'? [Ynesfdaq?] y - @@ -2,6 +1,5 @@ + @@ -1,5 +2,6 @@ 1 2 3 4 5 - -b + +b record change 2/6 to 'f'? [Ynesfdaq?] y diff --git a/folder1/g b/folder1/g 2 hunks, 2 lines changed examine changes to 'folder1/g'? [Ynesfdaq?] y - @@ -1,6 +1,5 @@ - -c + @@ -1,5 +1,6 @@ + +c 1 2 3 @@ -87,13 +87,13 @@ 5 record change 3/6 to 'folder1/g'? [Ynesfdaq?] y - @@ -2,6 +1,5 @@ + @@ -1,5 +2,6 @@ 1 2 3 4 5 - -d + +d record change 4/6 to 'folder1/g'? [Ynesfdaq?] n diff --git a/folder2/h b/folder2/h @@ -155,8 +155,8 @@ 2 hunks, 2 lines changed examine changes to 'f'? [Ynesfdaq?] y - @@ -1,6 +1,5 @@ - -a + @@ -1,5 +1,6 @@ + +a 1 2 3 @@ -164,21 +164,21 @@ 5 record change 1/6 to 'f'? [Ynesfdaq?] y - @@ -2,6 +1,5 @@ + @@ -1,5 +2,6 @@ 1 2 3 4 5 - -b + +b record change 2/6 to 'f'? [Ynesfdaq?] y diff --git a/folder1/g b/folder1/g 2 hunks, 2 lines changed examine changes to 'folder1/g'? [Ynesfdaq?] y - @@ -1,6 +1,5 @@ - -c + @@ -1,5 +1,6 @@ + +c 1 2 3 @@ -186,13 +186,13 @@ 5 record change 3/6 to 'folder1/g'? [Ynesfdaq?] y - @@ -2,6 +1,5 @@ + @@ -1,5 +2,6 @@ 1 2 3 4 5 - -d + +d record change 4/6 to 'folder1/g'? [Ynesfdaq?] n diff --git a/folder2/h b/folder2/h @@ -234,8 +234,8 @@ 2 hunks, 2 lines changed examine changes to 'f'? [Ynesfdaq?] y - @@ -1,5 +1,6 @@ - +a + @@ -1,6 +1,5 @@ + -a 1 2 3 @@ -243,13 +243,13 @@ 5 record change 1/2 to 'f'? [Ynesfdaq?] y - @@ -1,5 +2,6 @@ + @@ -2,6 +1,5 @@ 1 2 3 4 5 - +b + -b record change 2/2 to 'f'? [Ynesfdaq?] n $ hg st @@ -298,10 +298,10 @@ 1 hunks, 2 lines changed examine changes to 'k'? [Ynesfdaq?] y - @@ -1,2 +1,1 @@ - -0 - -2 - +1 + @@ -1,1 +1,2 @@ + -1 + +0 + +2 record this change to 'k'? [Ynesfdaq?] e $ cat k @@ -310,7 +310,7 @@ Check the experimental config to invert the selection: $ cat <<EOF >> $HGRCPATH > [experimental] - > revertalternateinteractivemode=True + > revertalternateinteractivemode=False > EOF @@ -343,29 +343,29 @@ 3 hunks, 3 lines changed examine changes to 'folder1/g'? [Ynesfdaq?] y - @@ -1,4 +1,5 @@ - +firstline + @@ -1,5 +1,4 @@ + -firstline c 1 2 3 record change 1/3 to 'folder1/g'? [Ynesfdaq?] y - @@ -1,7 +2,7 @@ + @@ -2,7 +1,7 @@ c 1 2 3 - -4 - + 3 + - 3 + +4 5 d record change 2/3 to 'folder1/g'? [Ynesfdaq?] y - @@ -6,2 +7,3 @@ + @@ -7,3 +6,2 @@ 5 d - +lastline + -lastline record change 3/3 to 'folder1/g'? [Ynesfdaq?] n $ hg diff --nodates