Mercurial > evolve
diff tests/test-touch.t @ 1589:d6630a6bff86
touch: prompt the user for what to do with the revived changeset
This patch improves our interface for reviving changesets.
This patch makes touch not assume that the user wants to create divergence by
default and gives a prompt instead. The prompt is skipped for changeset that
have no living successor as no divergence would be created by reviving them
anyway.
To restore the previous behavior, one should now use the --allowdivergence flag.
The prompt looks like:
[10] <description>
reviving this changeset will create divergence unless you make a duplicate.
(a)llow divergence or (d)uplicate the changeset? a
In further patches we will want to add one more choice to that prompt, for
example having a marker between the old and revived nodes but no divergence
displayed on the UI.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Sun, 17 Jan 2016 16:55:40 -0800 |
parents | 6c122c975125 |
children | c2739551ea4e a7dcfff8c4a9 |
line wrap: on
line diff
--- a/tests/test-touch.t Wed Jan 27 13:57:08 2016 -0800 +++ b/tests/test-touch.t Sun Jan 17 16:55:40 2016 -0800 @@ -41,6 +41,9 @@ @ 1:[0-9a-f]{12} a (re) $ hg touch . + [1] a + reviving this changeset will create divergence unless you make a duplicate. + (a)llow divergence or (d)uplicate the changeset? a 2 new divergent changesets $ hg log -G @ 4:[0-9a-f]{12} a (re) @@ -110,3 +113,15 @@ A gna2 gna1 R gna1 + +check that the --duplicate option does not create divergence + + $ hg touch --duplicate 11 --hidden + 1 new unstable changesets + +check that reviving a changeset with no successor does not show the prompt + + $ hg prune 14 + 1 changesets pruned + $ hg touch 14 --hidden + 1 new unstable changesets