tests/test-rebase-transaction.t
author Martin von Zweigbergk <martinvonz@google.com>
Thu, 08 Mar 2018 21:17:26 -0800
changeset 36816 9ab7eba99fe5
parent 36815 f4e9e89330d4
child 36927 17a744c5e270
permissions -rw-r--r--
tests: add a few tests involving --collapse and rebase.singletransaction=1 I'm about to change the rebase code quite a bit and this was poorly tested. Differential Revision: https://phab.mercurial-scm.org/D2757
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36815
f4e9e89330d4 tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 34504
diff changeset
     1
Rebasing using a single transaction
f4e9e89330d4 tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 34504
diff changeset
     2
30580
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     3
  $ cat >> $HGRCPATH <<EOF
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     4
  > [extensions]
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     5
  > rebase=
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     6
  > drawdag=$TESTDIR/drawdag.py
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
     7
  > 
36815
f4e9e89330d4 tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 34504
diff changeset
     8
  > [rebase]
f4e9e89330d4 tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 34504
diff changeset
     9
  > singletransaction=True
f4e9e89330d4 tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 34504
diff changeset
    10
  > 
30580
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
    11
  > [phases]
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
    12
  > publish=False
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
    13
  > 
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
    14
  > [alias]
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
    15
  > tglog = log -G --template "{rev}: {desc}"
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
    16
  > EOF
51e7c83e05ee rebase: calculate ancestors for --base separately (issue5420)
Jun Wu <quark@fb.com>
parents:
diff changeset
    17
36815
f4e9e89330d4 tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 34504
diff changeset
    18
Check that a simple rebase works
33619
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    19
36815
f4e9e89330d4 tests: simplify test-rebase-transaction.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 34504
diff changeset
    20
  $ hg init simple && cd simple
33619
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    21
  $ hg debugdrawdag <<'EOF'
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    22
  >   Z
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    23
  >   |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    24
  >   | D
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    25
  >   | |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    26
  >   | C
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    27
  >   | |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    28
  >   Y B
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    29
  >   |/
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    30
  >   A
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    31
  > EOF
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    32
- We should only see two status stored messages. One from the start, one from
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    33
- the end.
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    34
  $ hg rebase --debug -b D -d Z | grep 'status stored'
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    35
  rebase status stored
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    36
  rebase status stored
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    37
  $ hg tglog
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    38
  o  5: D
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    39
  |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    40
  o  4: C
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    41
  |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    42
  o  3: B
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    43
  |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    44
  o  2: Z
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    45
  |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    46
  o  1: Y
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    47
  |
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    48
  o  0: A
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    49
  
609606d21765 rebase: use one dirstateguard for when using rebase.singletransaction
Durham Goode <durham@fb.com>
parents: 33558
diff changeset
    50
  $ cd ..
