Mercurial > hg
annotate tests/test-histedit-no-backup.t @ 39286:3c4b2e880273
log: respect graphshorten on terminal nodes (collapsing o-~ to just o~)
Internally we have a custom template that's inspired by ones that we have seen
in the community. Normally, this looks something like:
o 0834ec17 spectral tip
| crecord: support x to toggle single, X to toggle a range
o ee932990 spectral @
| filemerge: allow specifying $hgeditor as merge-tools.X.executable
@ 66f04611 matt_harbison
| cext: fix truncation warnings in revlog on Windows
o 42cc76d0 matt_harbison
| cext: fix revlog compiler error on Windows
~
o bd63ada7 stable boris
| phases: drop dead code in `newheads`
~
With graphshorten on, and the descriptions of the public nodes hidden, it looks
like this, note that the commits right before the ~ are still "full height":
o 0834ec17 spectral tip
| crecord: support x to toggle single, X to toggle a range
o ee932990 spectral @
| filemerge: allow specifying $hgeditor as merge-tools.X.executable
@ 66f04611 matt_harbison
o 42cc76d0 matt_harbison
|
~
o bd63ada7 stable boris
|
~
This patch makes them look like this, removing the | but keeping the ~:
o 0834ec17 spectral tip
| crecord: support x to toggle single, X to toggle a range
o ee932990 spectral @
| filemerge: allow specifying $hgeditor as merge-tools.X.executable
@ 66f04611 matt_harbison
o 42cc76d0 matt_harbison
~
o bd63ada7 stable boris
~
This originally removed the ~s entirely, but this was determined to be too much
information loss and potentially confusing. This would have looked like the
following (note that the last commit is on a different branch than all of the
ones above it, and they are *not* linearly related):
o 0834ec17 spectral tip
| crecord: support x to toggle single, X to toggle a range
o ee932990 spectral @
| filemerge: allow specifying $hgeditor as merge-tools.X.executable
@ 66f04611 matt_harbison
o 42cc76d0 matt_harbison
o bd63ada7 stable boris
Differential Revision: https://phab.mercurial-scm.org/D4363
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Thu, 23 Aug 2018 13:33:19 -0700 |
parents | faea9b1980d9 |
children | 6acbe86c6490 |
rev | line source |
---|---|
38548
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
1 $ . "$TESTDIR/histedit-helpers.sh" |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
2 |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
3 Enable extension used by this test |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
4 $ cat >>$HGRCPATH <<EOF |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
5 > [extensions] |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
6 > histedit= |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
7 > EOF |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
8 |
38738
faea9b1980d9
histedit: drop --no-backup option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38733
diff
changeset
|
9 ========================================== |
faea9b1980d9
histedit: drop --no-backup option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38733
diff
changeset
|
10 Test history-editing-backup config option| |
faea9b1980d9
histedit: drop --no-backup option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38733
diff
changeset
|
11 ========================================== |
38548
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
12 Repo setup: |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
13 $ hg init foo |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
14 $ cd foo |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
15 $ echo first>file |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
16 $ hg ci -qAm one |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
17 $ echo second>>file |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
18 $ hg ci -m two |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
19 $ echo third>>file |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
20 $ hg ci -m three |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
21 $ echo forth>>file |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
22 $ hg ci -m four |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
23 $ hg log -G --style compact |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
24 @ 3[tip] 7d5187087c79 1970-01-01 00:00 +0000 test |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
25 | four |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
26 | |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
27 o 2 80d23dfa866d 1970-01-01 00:00 +0000 test |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
28 | three |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
29 | |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
30 o 1 6153eb23e623 1970-01-01 00:00 +0000 test |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
31 | two |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
32 | |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
33 o 0 36b4bdd91f5b 1970-01-01 00:00 +0000 test |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
34 one |
7b57b1ed5c0f
histedit: add --no-backup option (issue5825)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
35 |
38733
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
36 Test when `history-editing-backup` config option is enabled: |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
37 $ hg histedit -r '36b4bdd91f5b' --commands - << EOF |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
38 > pick 36b4bdd91f5b 0 one |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
39 > pick 6153eb23e623 1 two |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
40 > roll 80d23dfa866d 2 three |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
41 > edit 7d5187087c79 3 four |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
42 > EOF |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
43 merging file |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
44 Editing (7d5187087c79), you may commit or record as needed now. |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
45 (hg histedit --continue to resume) |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
46 [1] |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
47 $ hg histedit --abort |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
49 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/1d8f701c7b35-cf7be322-backup.hg |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
50 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/5c0056670bce-b54b65d0-backup.hg |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
51 |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
52 Test when `history-editing-backup` config option is not enabled |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
53 Enable config option: |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
54 $ cat >>$HGRCPATH <<EOF |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
55 > [ui] |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
56 > history-editing-backup=False |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
57 > EOF |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
58 |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
59 $ hg histedit -r '36b4bdd91f5b' --commands - << EOF |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
60 > pick 36b4bdd91f5b 0 one |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
61 > pick 6153eb23e623 1 two |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
62 > roll 80d23dfa866d 2 three |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
63 > edit 7d5187087c79 3 four |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
64 > EOF |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
65 merging file |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
66 Editing (7d5187087c79), you may commit or record as needed now. |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
67 (hg histedit --continue to resume) |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
68 [1] |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
69 $ hg histedit --abort |
c2586a6e5884
histedit: add history-editing-backup config option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
38548
diff
changeset
|
70 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |