Mercurial > hg
comparison tests/test-split.t @ 41982:f8c5225b9054
patch: include flag-only file changes in "special" when filtering (issue5864)
This patch fix the issue5864 (or maybe issue5865 too) which occurs during
split (or I should say at the time of filtering the hunks in interactive
mode) where user hits a not ending loop of "no changes to record".
And it's not only the case for split it will happen in every interactive
case for e.g. `hg commit -i` or `hg uncommit -i`
After looking into code I found that when filtering we have some
notation called "special" for the file headers which doesn't contain
any hunk and just contain the header (for e.g. newly added empty file
or deleted file) where the user cannot change the content of operation.
And I think we can put this "flag-only" file change in that same bucket
of "special". But I doubt a bit about the case when a file have flag change
and atleast one hunk then user won't be able to separate the flag change
from hunks.
Changed test file reflect the fixed behaviour.
Differential Revision: https://phab.mercurial-scm.org/D6058
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sun, 03 Mar 2019 20:16:22 +0530 |
parents | 0cbcb3e13fcf |
children | f802a75da585 |
comparison
equal
deleted
inserted
replaced
41981:a920a9e1795a | 41982:f8c5225b9054 |
---|---|
730 | | 730 | |
731 o 0:51f273a58d82 initial | 731 o 0:51f273a58d82 initial |
732 | 732 |
733 | 733 |
734 #if no-windows | 734 #if no-windows |
735 $ printf 'y\ny\ny\n' | hg split | 735 $ cat > $TESTTMP/messages <<EOF |
736 > split 1 | |
737 > EOF | |
738 $ printf 'y\n' | hg split | |
736 diff --git a/foo b/foo | 739 diff --git a/foo b/foo |
737 old mode 100644 | 740 old mode 100644 |
738 new mode 100755 | 741 new mode 100755 |
739 examine changes to 'foo'? [Ynesfdaq?] y | 742 examine changes to 'foo'? [Ynesfdaq?] y |
740 | 743 |
741 no changes to record | 744 EDITOR: HG: Splitting 3a2125f0f4cb. Write commit message for the first split changeset. |
742 diff --git a/foo b/foo | 745 EDITOR: make executable |
743 old mode 100644 | 746 EDITOR: |
744 new mode 100755 | 747 EDITOR: |
745 examine changes to 'foo'? [Ynesfdaq?] y | 748 EDITOR: HG: Enter commit message. Lines beginning with 'HG:' are removed. |
746 | 749 EDITOR: HG: Leave message empty to abort commit. |
747 no changes to record | 750 EDITOR: HG: -- |
748 diff --git a/foo b/foo | 751 EDITOR: HG: user: test |
749 old mode 100644 | 752 EDITOR: HG: branch 'default' |
750 new mode 100755 | 753 EDITOR: HG: changed foo |
751 examine changes to 'foo'? [Ynesfdaq?] y | 754 created new head |
752 | 755 saved backup bundle to $TESTTMP/issue5864/.hg/strip-backup/3a2125f0f4cb-629e4432-split.hg (obsstore-off !) |
753 no changes to record | 756 |
754 diff --git a/foo b/foo | 757 $ hg log -G -T "{node|short} {desc}\n" |
755 old mode 100644 | 758 @ b154670c87da split 1 |
756 new mode 100755 | 759 | |
757 examine changes to 'foo'? [Ynesfdaq?] abort: response expected | 760 o 51f273a58d82 initial |
758 [255] | 761 |
759 #else | 762 #else |
760 | 763 |
761 TODO: Fix this on Windows. See issue 2020 and 5883 | 764 TODO: Fix this on Windows. See issue 2020 and 5883 |
762 | 765 |
763 $ printf 'y\ny\ny\n' | hg split | 766 $ printf 'y\ny\ny\n' | hg split |