Mercurial > evolve
changeset 5502:77c0ddd6f172 stable
split: use the last created commit as target for discard action
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 22 Aug 2020 07:24:46 +0800 |
parents | 1896d6bc574b |
children | 95478db35f88 |
files | CHANGELOG hgext3rd/evolve/cmdrewrite.py tests/test-split.t |
diffstat | 3 files changed, 5 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGELOG Sat Aug 22 07:18:55 2020 +0800 +++ b/CHANGELOG Sat Aug 22 07:24:46 2020 +0800 @@ -7,6 +7,9 @@ * py3: use '%d' for formatting revision numbers in stable range cache warning (issue6390) + * split: correctly handle discard action after previously splitting changes + into more than one commit + 10.0.1 -- 2020-07-31 --------------------
--- a/hgext3rd/evolve/cmdrewrite.py Sat Aug 22 07:18:55 2020 +0800 +++ b/hgext3rd/evolve/cmdrewrite.py Sat Aug 22 07:24:46 2020 +0800 @@ -1307,7 +1307,7 @@ # diff action or by showing the remaining and # prompting for confirmation ui.status(_(b'discarding remaining changes\n')) - target = newcommits[0] + target = newcommits[-1] args = [] kwargs = {} code = cmdutil.revert.__code__
--- a/tests/test-split.t Sat Aug 22 07:18:55 2020 +0800 +++ b/tests/test-split.t Sat Aug 22 07:24:46 2020 +0800 @@ -1316,8 +1316,6 @@ > f > d > d - > s - > c > EOF 0 files updated, 0 files merged, 3 files removed, 0 files unresolved adding a @@ -1349,25 +1347,9 @@ continue splitting? [Ycdq?] d discarding remaining changes forgetting c - removing b - diff --git a/b b/b - deleted file mode 100644 - examine changes to 'b'? - (enter ? for help) [Ynesfdaq?] s - - no changes to record - continue splitting? [Ycdq?] c $ hg glog -p - @ 3:bdee57117c76 split3 (draft) - | diff --git a/b b/b - | deleted file mode 100644 - | --- a/b - | +++ /dev/null - | @@ -1,1 +0,0 @@ - | -b - | - o 2:c2c6f4d8c766 split2 (draft) + @ 2:c2c6f4d8c766 split2 (draft) | diff --git a/b b/b | new file mode 100644 | --- /dev/null