tests/test-rebase-inmemory.t
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 27 Aug 2018 09:05:56 -0700
changeset 39354 5ed7c6caf24d
parent 39135 485a3349d5ee
child 39575 aa022f8873ea
permissions -rw-r--r--
stringutil: emit multiple chunks when pretty printing This avoids concatenating output inside pprintgen() itself. But the real reason for this is it will make it easier to add indentation, as we'll need to account for indentation when emitting each individual object in a collection. The verbosity of this code compared to the original is a bit unfortunate. But I suppose this is the price to pay for having nice things (streaming and indenting). We could probably abstract the "print a collection" bits into a generic function to avoid some duplication. But I'm not overly inclined to do this. Differential Revision: https://phab.mercurial-scm.org/D4398
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35384
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
     1
#require symlink execbit
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
     2
  $ cat << EOF >> $HGRCPATH
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
     3
  > [extensions]
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
     4
  > amend=
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
     5
  > rebase=
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
     6
  > debugdrawdag=$TESTDIR/drawdag.py
38667
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
     7
  > strip=
35388
dd11df900f7f rebase: replace --inmemory flag with rebase.experimental.inmemory config
Phil Cohen <phillco@fb.com>
parents: 35384
diff changeset
     8
  > [rebase]
dd11df900f7f rebase: replace --inmemory flag with rebase.experimental.inmemory config
Phil Cohen <phillco@fb.com>
parents: 35384
diff changeset
     9
  > experimental.inmemory=1
35384
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    10
  > [diff]
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    11
  > git=1
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    12
  > [alias]
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    13
  > tglog = log -G --template "{rev}: {node|short} '{desc}'\n"
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    14
  > EOF
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    15
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    16
Rebase a simple DAG:
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    17
  $ hg init repo1
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    18
  $ cd repo1
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    19
  $ hg debugdrawdag <<'EOS'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    20
  > c b
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    21
  > |/
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    22
  > d
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    23
  > |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    24
  > a
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    25
  > EOS
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    26
  $ hg up -C a
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    27
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    28
  $ hg tglog
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    29
  o  3: 814f6bd05178 'c'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    30
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    31
  | o  2: db0e82a16a62 'b'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    32
  |/
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    33
  o  1: 02952614a83d 'd'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    34
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    35
  @  0: b173517d0057 'a'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    36
  
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    37
  $ hg cat -r 3 c
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    38
  c (no-eol)
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    39
  $ hg cat -r 2 b
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    40
  b (no-eol)
35388
dd11df900f7f rebase: replace --inmemory flag with rebase.experimental.inmemory config
Phil Cohen <phillco@fb.com>
parents: 35384
diff changeset
    41
  $ hg rebase --debug -r b -d c | grep rebasing
35384
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    42
  rebasing in-memory
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    43
  rebasing 2:db0e82a16a62 "b" (b)
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    44
  $ hg tglog
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    45
  o  3: ca58782ad1e4 'b'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    46
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    47
  o  2: 814f6bd05178 'c'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    48
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    49
  o  1: 02952614a83d 'd'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    50
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    51
  @  0: b173517d0057 'a'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    52
  
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    53
  $ hg cat -r 3 b
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    54
  b (no-eol)
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    55
  $ hg cat -r 2 c
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    56
  c (no-eol)
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    57
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    58
Case 2:
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    59
  $ hg init repo2
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    60
  $ cd repo2
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    61
  $ hg debugdrawdag <<'EOS'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    62
  > c b
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    63
  > |/
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    64
  > d
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    65
  > |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    66
  > a
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    67
  > EOS
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    68
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    69
Add a symlink and executable file:
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    70
  $ hg up -C c
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    71
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    72
  $ ln -s somefile e
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    73
  $ echo f > f
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    74
  $ chmod +x f
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    75
  $ hg add e f
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    76
  $ hg amend -q
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    77
  $ hg up -Cq a
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    78
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    79
Write files to the working copy, and ensure they're still there after the rebase
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    80
  $ echo "abc" > a
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    81
  $ ln -s def b
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    82
  $ echo "ghi" > c
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    83
  $ echo "jkl" > d
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    84
  $ echo "mno" > e
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    85
  $ hg tglog
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    86
  o  3: f56b71190a8f 'c'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    87
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    88
  | o  2: db0e82a16a62 'b'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    89
  |/
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    90
  o  1: 02952614a83d 'd'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    91
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    92
  @  0: b173517d0057 'a'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    93
  
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    94
  $ hg cat -r 3 c
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    95
  c (no-eol)
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    96
  $ hg cat -r 2 b
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    97
  b (no-eol)
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    98
  $ hg cat -r 3 e
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
    99
  somefile (no-eol)