36816
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    51
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    52
Check that --collapse works
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    53
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    54
  $ hg init collapse && cd collapse
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    55
  $ hg debugdrawdag <<'EOF'
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    56
  >   Z
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    57
  >   |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    58
  >   | D
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    59
  >   | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    60
  >   | C
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    61
  >   | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    62
  >   Y B
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    63
  >   |/
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    64
  >   A
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    65
  > EOF
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    66
- We should only see two status stored messages. One from the start, one from
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    67
- the end.
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    68
  $ hg rebase --collapse --debug -b D -d Z | grep 'status stored'
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    69
  rebase status stored
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    70
  rebase status stored
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    71
  $ hg tglog
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    72
  o  3: Collapsed revision
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    73
  |  * B
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    74
  |  * C
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    75
  |  * D
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    76
  o  2: Z
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    77
  |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    78
  o  1: Y
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    79
  |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    80
  o  0: A
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    81
  
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    82
  $ cd ..
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    83
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    84
With --collapse, check that conflicts can be resolved and rebase can then be
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    85
continued
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    86
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    87
  $ hg init collapse-conflict && cd collapse-conflict
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    88
  $ hg debugdrawdag <<'EOF'
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    89
  >   Z   # Z/conflict=Z
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    90
  >   |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    91
  >   | D
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    92
  >   | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    93
  >   | C # C/conflict=C
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    94
  >   | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    95
  >   Y B
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    96
  >   |/
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    97
  >   A
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    98
  > EOF
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
    99
  $ hg rebase --collapse -b D -d Z
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   100
  rebasing 1:112478962961 "B" (B)
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   101
  rebasing 3:c26739dbe603 "C" (C)
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   102
  merging conflict
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   103
  warning: conflicts while merging conflict! (edit, then use 'hg resolve --mark')
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   104
  unresolved conflicts (see hg resolve, then hg rebase --continue)
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   105
  [1]
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   106
  $ hg tglog
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   107
  o  5: D
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   108
  |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   109
  | @  4: Z
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   110
  | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   111
  @ |  3: C
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   112
  | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   113
  | o  2: Y
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   114
  | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   115
  o |  1: B
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   116
  |/
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   117
  o  0: A
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   118
  
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   119
  $ hg st
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   120
  M C
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   121
  M conflict
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   122
  A B
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   123
  ? conflict.orig
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   124
  $ echo resolved > conflict
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   125
  $ hg resolve -m
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   126
  (no more unresolved files)
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   127
  continue: hg rebase --continue
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   128
  $ hg rebase --continue
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   129
  already rebased 1:112478962961 "B" (B) as 79bc8f4973ce
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   130
  rebasing 3:c26739dbe603 "C" (C)
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   131
  rebasing 5:d24bb333861c "D" (D tip)
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   132
  saved backup bundle to $TESTTMP/collapse-conflict/.hg/strip-backup/112478962961-b5b34645-rebase.hg
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   133
  $ hg tglog
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   134
  o  3: Collapsed revision
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   135
  |  * B
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   136
  |  * C
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   137
  |  * D
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   138
  o  2: Z
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   139
  |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   140
  o  1: Y
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   141
  |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   142
  o  0: A
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   143
  
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   144
  $ cd ..
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   145
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   146
With --collapse, check that the commit message editing can be canceled and
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   147
rebase can then be continued
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   148
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   149
  $ hg init collapse-cancel-editor && cd collapse-cancel-editor
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   150
  $ hg debugdrawdag <<'EOF'
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   151
  >   Z
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   152
  >   |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   153
  >   | D
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   154
  >   | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   155
  >   | C
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   156
  >   | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   157
  >   Y B
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   158
  >   |/
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   159
  >   A
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   160
  > EOF
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   161
  $ HGEDITOR=false hg --config ui.interactive=1 rebase --collapse -b D -d Z
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   162
  rebasing 1:112478962961 "B" (B)
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   163
  rebasing 3:26805aba1e60 "C" (C)
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   164
  rebasing 5:f585351a92f8 "D" (D tip)
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   165
  abort: edit failed: false exited with status 1
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   166
  [255]
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   167
  $ hg tglog
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   168
  o  5: D
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   169
  |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   170
  | @  4: Z
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   171
  | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   172
  o |  3: C
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   173
  | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   174
  | o  2: Y
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   175
  | |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   176
  o |  1: B
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   177
  |/
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   178
  o  0: A
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   179
  
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   180
  $ hg rebase --continue
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   181
  already rebased 1:112478962961 "B" (B) as e9b22a392ce0
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   182
  already rebased 3:26805aba1e60 "C" (C) as e9b22a392ce0
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   183
  already rebased 5:f585351a92f8 "D" (D tip) as e9b22a392ce0
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   184
  saved backup bundle to $TESTTMP/collapse-cancel-editor/.hg/strip-backup/112478962961-cb2a9b47-rebase.hg
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   185
  $ hg tglog
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   186
  o  3: Collapsed revision
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   187
  |  * B
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   188
  |  * C
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   189
  |  * D
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   190
  o  2: Z
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   191
  |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   192
  o  1: Y
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   193
  |
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   194
  o  0: A
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   195
  
9ab7eba99fe5 tests: add a few tests involving --collapse and rebase.singletransaction=1
Martin von Zweigbergk <martinvonz@google.com>
parents: 36815
diff changeset
   196
  $ cd ..