tests/test-rebase-interruptions.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 21 Dec 2020 11:20:31 +0100
changeset 46584 aa19d60ac974
parent 46417 768056549737
permissions -rw-r--r--
copies-rust: use simpler overwrite when value on both side are identical If the value are the same, their "overwritten" set is the same and we don't need to combine them. It helps our slower cases Repo Case Source-Rev Dest-Rev # of revisions old time new time Difference Factor time per rev --------------------------------------------------------------------------------------------------------------------------------------------------------------- mozilla-try x00000_revs_x00000_added_x0000_copies 1b661134e2ca 1ae03d022d6d : 228985 revs, 86.722016 s, 80.828689 s, -5.893327 s, × 0.9320, 352 µs/rev mozilla-try x00000_revs_x00000_added_x000_copies 9b2a99adc05e 8e29777b48e6 : 382065 revs, 35.113727 s, 34.094064 s, -1.019663 s, × 0.9710, 89 µs/rev Full comparison with the previous revision below: Repo Case Source-Rev Dest-Rev # of revisions old time new time Difference Factor time per rev --------------------------------------------------------------------------------------------------------------------------------------------------------------- mercurial x_revs_x_added_0_copies ad6b123de1c7 39cfcef4f463 : 1 revs, 0.000043 s, 0.000043 s, +0.000000 s, × 1.0000, 43 µs/rev mercurial x_revs_x_added_x_copies 2b1c78674230 0c1d10351869 : 6 revs, 0.000114 s, 0.000114 s, +0.000000 s, × 1.0000, 19 µs/rev mercurial x000_revs_x000_added_x_copies 81f8ff2a9bf2 dd3267698d84 : 1032 revs, 0.004899 s, 0.004899 s, +0.000000 s, × 1.0000, 4 µs/rev pypy x_revs_x_added_0_copies aed021ee8ae8 099ed31b181b : 9 revs, 0.000196 s, 0.000196 s, +0.000000 s, × 1.0000, 21 µs/rev pypy x_revs_x000_added_0_copies 4aa4e1f8e19a 359343b9ac0e : 1 revs, 0.000050 s, 0.000049 s, -0.000001 s, × 0.9800, 49 µs/rev pypy x_revs_x_added_x_copies ac52eb7bbbb0 72e022663155 : 7 revs, 0.000125 s, 0.000117 s, -0.000008 s, × 0.9360, 16 µs/rev pypy x_revs_x00_added_x_copies c3b14617fbd7 ace7255d9a26 : 1 revs, 0.000321 s, 0.6f1f4a s, +0.000001 s, × 1.0031, 322 µs/rev pypy x_revs_x000_added_x000_copies df6f7a526b60 a83dc6a2d56f : 6 revs, 0.011948 s, 0.011856 s, -0.000092 s, × 0.9923, 1976 µs/rev pypy x000_revs_xx00_added_0_copies 89a76aede314 2f22446ff07e : 4785 revs, 0.051267 s, 0.050992 s, -0.000275 s, × 0.9946, 10 µs/rev pypy x000_revs_x000_added_x_copies 8a3b5bfd266e 2c68e87c3efe : 6780 revs, 0.087755 s, 0.087444 s, -0.000311 s, × 0.9965, 12 µs/rev pypy x000_revs_x000_added_x000_copies 89a76aede314 7b3dda341c84 : 5441 revs, 0.061818 s, 0.062487 s, +0.000669 s, × 1.0108, 11 µs/rev pypy x0000_revs_x_added_0_copies d1defd0dc478 c9cb1334cc78 : 43645 revs, 0.634253 s, 0.634909 s, +0.000656 s, × 1.0010, 14 µs/rev pypy x0000_revs_xx000_added_0_copies bf2c629d0071 4ffed77c095c : 2 revs, 0.013179 s, 0.013360 s, +0.000181 s, × 1.0137, 6680 µs/rev pypy x0000_revs_xx000_added_x000_copies 08ea3258278e d9fa043f30c0 : 11316 revs, 0.119643 s, 0.120775 s, +0.001132 s, × 1.0095, 10 µs/rev netbeans x_revs_x_added_0_copies fb0955ffcbcd a01e9239f9e7 : 2 revs, 0.000085 s, 0.000085 s, +0.000000 s, × 1.0000, 42 µs/rev netbeans x_revs_x000_added_0_copies 6f360122949f 20eb231cc7d0 : 2 revs, 0.000107 s, 0.000108 s, +0.000001 s, × 1.0093, 54 µs/rev netbeans x_revs_x_added_x_copies 1ada3faf6fb6 5a39d12eecf4 : 3 revs, 0.000176 s, 0.000176 s, +0.000000 s, × 1.0000, 58 µs/rev netbeans x_revs_x00_added_x_copies 35be93ba1e2c 9eec5e90c05f : 9 revs, 0.000743 s, 0.000747 s, +0.000004 s, × 1.0054, 83 µs/rev netbeans x000_revs_xx00_added_0_copies eac3045b4fdd 51d4ae7f1290 : 1421 revs, 0.010246 s, 0.010128 s, -0.000118 s, × 0.9885, 7 µs/rev netbeans x000_revs_x000_added_x_copies e2063d266acd 6081d72689dc : 1533 revs, 0.015853 s, 0.015899 s, +0.000046 s, × 1.0029, 10 µs/rev netbeans x000_revs_x000_added_x000_copies ff453e9fee32 411350406ec2 : 5750 revs, 0.062971 s, 0.062215 s, -0.000756 s, × 0.9880, 10 µs/rev netbeans x0000_revs_xx000_added_x000_copies 588c2d1ced70 1aad62e59ddd : 66949 revs, 0.518337 s, 0.521004 s, +0.002667 s, × 1.0051, 7 µs/rev mozilla-central x_revs_x_added_0_copies 3697f962bb7b 7015fcdd43a2 : 2 revs, 0.000090 s, 0.000090 s, +0.000000 s, × 1.0000, 45 µs/rev mozilla-central x_revs_x000_added_0_copies dd390860c6c9 40d0c5bed75d : 8 revs, 0.000268 s, 0.000264 s, -0.000004 s, × 0.9851, 33 µs/rev mozilla-central x_revs_x_added_x_copies 8d198483ae3b 14207ffc2b2f : 9 revs, 0.000187 s, 0.000186 s, -0.000001 s, × 0.9947, 20 µs/rev mozilla-central x_revs_x00_added_x_copies 98cbc58cc6bc 446a150332c3 : 7 revs, 0.000661 s, 0.000660 s, -0.000001 s, × 0.9985, 94 µs/rev mozilla-central x_revs_x000_added_x000_copies 3c684b4b8f68 0a5e72d1b479 : 3 revs, 0.003494 s, 0.003542 s, +0.000048 s, × 1.0137, 1180 µs/rev mozilla-central x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 6 revs, 0.070509 s, 0.071574 s, +0.001065 s, × 1.0151, 11929 µs/rev mozilla-central x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 1593 revs, 0.006489 s, 0.006498 s, +0.000009 s, × 1.0014, 4 µs/rev mozilla-central x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 41 revs, 0.005070 s, 0.005206 s, +0.000136 s, × 1.0268, 126 µs/rev mozilla-central x000_revs_x000_added_x000_copies 7c97034feb78 4407bd0c6330 : 7839 revs, 0.065241 s, 0.065535 s, +0.000294 s, × 1.0045, 8 µs/rev mozilla-central x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 615 revs, 0.027284 s, 0.027139 s, -0.000145 s, × 0.9947, 44 µs/rev mozilla-central x0000_revs_xx000_added_x000_copies f78c615a656c 96a38b690156 : 30263 revs, 0.203671 s, 0.201924 s, -0.001747 s, × 0.9914, 6 µs/rev mozilla-central x00000_revs_x0000_added_x0000_copies 6832ae71433c 4c222a1d9a00 : 153721 revs, 1.239373 s, 1.257201 s, +0.017828 s, × 1.0144, 8 µs/rev mozilla-central x00000_revs_x00000_added_x000_copies 76caed42cf7c 1daa622bbe42 : 204976 revs, 1.649803 s, 1.663045 s, +0.013242 s, × 1.0080, 8 µs/rev mozilla-try x_revs_x_added_0_copies aaf6dde0deb8 9790f499805a : 2 revs, 0.000868 s, 0.000866 s, -0.000002 s, × 0.9977, 433 µs/rev mozilla-try x_revs_x000_added_0_copies d8d0222927b4 5bb8ce8c7450 : 2 revs, 0.000885 s, 0.000883 s, -0.000002 s, × 0.9977, 441 µs/rev mozilla-try x_revs_x_added_x_copies 092fcca11bdb 936255a0384a : 4 revs, 0.000165 s, 0.000163 s, -0.000002 s, × 0.9879, 40 µs/rev mozilla-try x_revs_x00_added_x_copies b53d2fadbdb5 017afae788ec : 2 revs, 0.001147 s, 0.001139 s, -0.000008 s, × 0.9930, 569 µs/rev mozilla-try x_revs_x000_added_x000_copies 20408ad61ce5 6f0ee96e21ad : 1 revs, 0.032885 s, 0.032753 s, -0.000132 s, × 0.9960, 32752 µs/rev mozilla-try x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 6 revs, 0.071304 s, 0.073266 s, +0.001962 s, × 1.0275, 12211 µs/rev mozilla-try x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 1593 revs, 0.006506 s, 0.006567 s, +0.000061 s, × 1.0094, 4 µs/rev mozilla-try x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 41 revs, 0.005486 s, 0.005427 s, -0.000059 s, × 0.9892, 132 µs/rev mozilla-try x000_revs_x000_added_x000_copies 1346fd0130e4 4c65cbdabc1f : 6657 revs, 0.064677 s, 0.064058 s, -0.000619 s, × 0.9904, 9 µs/rev mozilla-try x0000_revs_x_added_0_copies 63519bfd42ee a36a2a865d92 : 40314 revs, 0.306000 s, 0.303320 s, -0.002680 s, × 0.9912, 7 µs/rev mozilla-try x0000_revs_x_added_x_copies 9fe69ff0762d bcabf2a78927 : 38690 revs, 0.288217 s, 0.288456 s, +0.000239 s, × 1.0008, 7 µs/rev mozilla-try x0000_revs_xx000_added_x_copies 156f6e2674f2 4d0f2c178e66 : 8598 revs, 0.086117 s, 0.085925 s, -0.000192 s, × 0.9978, 9 µs/rev mozilla-try x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 615 revs, 0.027512 s, 0.027302 s, -0.000210 s, × 0.9924, 44 µs/rev mozilla-try x0000_revs_xx000_added_x000_copies 89294cd501d9 7ccb2fc7ccb5 : 97052 revs, 1.998239 s, 2.034596 s, +0.036357 s, × 1.0182, 20 µs/rev mozilla-try x0000_revs_x0000_added_x0000_copies e928c65095ed e951f4ad123a : 52031 revs, 0.688201 s, 0.694030 s, +0.005829 s, × 1.0085, 13 µs/rev mozilla-try x00000_revs_x_added_0_copies 6a320851d377 1ebb79acd503 : 363753 revs, 4.389428 s, 4.407723 s, +0.018295 s, × 1.0042, 12 µs/rev mozilla-try x00000_revs_x00000_added_0_copies dc8a3ca7010e d16fde900c9c : 34414 revs, 0.578736 s, 0.574355 s, -0.004381 s, × 0.9924, 16 µs/rev mozilla-try x00000_revs_x_added_x_copies 5173c4b6f97c 95d83ee7242d : 362229 revs, 4.363599 s, 4.457827 s, +0.094228 s, × 1.0216, 12 µs/rev mozilla-try x00000_revs_x000_added_x_copies 9126823d0e9c ca82787bb23c : 359344 revs, 4.324129 s, 4.351696 s, +0.027567 s, × 1.0064, 12 µs/rev mozilla-try x00000_revs_x0000_added_x0000_copies 8d3fafa80d4b eb884023b810 : 192665 revs, 1.565727 s, 1.570065 s, +0.004338 s, × 1.0028, 8 µs/rev mozilla-try x00000_revs_x00000_added_x0000_copies 1b661134e2ca 1ae03d022d6d : 228985 revs, 86.722016 s, 80.828689 s, -5.893327 s, × 0.9320, 352 µs/rev mozilla-try x00000_revs_x00000_added_x000_copies 9b2a99adc05e 8e29777b48e6 : 382065 revs, 35.113727 s, 34.094064 s, -1.019663 s, × 0.9710, 89 µs/rev private : 459513 revs, 27.397070 s, 27.435529 s, +0.038459 s, × 1.0014, 59 µs/rev Differential Revision: https://phab.mercurial-scm.org/D9655
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     2
  > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     3
  > rebase=
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     4
  > 
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15501
diff changeset
     5
  > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15501
diff changeset
     6
  > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15501
diff changeset
     7
  > 
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     8
  > [alias]
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
     9
  > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n"
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    10
  > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    11
  > EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    12
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    13
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    14
  $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    15
  $ cd a
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    16
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    17
  $ echo A > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    18
  $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    19
  adding A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    20
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    21
  $ echo B > B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    22
  $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    23
  adding B
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    24
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    25
  $ echo C >> A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    26
  $ hg ci -m C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    27
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    28
  $ hg up -q -C 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    29
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    30
  $ echo D >> A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    31
  $ hg ci -m D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    32
  created new head
6910
93609576244e Debashify rebase tests
Brendan Cully <brendan@kublai.com>
parents: 6906
diff changeset
    33
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    34
  $ echo E > E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    35
  $ hg ci -Am E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    36
  adding E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    37
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    38
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    39
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    40
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    41
Changes during an interruption - continue:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    42
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    43
  $ hg clone -q -u . a a1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    44
  $ cd a1
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    45
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    46
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    47
  @  4: ae36e8e3dfd7 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    48
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    49
  o  3: 46b37eabc604 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    50
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    51
  | o  2: 965c486023db 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    52
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    53
  | o  1: 27547f69f254 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    54
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    55
  o  0: 4a2df7238c3b 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    56
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    57
Rebasing B onto E:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    58
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    59
  $ hg rebase -s 1 -d 4
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
    60
  rebasing 1:27547f69f254 "B"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
    61
  rebasing 2:965c486023db "C"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    62
  merging A
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 25411
diff changeset
    63
  warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44666
diff changeset
    64
  unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
    65
  [240]
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    66
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    67
Force a commit on C during the interruption:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    68
19478
e5a5790a3185 rebase: add checkunfinished support (issue3955)
Matt Mackall <mpm@selenic.com>
parents: 18935
diff changeset
    69
  $ hg up -q -C 2 --config 'extensions.rebase=!'
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    70
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    71
  $ echo 'Extra' > Extra
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    72
  $ hg add Extra
19478
e5a5790a3185 rebase: add checkunfinished support (issue3955)
Matt Mackall <mpm@selenic.com>
parents: 18935
diff changeset
    73
  $ hg ci -m 'Extra' --config 'extensions.rebase=!'
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    74
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    75
Force this commit onto secret phase
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    76
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    77
  $ hg phase --force --secret 6
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    78
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    79
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    80
  @  6: deb5d2f93d8b secret 'Extra'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    81
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    82
  | o  5: 45396c49d53b draft 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    83
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    84
  | o  4: ae36e8e3dfd7 draft 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    85
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    86
  | o  3: 46b37eabc604 draft 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    87
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    88
  o |  2: 965c486023db draft 'C'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    89
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    90
  o |  1: 27547f69f254 draft 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    91
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
    92
  o  0: 4a2df7238c3b draft 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    93
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    94
Resume the rebasing:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    95
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    96
  $ hg rebase --continue
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
    97
  already rebased 1:27547f69f254 "B" as 45396c49d53b
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
    98
  rebasing 2:965c486023db "C"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    99
  merging A
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 25411
diff changeset
   100
  warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44666
diff changeset
   101
  unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   102
  [240]
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   103
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   104
Solve the conflict and go on:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   105
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   106
  $ echo 'conflict solved' > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   107
  $ rm A.orig
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   108
  $ hg resolve -m A
21947
b081decd9062 resolve: add parenthesis around "no more unresolved files" message
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21267
diff changeset
   109
  (no more unresolved files)
27626
157675d0f600 rebase: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents: 26614
diff changeset
   110
  continue: hg rebase --continue
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   111
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   112
  $ hg rebase --continue
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
   113
  already rebased 1:27547f69f254 "B" as 45396c49d53b
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
   114
  rebasing 2:965c486023db "C"
33332
3b7cb3d17137 rebase: use scmutil.cleanupnodes (issue5606) (BC)
Jun Wu <quark@fb.com>
parents: 33173
diff changeset
   115
  warning: orphaned descendants detected, not stripping 27547f69f254, 965c486023db
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   116
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   117
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   118
  o  7: d2d25e26288e draft 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   119
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   120
  | o  6: deb5d2f93d8b secret 'Extra'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   121
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   122
  o |  5: 45396c49d53b draft 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   123
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   124
  @ |  4: ae36e8e3dfd7 draft 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   125
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   126
  o |  3: 46b37eabc604 draft 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   127
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   128
  | o  2: 965c486023db draft 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   129
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   130
  | o  1: 27547f69f254 draft 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   131
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   132
  o  0: 4a2df7238c3b draft 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   133
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   134
  $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   135
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   136
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   137
Changes during an interruption - abort:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   138
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   139
  $ hg clone -q -u . a a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   140
  $ cd a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   141
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   142
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   143
  @  4: ae36e8e3dfd7 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   144
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   145
  o  3: 46b37eabc604 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   146
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   147
  | o  2: 965c486023db 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   148
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   149
  | o  1: 27547f69f254 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   150
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   151
  o  0: 4a2df7238c3b 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   152
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   153
Rebasing B onto E:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   154
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   155
  $ hg rebase -s 1 -d 4
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
   156
  rebasing 1:27547f69f254 "B"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
   157
  rebasing 2:965c486023db "C"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   158
  merging A
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 25411
diff changeset
   159
  warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44666
diff changeset
   160
  unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   161
  [240]
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   162
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   163
Force a commit on B' during the interruption:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   164
19478
e5a5790a3185 rebase: add checkunfinished support (issue3955)
Matt Mackall <mpm@selenic.com>
parents: 18935
diff changeset
   165
  $ hg up -q -C 5 --config 'extensions.rebase=!'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   166
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   167
  $ echo 'Extra' > Extra
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   168
  $ hg add Extra
19478
e5a5790a3185 rebase: add checkunfinished support (issue3955)
Matt Mackall <mpm@selenic.com>
parents: 18935
diff changeset
   169
  $ hg ci -m 'Extra' --config 'extensions.rebase=!'
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   170
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   171
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   172
  @  6: 402ee3642b59 'Extra'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   173
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   174
  o  5: 45396c49d53b 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   175
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   176
  o  4: ae36e8e3dfd7 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   177
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   178
  o  3: 46b37eabc604 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   179
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   180
  | o  2: 965c486023db 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   181
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   182
  | o  1: 27547f69f254 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   183
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   184
  o  0: 4a2df7238c3b 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   185
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   186
Abort the rebasing:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   187
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   188
  $ hg rebase --abort
32249
27e67cfea27f rebase: rename "target" to "destination" in messages
Martin von Zweigbergk <martinvonz@google.com>
parents: 27626
diff changeset
   189
  warning: new changesets detected on destination branch, can't strip
19518
12843143663d rebase: allow aborting when descendants detected
Matt Mackall <mpm@selenic.com>
parents: 19517
diff changeset
   190
  rebase aborted
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   191
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   192
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   193
  @  6: 402ee3642b59 'Extra'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   194
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   195
  o  5: 45396c49d53b 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   196
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   197
  o  4: ae36e8e3dfd7 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   198
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   199
  o  3: 46b37eabc604 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   200
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   201
  | o  2: 965c486023db 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   202
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   203
  | o  1: 27547f69f254 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   204
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   205
  o  0: 4a2df7238c3b 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   206
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   207
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   208
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   209
Changes during an interruption - abort (again):
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   210
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   211
  $ hg clone -q -u . a a3
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   212
  $ cd a3
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   213
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   214
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   215
  @  4: ae36e8e3dfd7 draft 'E'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   216
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   217
  o  3: 46b37eabc604 draft 'D'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   218
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   219
  | o  2: 965c486023db draft 'C'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   220
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   221
  | o  1: 27547f69f254 draft 'B'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   222
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   223
  o  0: 4a2df7238c3b draft 'A'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   224
  
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   225
Rebasing B onto E:
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   226
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   227
  $ hg rebase -s 1 -d 4
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
   228
  rebasing 1:27547f69f254 "B"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 21947
diff changeset
   229
  rebasing 2:965c486023db "C"
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   230
  merging A
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 25411
diff changeset
   231
  warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44666
diff changeset
   232
  unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   233
  [240]
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   234
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   235
Change phase on B and B'
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   236
19478
e5a5790a3185 rebase: add checkunfinished support (issue3955)
Matt Mackall <mpm@selenic.com>
parents: 18935
diff changeset
   237
  $ hg up -q -C 5 --config 'extensions.rebase=!'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   238
  $ hg phase --public 1
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   239
  $ hg phase --public 5
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   240
  $ hg phase --secret -f 2
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   241
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   242
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   243
  @  5: 45396c49d53b public 'B'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   244
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   245
  o  4: ae36e8e3dfd7 public 'E'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   246
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   247
  o  3: 46b37eabc604 public 'D'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   248
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   249
  | o  2: 965c486023db secret 'C'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   250
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   251
  | o  1: 27547f69f254 public 'B'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   252
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   253
  o  0: 4a2df7238c3b public 'A'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   254
  
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   255
Abort the rebasing:
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   256
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   257
  $ hg rebase --abort
25411
d298805fb639 phases: rewrite "immutable changeset" to "public changeset"
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 23517
diff changeset
   258
  warning: can't clean up public changesets 45396c49d53b
19517
eab2ff59481e rebase: continue abort without strip for immutable csets (issue3997)
Matt Mackall <mpm@selenic.com>
parents: 19478
diff changeset
   259
  rebase aborted
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   260
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   261
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   262
  @  5: 45396c49d53b public 'B'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   263
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   264
  o  4: ae36e8e3dfd7 public 'E'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   265
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   266
  o  3: 46b37eabc604 public 'D'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   267
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   268
  | o  2: 965c486023db secret 'C'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   269
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   270
  | o  1: 27547f69f254 public 'B'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   271
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   272
  o  0: 4a2df7238c3b public 'A'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   273
  
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   274
Test rebase interrupted by hooks
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   275
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   276
  $ hg up 2
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   277
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   278
  $ echo F > F
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   279
  $ hg add F
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   280
  $ hg ci -m F
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   281
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   282
  $ cd ..
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   283
44665
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   284
Continue rebase after upgrading from an hg version before 9c9cfecd4600:
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   285
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   286
  $ hg clone -q -u . a a4
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   287
  $ cd a4
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   288
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   289
  $ hg tglog
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   290
  @  4: ae36e8e3dfd7 'E'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   291
  |
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   292
  o  3: 46b37eabc604 'D'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   293
  |
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   294
  | o  2: 965c486023db 'C'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   295
  | |
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   296
  | o  1: 27547f69f254 'B'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   297
  |/
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   298
  o  0: 4a2df7238c3b 'A'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   299
  
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   300
  $ hg rebase -s 1 -d 4
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   301
  rebasing 1:27547f69f254 "B"
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   302
  rebasing 2:965c486023db "C"
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   303
  merging A
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   304
  warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44666
diff changeset
   305
  unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   306
  [240]
44665
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   307
  $ hg tglog
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   308
  @  5: 45396c49d53b 'B'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   309
  |
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   310
  o  4: ae36e8e3dfd7 'E'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   311
  |
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   312
  o  3: 46b37eabc604 'D'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   313
  |
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   314
  | %  2: 965c486023db 'C'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   315
  | |
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   316
  | o  1: 27547f69f254 'B'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   317
  |/
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   318
  o  0: 4a2df7238c3b 'A'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   319
  
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   320
Simulate having run the above with an older hg version by manually setting
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   321
two dirstate parents. We should not get a merge commit when we continue.
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   322
  $ hg debugsetparents 5 2
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   323
  $ echo 'conflict solved' > A
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   324
  $ hg resolve -m A
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   325
  (no more unresolved files)
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   326
  continue: hg rebase --continue
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   327
  $ hg rebase --continue
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   328
  already rebased 1:27547f69f254 "B" as 45396c49d53b
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   329
  rebasing 2:965c486023db "C"
44666
e7af56a0733e rebase: don't create merge when continuing rebase interrupted by old hg
Martin von Zweigbergk <martinvonz@google.com>
parents: 44665
diff changeset
   330
  saved backup bundle to $TESTTMP/a4/.hg/strip-backup/27547f69f254-359abdd7-rebase.hg
44665
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   331
  $ hg tglog
44666
e7af56a0733e rebase: don't create merge when continuing rebase interrupted by old hg
Martin von Zweigbergk <martinvonz@google.com>
parents: 44665
diff changeset
   332
  o  4: d2d25e26288e 'C'
e7af56a0733e rebase: don't create merge when continuing rebase interrupted by old hg
Martin von Zweigbergk <martinvonz@google.com>
parents: 44665
diff changeset
   333
  |
e7af56a0733e rebase: don't create merge when continuing rebase interrupted by old hg
Martin von Zweigbergk <martinvonz@google.com>
parents: 44665
diff changeset
   334
  o  3: 45396c49d53b 'B'
e7af56a0733e rebase: don't create merge when continuing rebase interrupted by old hg
Martin von Zweigbergk <martinvonz@google.com>
parents: 44665
diff changeset
   335
  |
e7af56a0733e rebase: don't create merge when continuing rebase interrupted by old hg
Martin von Zweigbergk <martinvonz@google.com>
parents: 44665
diff changeset
   336
  @  2: ae36e8e3dfd7 'E'
e7af56a0733e rebase: don't create merge when continuing rebase interrupted by old hg
Martin von Zweigbergk <martinvonz@google.com>
parents: 44665
diff changeset
   337
  |
e7af56a0733e rebase: don't create merge when continuing rebase interrupted by old hg
Martin von Zweigbergk <martinvonz@google.com>
parents: 44665
diff changeset
   338
  o  1: 46b37eabc604 'D'
e7af56a0733e rebase: don't create merge when continuing rebase interrupted by old hg
Martin von Zweigbergk <martinvonz@google.com>
parents: 44665
diff changeset
   339
  |
44665
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   340
  o  0: 4a2df7238c3b 'A'
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   341
  
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   342
  $ cd ..
e89b3603d3da tests: demonstrate how continuing rebase after upgrade can result in merge
Martin von Zweigbergk <martinvonz@google.com>
parents: 44347
diff changeset
   343
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   344
(precommit version)
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   345
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   346
  $ cp -R a3 hook-precommit
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   347
  $ cd hook-precommit
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   348
  $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.precommit=hg status | grep "M A"'
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   349
  rebasing 2:965c486023db "C"
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   350
  M A
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45150
diff changeset
   351
  rebasing 6:a0b2430ebfb8 tip "F"
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   352
  abort: precommit hook exited with status 1
46417
768056549737 errors: use exit code 40 for when a hook fails
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   353
  [40]
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   354
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   355
  @  7: 401ccec5e39f secret 'C'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   356
  |
44347
9c9cfecd4600 rebase: don't use rebased node as dirstate p2 (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents: 40865
diff changeset
   357
  | o  6: a0b2430ebfb8 secret 'F'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   358
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   359
  o |  5: 45396c49d53b public 'B'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   360
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   361
  o |  4: ae36e8e3dfd7 public 'E'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   362
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   363
  o |  3: 46b37eabc604 public 'D'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   364
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   365
  | o  2: 965c486023db secret 'C'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   366
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   367
  | o  1: 27547f69f254 public 'B'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   368
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   369
  o  0: 4a2df7238c3b public 'A'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   370
  
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   371
  $ hg rebase --continue
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   372
  already rebased 2:965c486023db "C" as 401ccec5e39f
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   373
  rebasing 6:a0b2430ebfb8 "F"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   374
  saved backup bundle to $TESTTMP/hook-precommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   375
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   376
  @  6: 6e92a149ac6b secret 'F'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   377
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   378
  o  5: 401ccec5e39f secret 'C'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   379
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   380
  o  4: 45396c49d53b public 'B'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   381
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   382
  o  3: ae36e8e3dfd7 public 'E'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   383
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   384
  o  2: 46b37eabc604 public 'D'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   385
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   386
  | o  1: 27547f69f254 public 'B'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   387
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   388
  o  0: 4a2df7238c3b public 'A'
33123
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   389
  
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   390
  $ cd ..
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   391
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   392
(pretxncommit version)
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   393
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   394
  $ cp -R a3 hook-pretxncommit
e7faa4a14d5d rebase: reinforce testing around precommit hook interrupting a rebase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33122
diff changeset
   395
  $ cd hook-pretxncommit
38722
2009d84f245a hook: disable the shell to native command translation by default
Matt Harbison <matt_harbison@yahoo.com>
parents: 38484
diff changeset
   396
  $ hg rebase --source 2 --dest 5 --tool internal:other \
2009d84f245a hook: disable the shell to native command translation by default
Matt Harbison <matt_harbison@yahoo.com>
parents: 38484
diff changeset
   397
  >     --config 'hooks.tonative.pretxncommit=True' --config 'hooks.pretxncommit=hg log -r $HG_NODE | grep "summary:     C"'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   398
  rebasing 2:965c486023db "C"
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   399
  summary:     C
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45150
diff changeset
   400
  rebasing 6:a0b2430ebfb8 tip "F"
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   401
  transaction abort!
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   402
  rollback completed
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   403
  abort: pretxncommit hook exited with status 1
46417
768056549737 errors: use exit code 40 for when a hook fails
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   404
  [40]
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   405
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   406
  @  7: 401ccec5e39f secret 'C'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   407
  |
44347
9c9cfecd4600 rebase: don't use rebased node as dirstate p2 (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents: 40865
diff changeset
   408
  | o  6: a0b2430ebfb8 secret 'F'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   409
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   410
  o |  5: 45396c49d53b public 'B'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   411
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   412
  o |  4: ae36e8e3dfd7 public 'E'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   413
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   414
  o |  3: 46b37eabc604 public 'D'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   415
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   416
  | o  2: 965c486023db secret 'C'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   417
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   418
  | o  1: 27547f69f254 public 'B'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   419
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   420
  o  0: 4a2df7238c3b public 'A'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   421
  
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   422
  $ hg rebase --continue
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   423
  already rebased 2:965c486023db "C" as 401ccec5e39f
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   424
  rebasing 6:a0b2430ebfb8 "F"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   425
  saved backup bundle to $TESTTMP/hook-pretxncommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   426
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   427
  @  6: 6e92a149ac6b secret 'F'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   428
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   429
  o  5: 401ccec5e39f secret 'C'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   430
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   431
  o  4: 45396c49d53b public 'B'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   432
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   433
  o  3: ae36e8e3dfd7 public 'E'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   434
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   435
  o  2: 46b37eabc604 public 'D'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   436
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   437
  | o  1: 27547f69f254 public 'B'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   438
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   439
  o  0: 4a2df7238c3b public 'A'
33122
918e7dcf8820 rebase: provides test case for (issue5610)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 27626
diff changeset
   440
  
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   441
  $ cd ..
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   442
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   443
(pretxnclose version)
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   444
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   445
  $ cp -R a3 hook-pretxnclose
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   446
  $ cd hook-pretxnclose
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   447
  $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxnclose=hg log -r tip | grep "summary:     C"'
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   448
  rebasing 2:965c486023db "C"
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   449
  summary:     C
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45150
diff changeset
   450
  rebasing 6:a0b2430ebfb8 tip "F"
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   451
  transaction abort!
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   452
  rollback completed
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   453
  abort: pretxnclose hook exited with status 1