35388
dd11df900f7f rebase: replace --inmemory flag with rebase.experimental.inmemory config
Phil Cohen <phillco@fb.com>
parents: 35384
diff changeset
   100
  $ hg rebase --debug -s b -d a | grep rebasing
35384
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   101
  rebasing in-memory
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   102
  rebasing 2:db0e82a16a62 "b" (b)
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   103
  $ hg tglog
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   104
  o  3: fc055c3b4d33 'b'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   105
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   106
  | o  2: f56b71190a8f 'c'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   107
  | |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   108
  | o  1: 02952614a83d 'd'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   109
  |/
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   110
  @  0: b173517d0057 'a'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   111
  
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   112
  $ hg cat -r 2 c
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   113
  c (no-eol)
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   114
  $ hg cat -r 3 b
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   115
  b (no-eol)
35388
dd11df900f7f rebase: replace --inmemory flag with rebase.experimental.inmemory config
Phil Cohen <phillco@fb.com>
parents: 35384
diff changeset
   116
  $ hg rebase --debug -s 1 -d 3 | grep rebasing
35384
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   117
  rebasing in-memory
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   118
  rebasing 1:02952614a83d "d" (d)
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   119
  rebasing 2:f56b71190a8f "c"
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   120
  $ hg tglog
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   121
  o  3: 753feb6fd12a 'c'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   122
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   123
  o  2: 09c044d2cb43 'd'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   124
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   125
  o  1: fc055c3b4d33 'b'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   126
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   127
  @  0: b173517d0057 'a'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   128
  
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   129
Ensure working copy files are still there:
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   130
  $ cat a
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   131
  abc
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   132
  $ readlink.py b
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   133
  b -> def
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   134
  $ cat e
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   135
  mno
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   136
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   137
Ensure symlink and executable files were rebased properly:
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   138
  $ hg up -Cq 3
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   139
  $ readlink.py e
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   140
  e -> somefile
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   141
  $ ls -l f | cut -c -10
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   142
  -rwxr-xr-x
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   143
36975
795eb53f1d3e rebase: allow in-memory merge of the working copy parent
Martin von Zweigbergk <martinvonz@google.com>
parents: 35388
diff changeset
   144
Rebase the working copy parent
35384
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   145
  $ hg up -C 3
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   146
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
35388
dd11df900f7f rebase: replace --inmemory flag with rebase.experimental.inmemory config
Phil Cohen <phillco@fb.com>
parents: 35384
diff changeset
   147
  $ hg rebase -r 3 -d 0 --debug | grep rebasing
36975
795eb53f1d3e rebase: allow in-memory merge of the working copy parent
Martin von Zweigbergk <martinvonz@google.com>
parents: 35388
diff changeset
   148
  rebasing in-memory
35384
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   149
  rebasing 3:753feb6fd12a "c" (tip)
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   150
  $ hg tglog
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   151
  @  3: 844a7de3e617 'c'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   152
  |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   153
  | o  2: 09c044d2cb43 'd'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   154
  | |
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   155
  | o  1: fc055c3b4d33 'b'
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   156
  |/
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   157
  o  0: b173517d0057 'a'
39131
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   158
  
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   159
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   160
Test reporting of path conflicts
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   161
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   162
  $ hg rm a
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   163
  $ mkdir a
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   164
  $ touch a/a
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   165
  $ hg ci -Am "a/a"
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   166
  adding a/a
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   167
  $ hg tglog
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   168
  @  4: daf7dfc139cb 'a/a'
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   169
  |
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   170
  o  3: 844a7de3e617 'c'
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   171
  |
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   172
  | o  2: 09c044d2cb43 'd'
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   173
  | |
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   174
  | o  1: fc055c3b4d33 'b'
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   175
  |/
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   176
  o  0: b173517d0057 'a'
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   177
  
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   178
  $ hg rebase -r . -d 2
02e80e37fbbc tests: demonstrate that IMM needs to be smarter with path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39130
diff changeset
   179
  rebasing 4:daf7dfc139cb "a/a" (tip)
39132
873f3a56993f context: make sure file is not deleted while checking path conflicts
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39131
diff changeset
   180
  saved backup bundle to $TESTTMP/repo1/repo2/.hg/strip-backup/daf7dfc139cb-fdbfcf4f-rebase.hg
39130
0600d09764df tests: don't create new repo inside existing repo in test-rebase-inmemory.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39127
diff changeset
   181
0600d09764df tests: don't create new repo inside existing repo in test-rebase-inmemory.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39127
diff changeset
   182
  $ cd ..
0600d09764df tests: don't create new repo inside existing repo in test-rebase-inmemory.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39127
diff changeset
   183
38372
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   184
Test dry-run rebasing
39130
0600d09764df tests: don't create new repo inside existing repo in test-rebase-inmemory.t
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 39127
diff changeset
   185
38667
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   186
  $ hg init repo3
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   187
  $ cd repo3
38372
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   188
  $ echo a>a
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   189
  $ hg ci -Aqma
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   190
  $ echo b>b
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   191
  $ hg ci -Aqmb
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   192
  $ echo c>c
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   193
  $ hg ci -Aqmc
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   194
  $ echo d>d
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   195
  $ hg ci -Aqmd
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   196
  $ echo e>e
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   197
  $ hg ci -Aqme
35384
b9bdee046cc2 tests: add a simple test for in-memory rebase
Phil Cohen <phillco@fb.com>
parents:
diff changeset
   198
38372
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   199
  $ hg up 1 -q
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   200
  $ echo f>f
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   201
  $ hg ci -Amf
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   202
  adding f
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   203
  created new head
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   204
  $ echo g>g
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   205
  $ hg ci -Aqmg
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   206
  $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   207
  @  6:baf10c5166d4 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   208
  |  g
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   209
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   210
  o  5:6343ca3eff20 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   211
  |  f
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   212
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   213
  | o  4:e860deea161a test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   214
  | |  e
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   215
  | |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   216
  | o  3:055a42cdd887 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   217
  | |  d
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   218
  | |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   219
  | o  2:177f92b77385 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   220
  |/   c
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   221
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   222
  o  1:d2ae7f538514 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   223
  |  b
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   224
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   225
  o  0:cb9a9f314b8b test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   226
     a
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   227
  
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   228
Make sure it throws error while passing --continue or --abort with --dry-run
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   229
  $ hg rebase -s 2 -d 6 -n --continue
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   230
  abort: cannot specify both --dry-run and --continue
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   231
  [255]
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   232
  $ hg rebase -s 2 -d 6 -n --abort
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   233
  abort: cannot specify both --dry-run and --abort
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   234
  [255]
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   235
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   236
Check dryrun gives correct results when there is no conflict in rebasing
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   237
  $ hg rebase -s 2 -d 6 -n
38546
731debab233f rebase: improve output of --dry-run
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38499
diff changeset
   238
  starting dry-run rebase; repository will not be changed
38372
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   239
  rebasing 2:177f92b77385 "c"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   240
  rebasing 3:055a42cdd887 "d"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   241
  rebasing 4:e860deea161a "e"
38546
731debab233f rebase: improve output of --dry-run
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38499
diff changeset
   242
  dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
38372
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   243
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   244
  $ hg diff
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   245
  $ hg status
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   246
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   247
  $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   248
  @  6:baf10c5166d4 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   249
  |  g
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   250
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   251
  o  5:6343ca3eff20 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   252
  |  f
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   253
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   254
  | o  4:e860deea161a test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   255
  | |  e
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   256
  | |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   257
  | o  3:055a42cdd887 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   258
  | |  d
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   259
  | |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   260
  | o  2:177f92b77385 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   261
  |/   c
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   262
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   263
  o  1:d2ae7f538514 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   264
  |  b
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   265
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   266
  o  0:cb9a9f314b8b test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   267
     a
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   268
  
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   269
Check dryrun working with --collapse when there is no conflict
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   270
  $ hg rebase -s 2 -d 6 -n --collapse
38546
731debab233f rebase: improve output of --dry-run
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38499
diff changeset
   271
  starting dry-run rebase; repository will not be changed
38372
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   272
  rebasing 2:177f92b77385 "c"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   273
  rebasing 3:055a42cdd887 "d"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   274
  rebasing 4:e860deea161a "e"
38546
731debab233f rebase: improve output of --dry-run
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38499
diff changeset
   275
  dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
38372
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   276
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   277
Check dryrun gives correct results when there is conflict in rebasing
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   278
Make a conflict:
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   279
  $ hg up 6 -q
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   280
  $ echo conflict>e
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   281
  $ hg ci -Aqm "conflict with e"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   282
  $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   283
  @  7:d2c195b28050 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   284
  |  conflict with e
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   285
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   286
  o  6:baf10c5166d4 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   287
  |  g
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   288
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   289
  o  5:6343ca3eff20 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   290
  |  f
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   291
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   292
  | o  4:e860deea161a test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   293
  | |  e
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   294
  | |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   295
  | o  3:055a42cdd887 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   296
  | |  d
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   297
  | |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   298
  | o  2:177f92b77385 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   299
  |/   c
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   300
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   301
  o  1:d2ae7f538514 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   302
  |  b
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   303
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   304
  o  0:cb9a9f314b8b test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   305
     a
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   306
  
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   307
  $ hg rebase -s 2 -d 7 -n
38546
731debab233f rebase: improve output of --dry-run
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38499
diff changeset
   308
  starting dry-run rebase; repository will not be changed
38372
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   309
  rebasing 2:177f92b77385 "c"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   310
  rebasing 3:055a42cdd887 "d"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   311
  rebasing 4:e860deea161a "e"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   312
  merging e
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   313
  transaction abort!
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   314
  rollback completed
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   315
  hit a merge conflict
38443
e6b643ccf87d rebase: make dry-run return 1 or 0 according to result
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38372
diff changeset
   316
  [1]
38372
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   317
  $ hg diff
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   318
  $ hg status
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   319
  $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   320
  @  7:d2c195b28050 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   321
  |  conflict with e
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   322
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   323
  o  6:baf10c5166d4 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   324
  |  g
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   325
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   326
  o  5:6343ca3eff20 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   327
  |  f
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   328
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   329
  | o  4:e860deea161a test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   330
  | |  e
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   331
  | |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   332
  | o  3:055a42cdd887 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   333
  | |  d
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   334
  | |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   335
  | o  2:177f92b77385 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   336
  |/   c
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   337
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   338
  o  1:d2ae7f538514 test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   339
  |  b
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   340
  |
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   341
  o  0:cb9a9f314b8b test
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   342
     a
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   343
  
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   344
Check dryrun working with --collapse when there is conflicts
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   345
  $ hg rebase -s 2 -d 7 -n --collapse
38546
731debab233f rebase: improve output of --dry-run
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38499
diff changeset
   346
  starting dry-run rebase; repository will not be changed
38372
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   347
  rebasing 2:177f92b77385 "c"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   348
  rebasing 3:055a42cdd887 "d"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   349
  rebasing 4:e860deea161a "e"
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   350
  merging e
f4f1fb1cbfb4 rebase: add dry-run functionality
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 36975
diff changeset
   351
  hit a merge conflict
38443
e6b643ccf87d rebase: make dry-run return 1 or 0 according to result
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38372
diff changeset
   352
  [1]
38667
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   353
39134
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   354
In-memory rebase that fails due to merge conflicts
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   355
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   356
  $ hg rebase -s 2 -d 7
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   357
  rebasing 2:177f92b77385 "c"
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   358
  rebasing 3:055a42cdd887 "d"
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   359
  rebasing 4:e860deea161a "e"
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   360
  merging e
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   361
  transaction abort!
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   362
  rollback completed
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   363
  hit merge conflicts; re-running rebase without in-memory merge
39135
485a3349d5ee rebase: do not pass in user option to rollback in-memory merge conflict
Yuya Nishihara <yuya@tcha.org>
parents: 39134
diff changeset
   364
  rebase aborted
485a3349d5ee rebase: do not pass in user option to rollback in-memory merge conflict
Yuya Nishihara <yuya@tcha.org>
parents: 39134
diff changeset
   365
  rebasing 2:177f92b77385 "c"
485a3349d5ee rebase: do not pass in user option to rollback in-memory merge conflict
Yuya Nishihara <yuya@tcha.org>
parents: 39134
diff changeset
   366
  rebasing 3:055a42cdd887 "d"