46417
768056549737 errors: use exit code 40 for when a hook fails
Martin von Zweigbergk <martinvonz@google.com>
parents: 45826
diff changeset
   454
  [40]
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   455
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   456
  @  7: 401ccec5e39f secret 'C'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   457
  |
44347
9c9cfecd4600 rebase: don't use rebased node as dirstate p2 (BC)
Martin von Zweigbergk <martinvonz@google.com>
parents: 40865
diff changeset
   458
  | o  6: a0b2430ebfb8 secret 'F'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   459
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   460
  o |  5: 45396c49d53b public 'B'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   461
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   462
  o |  4: ae36e8e3dfd7 public 'E'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   463
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   464
  o |  3: 46b37eabc604 public 'D'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   465
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   466
  | o  2: 965c486023db secret 'C'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   467
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   468
  | o  1: 27547f69f254 public 'B'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   469
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   470
  o  0: 4a2df7238c3b public 'A'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   471
  
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   472
  $ hg rebase --continue
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   473
  already rebased 2:965c486023db "C" as 401ccec5e39f
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   474
  rebasing 6:a0b2430ebfb8 "F"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   475
  saved backup bundle to $TESTTMP/hook-pretxnclose/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   476
  $ hg tglogp
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   477
  @  6: 6e92a149ac6b secret 'F'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   478
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   479
  o  5: 401ccec5e39f secret 'C'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   480
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   481
  o  4: 45396c49d53b public 'B'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   482
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   483
  o  3: ae36e8e3dfd7 public 'E'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   484
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   485
  o  2: 46b37eabc604 public 'D'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   486
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   487
  | o  1: 27547f69f254 public 'B'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   488
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 33332
diff changeset
   489
  o  0: 4a2df7238c3b public 'A'
33124
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   490
  
22ab466480ea rebase: also test abort from pretxnclose error
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 33123
diff changeset
   491
  $ cd ..
32313
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   492
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   493
Make sure merge state is cleaned up after a no-op rebase merge (issue5494)
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   494
  $ hg init repo
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   495
  $ cd repo
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   496
  $ echo a > a
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   497
  $ hg commit -qAm base
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   498
  $ echo b >> a
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   499
  $ hg commit -qm b
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   500
  $ hg up '.^'
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   501
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   502
  $ echo c >> a
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   503
  $ hg commit -qm c
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   504
  $ hg rebase -s 1 -d 2 --noninteractive
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   505
  rebasing 1:fdaca8533b86 "b"
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   506
  merging a
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   507
  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44666
diff changeset
   508
  unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   509
  [240]
32313
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   510
  $ echo a > a
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   511
  $ echo c >> a
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   512
  $ hg resolve --mark a
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   513
  (no more unresolved files)
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   514
  continue: hg rebase --continue
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   515
  $ hg rebase --continue
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   516
  rebasing 1:fdaca8533b86 "b"
40865
4edd427f34c1 rebase: clarify that commits that become empty are skipped
Martin von Zweigbergk <martinvonz@google.com>
parents: 40864
diff changeset
   517
  note: not rebasing 1:fdaca8533b86 "b", its destination already has all its changes
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   518
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg
32313
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   519
  $ hg resolve --list
36776
c164a3a282c1 tests: .hg/merge is a directory, so use `test -d`
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   520
  $ test -d .hg/merge
32313
a580b2d65ded rebase: make sure merge state is cleaned up for no-op rebases (issue5494)
Jeremy Fitzhardinge <jsgf@fb.com>
parents: 32249
diff changeset
   521
  [1]
36777
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   522
Now try again with --collapse
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   523
  $ hg unbundle -q .hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   524
  $ hg rebase -s 2 -d 1 --noninteractive --collapse
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45150
diff changeset
   525
  rebasing 2:fdaca8533b86 tip "b"
36777
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   526
  merging a
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   527
  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44666
diff changeset
   528
  unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   529
  [240]
36777
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   530
  $ echo a > a
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   531
  $ echo c >> a
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   532
  $ hg resolve --mark a
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   533
  (no more unresolved files)
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   534
  continue: hg rebase --continue
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   535
  $ hg rebase --continue
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45150
diff changeset
   536
  rebasing 2:fdaca8533b86 tip "b"
36777
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   537
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   538
  $ hg resolve --list
66c569e57c70 tests: add test for issue 5494 but with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36776
diff changeset
   539
  $ test -d .hg/merge
36928
9457c395fcbb rebase: fix issue 5494 also with --collapse
Martin von Zweigbergk <martinvonz@google.com>
parents: 36777
diff changeset
   540
  [1]