485a3349d5ee rebase: do not pass in user option to rollback in-memory merge conflict
Yuya Nishihara <yuya@tcha.org>
parents: 39134
diff changeset
   367
  rebasing 4:e860deea161a "e"
485a3349d5ee rebase: do not pass in user option to rollback in-memory merge conflict
Yuya Nishihara <yuya@tcha.org>
parents: 39134
diff changeset
   368
  merging e
485a3349d5ee rebase: do not pass in user option to rollback in-memory merge conflict
Yuya Nishihara <yuya@tcha.org>
parents: 39134
diff changeset
   369
  warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
485a3349d5ee rebase: do not pass in user option to rollback in-memory merge conflict
Yuya Nishihara <yuya@tcha.org>
parents: 39134
diff changeset
   370
  unresolved conflicts (see hg resolve, then hg rebase --continue)
485a3349d5ee rebase: do not pass in user option to rollback in-memory merge conflict
Yuya Nishihara <yuya@tcha.org>
parents: 39134
diff changeset
   371
  [1]
39134
e338a921a0cd rebase: add test for in-memory merge conflicts
Yuya Nishihara <yuya@tcha.org>
parents: 39132
diff changeset
   372
38667
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   373
==========================
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   374
Test for --confirm option|
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   375
==========================
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   376
  $ cd ..
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   377
  $ hg clone repo3 repo4 -q
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   378
  $ cd repo4
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   379
  $ hg strip 7 -q
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   380
  $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   381
  @  6:baf10c5166d4 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   382
  |  g
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   383
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   384
  o  5:6343ca3eff20 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   385
  |  f
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   386
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   387
  | o  4:e860deea161a test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   388
  | |  e
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   389
  | |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   390
  | o  3:055a42cdd887 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   391
  | |  d
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   392
  | |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   393
  | o  2:177f92b77385 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   394
  |/   c
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   395
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   396
  o  1:d2ae7f538514 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   397
  |  b
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   398
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   399
  o  0:cb9a9f314b8b test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   400
     a
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   401
  
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   402
Check it gives error when both --dryrun and --confirm is used:
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   403
  $ hg rebase -s 2 -d . --confirm --dry-run
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   404
  abort: cannot specify both --confirm and --dry-run
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   405
  [255]
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   406
  $ hg rebase -s 2 -d . --confirm --abort
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   407
  abort: cannot specify both --confirm and --abort
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   408
  [255]
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   409
  $ hg rebase -s 2 -d . --confirm --continue
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   410
  abort: cannot specify both --confirm and --continue
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   411
  [255]
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   412
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   413
Test --confirm option when there are no conflicts:
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   414
  $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   415
  > n
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   416
  > EOF
38675
35b3f686157a rebase: correct misleading message in --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38667
diff changeset
   417
  starting in-memory rebase
38667
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   418
  rebasing 2:177f92b77385 "c"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   419
  rebasing 3:055a42cdd887 "d"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   420
  rebasing 4:e860deea161a "e"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   421
  rebase completed successfully
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   422
  apply changes (yn)? n
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   423
  $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   424
  @  6:baf10c5166d4 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   425
  |  g
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   426
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   427
  o  5:6343ca3eff20 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   428
  |  f
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   429
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   430
  | o  4:e860deea161a test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   431
  | |  e
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   432
  | |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   433
  | o  3:055a42cdd887 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   434
  | |  d
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   435
  | |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   436
  | o  2:177f92b77385 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   437
  |/   c
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   438
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   439
  o  1:d2ae7f538514 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   440
  |  b
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   441
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   442
  o  0:cb9a9f314b8b test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   443
     a
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   444
  
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   445
  $ hg rebase -s 2 -d . --keep --config ui.interactive=True --confirm << EOF
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   446
  > y
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   447
  > EOF
38675
35b3f686157a rebase: correct misleading message in --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38667
diff changeset
   448
  starting in-memory rebase
38667
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   449
  rebasing 2:177f92b77385 "c"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   450
  rebasing 3:055a42cdd887 "d"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   451
  rebasing 4:e860deea161a "e"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   452
  rebase completed successfully
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   453
  apply changes (yn)? y
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   454
  $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   455
  o  9:9fd28f55f6dc test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   456
  |  e
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   457
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   458
  o  8:12cbf031f469 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   459
  |  d
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   460
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   461
  o  7:c83b1da5b1ae test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   462
  |  c
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   463
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   464
  @  6:baf10c5166d4 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   465
  |  g
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   466
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   467
  o  5:6343ca3eff20 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   468
  |  f
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   469
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   470
  | o  4:e860deea161a test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   471
  | |  e
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   472
  | |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   473
  | o  3:055a42cdd887 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   474
  | |  d
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   475
  | |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   476
  | o  2:177f92b77385 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   477
  |/   c
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   478
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   479
  o  1:d2ae7f538514 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   480
  |  b
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   481
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   482
  o  0:cb9a9f314b8b test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   483
     a
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   484
  
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   485
Test --confirm option when there is a conflict
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   486
  $ hg up tip -q
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   487
  $ echo ee>e
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   488
  $ hg ci --amend -m "conflict with e" -q
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   489
  $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   490
  @  9:906d72f66a59 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   491
  |  conflict with e
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   492
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   493
  o  8:12cbf031f469 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   494
  |  d
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   495
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   496
  o  7:c83b1da5b1ae test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   497
  |  c
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   498
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   499
  o  6:baf10c5166d4 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   500
  |  g
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   501
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   502
  o  5:6343ca3eff20 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   503
  |  f
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   504
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   505
  | o  4:e860deea161a test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   506
  | |  e
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   507
  | |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   508
  | o  3:055a42cdd887 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   509
  | |  d
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   510
  | |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   511
  | o  2:177f92b77385 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   512
  |/   c
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   513
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   514
  o  1:d2ae7f538514 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   515
  |  b
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   516
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   517
  o  0:cb9a9f314b8b test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   518
     a
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   519
  
38679
b3d0c97a0820 rebase: in --confirm option just abort if hit a conflict
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38675
diff changeset
   520
  $ hg rebase -s 4 -d . --keep --confirm
38675
35b3f686157a rebase: correct misleading message in --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38667
diff changeset
   521
  starting in-memory rebase
38667
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   522
  rebasing 4:e860deea161a "e"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   523
  merging e
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   524
  hit a merge conflict
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   525
  [1]
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   526
  $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n"
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   527
  @  9:906d72f66a59 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   528
  |  conflict with e
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   529
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   530
  o  8:12cbf031f469 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   531
  |  d
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   532
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   533
  o  7:c83b1da5b1ae test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   534
  |  c
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   535
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   536
  o  6:baf10c5166d4 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   537
  |  g
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   538
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   539
  o  5:6343ca3eff20 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   540
  |  f
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   541
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   542
  | o  4:e860deea161a test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   543
  | |  e
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   544
  | |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   545
  | o  3:055a42cdd887 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   546
  | |  d
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   547
  | |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   548
  | o  2:177f92b77385 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   549
  |/   c
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   550
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   551
  o  1:d2ae7f538514 test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   552
  |  b
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   553
  |
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   554
  o  0:cb9a9f314b8b test
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   555
     a
572dff5c946e rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 38546
diff changeset
   556
  
39127
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   557
#if execbit
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   558
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   559
Test a metadata-only in-memory merge
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   560
  $ cd $TESTTMP
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   561
  $ hg init no_exception
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   562
  $ cd no_exception
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   563
# Produce the following graph:
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   564
#   o  'add +x to foo.txt'
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   565
#   | o  r1  (adds bar.txt, just for something to rebase to)
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   566
#   |/
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   567
#   o  r0   (adds foo.txt, no +x)
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   568
  $ echo hi > foo.txt
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   569
  $ hg ci -qAm r0
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   570
  $ echo hi > bar.txt
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   571
  $ hg ci -qAm r1
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   572
  $ hg co -qr ".^"
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   573
  $ chmod +x foo.txt
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   574
  $ hg ci -qAm 'add +x to foo.txt'
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   575
issue5960: this was raising an AttributeError exception
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   576
  $ hg rebase -r . -d 1
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   577
  rebasing 2:539b93e77479 "add +x to foo.txt" (tip)
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   578
  saved backup bundle to $TESTTMP/no_exception/.hg/strip-backup/*.hg (glob)
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   579
  $ hg diff -c tip
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   580
  diff --git a/foo.txt b/foo.txt
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   581
  old mode 100644
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   582
  new mode 100755
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   583
95bd19f60957 overlayworkingctx: fix exception in metadata-only inmemory merges (issue5960)
Kyle Lippincott <spectral@google.com>
parents: 38679
diff changeset
   584
#endif