tests/test-rebase-collapse.t
author Raphaël Gomès <rgomes@octobus.net>
Mon, 14 Oct 2019 13:57:30 +0200
changeset 43826 5ac243a92e37
parent 41195 c339a01acd9a
child 43934 71fee4564410
permissions -rw-r--r--
rust-performance: introduce FastHashMap type alias for HashMap Rust's default hashing is slow, because it is meant for preventing collision attacks. For all of the current Rust code, we don't care about those attacks, because if an person with bad intentions has write access to your repo, you have other issues. I've chosen to use the TwoXHash crate because it was made by a reputable member of the Rust community and has very good benchmarks. For now it does not seem to improve performance by much for the current code, but it's something else to not worry about when benchmarking code: in a previous experiment with copytracing in Rust, it accounted for more than 10% of the time of the entire script. Differential Revision: https://phab.mercurial-scm.org/D7116
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     2
  > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     3
  > rebase=
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
     4
  > mq=
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
     5
  > drawdag=$TESTDIR/drawdag.py
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     6
  > 
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     7
  > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     8
  > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     9
  > 
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    10
  > [alias]
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    11
  > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n"
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    12
  > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    13
  > EOF
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10762
diff changeset
    14
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    15
Highest phase of source commits is used:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    16
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    17
  $ hg init phase
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    18
  $ cd phase
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    19
  $ hg debugdrawdag << 'EOF'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    20
  >   D
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    21
  >   |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    22
  > F C
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    23
  > | |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    24
  > E B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    25
  > |/
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    26
  > A
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    27
  > EOF
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    28
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    29
  $ hg phase --force --secret D
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    30
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    31
  $ cat > $TESTTMP/editor.sh <<EOF
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    32
  > echo "==== before editing"
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    33
  > cat \$1
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    34
  > echo "===="
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    35
  > echo "edited manually" >> \$1
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    36
  > EOF
41195
c339a01acd9a test: explicit a rebase source in test-rebase-collapse.t
Boris Feld <boris.feld@octobus.net>
parents: 40865
diff changeset
    37
  $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --source B --dest F
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    38
  rebasing 1:112478962961 "B" (B)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    39
  rebasing 3:26805aba1e60 "C" (C)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    40
  rebasing 5:f585351a92f8 "D" (D tip)
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    41
  ==== before editing
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    42
  Collapsed revision
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    43
  * B
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    44
  * C
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    45
  * D
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    46
  
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    47
  
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    48
  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    49
  HG: Leave message empty to abort commit.
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    50
  HG: --
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    51
  HG: user: test
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    52
  HG: branch 'default'
22895
dfa44e25bb53 dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents: 22206
diff changeset
    53
  HG: added B
dfa44e25bb53 dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents: 22206
diff changeset
    54
  HG: added C
dfa44e25bb53 dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents: 22206
diff changeset
    55
  HG: added D
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    56
  ====
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    57
  saved backup bundle to $TESTTMP/phase/.hg/strip-backup/112478962961-cb2a9b47-rebase.hg
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    58
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    59
  $ hg tglogp
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    60
  o  3: 92fa5f5fe108 secret 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    61
  |  * B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    62
  |  * C
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    63
  |  * D
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    64
  |
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    65
  |
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    66
  |  edited manually'
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    67
  o  2: 64a8289d2492 draft 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    68
  |
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    69
  o  1: 7fb047a69f22 draft 'E'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    70
  |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    71
  o  0: 426bada5c675 draft 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    72
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
    73
  $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    74
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    75
  B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    76
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    77
  D
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    78
  E
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    79
  F
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    80
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    81
  $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    82
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    83
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    84
Merge gets linearized:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    85
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    86
  $ hg init linearized-merge
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    87
  $ cd linearized-merge
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    88
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    89
  $ hg debugdrawdag << 'EOF'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    90
  > F D
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    91
  > |/|
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    92
  > C B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    93
  > |/
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    94
  > A
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    95
  > EOF
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    96
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    97
  $ hg phase --force --secret D
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    98
  $ hg rebase --source B --collapse --dest F
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
    99
  rebasing 1:112478962961 "B" (B)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   100
  rebasing 3:4e4f9194f9f1 "D" (D)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   101
  saved backup bundle to $TESTTMP/linearized-merge/.hg/strip-backup/112478962961-e389075b-rebase.hg
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   102
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   103
  $ hg tglog
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   104
  o  3: 5bdc08b7da2b 'Collapsed revision
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   105
  |  * B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   106
  |  * D'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   107
  o  2: afc707c82df0 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   108
  |
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   109
  o  1: dc0947a82db8 'C'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   110
  |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   111
  o  0: 426bada5c675 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   112
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   113
  $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   114
  A
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   115
  B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   116
  C
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   117
  F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   118
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   119
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   120
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   121
Custom message:
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   122
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   123
  $ hg init message
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   124
  $ cd message
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   125
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   126
  $ hg debugdrawdag << 'EOF'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   127
  >   C
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   128
  >   |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   129
  > D B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   130
  > |/
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   131
  > A
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   132
  > EOF
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   133
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   134
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   135
  $ hg rebase --base B -m 'custom message'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   136
  abort: message can only be specified with collapse
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   137
  [255]
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   138
22206
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
   139
  $ cat > $TESTTMP/checkeditform.sh <<EOF
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
   140
  > env | grep HGEDITFORM
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
   141
  > true
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
   142
  > EOF
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   143
  $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source B --collapse -m 'custom message' -e --dest D
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   144
  rebasing 1:112478962961 "B" (B)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   145
  rebasing 3:26805aba1e60 "C" (C tip)
22206
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
   146
  HGEDITFORM=rebase.collapse
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   147
  saved backup bundle to $TESTTMP/message/.hg/strip-backup/112478962961-f4131707-rebase.hg
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   148
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   149
  $ hg tglog
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   150
  o  2: 2f197b9a08f3 'custom message'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   151
  |
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   152
  o  1: b18e25de2cf5 'D'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   153
  |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   154
  o  0: 426bada5c675 'A'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   155
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   156
  $ hg manifest --rev tip
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   157
  A
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   158
  B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   159
  C
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   160
  D
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   161
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   162
  $ cd ..
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   163
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   164
Rebase and collapse - more than one external (fail):
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   165
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   166
  $ hg init multiple-external-parents
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   167
  $ cd multiple-external-parents
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   168
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   169
  $ hg debugdrawdag << 'EOF'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   170
  >   G
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   171
  >   |\
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   172
  >   | F
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   173
  >   | |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   174
  >   D E
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   175
  >   |\|
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   176
  > H C B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   177
  >  \|/
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   178
  >   A
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   179
  > EOF
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   180
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   181
  $ hg rebase -s C --dest H --collapse
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   182
  abort: unable to collapse on top of 3, there is more than one external parent: 1, 6
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   183
  [255]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   184
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   185
Rebase and collapse - E onto H:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   186
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   187
  $ hg rebase -s E --dest I --collapse # root (E) is not a merge
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   188
  abort: unknown revision 'I'!
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   189
  [255]
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   190
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   191
  $ hg tglog
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   192
  o    7: 64e264db77f0 'G'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   193
  |\
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   194
  | o  6: 11abe3fb10b8 'F'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   195
  | |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   196
  | o  5: 49cb92066bfd 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   197
  | |
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   198
  o |  4: 4e4f9194f9f1 'D'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   199
  |\|
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   200
  | | o  3: 575c4b5ec114 'H'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   201
  | | |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   202
  o---+  2: dc0947a82db8 'C'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   203
   / /
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   204
  o /  1: 112478962961 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   205
  |/
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   206
  o  0: 426bada5c675 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   207
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   208
  $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   209
  A
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   210
  B
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   211
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   212
  E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   213
  F
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   214
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   215
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   216
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   217
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   218
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   219
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   220
Test that branchheads cache is updated correctly when doing a strip in which
18395
904b7109938e destroyed: drop complex branchcache rebuilt logic
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18382
diff changeset
   221
the parent of the ancestor node to be stripped does not become a head and also,
904b7109938e destroyed: drop complex branchcache rebuilt logic
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18382
diff changeset
   222
the parent of a node that is a child of the node stripped becomes a head (node
904b7109938e destroyed: drop complex branchcache rebuilt logic
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18382
diff changeset
   223
3). The code is now much simpler and we could just test a simpler scenario
904b7109938e destroyed: drop complex branchcache rebuilt logic
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18382
diff changeset
   224
We keep it the test this way in case new complexity is injected.
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   225
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   226
Create repo b:
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   227
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   228
  $ hg init branch-heads
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   229
  $ cd branch-heads
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   230
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   231
  $ hg debugdrawdag << 'EOF'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   232
  >   G
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   233
  >   |\
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   234
  >   | F
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   235
  >   | |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   236
  >   D E
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   237
  >   |\|
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   238
  > H C B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   239
  >  \|/
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   240
  >   A
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   241
  > EOF
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   242
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   243
  $ hg heads --template="{rev}:{node} {branch}\n"
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   244
  7:64e264db77f061f16d9132b70c5a58e2461fb630 default
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   245
  3:575c4b5ec114d64b681d33f8792853568bfb2b2c default
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   246
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   247
  $ cat $TESTTMP/branch-heads/.hg/cache/branch2-served
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   248
  64e264db77f061f16d9132b70c5a58e2461fb630 7
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   249
  575c4b5ec114d64b681d33f8792853568bfb2b2c o default
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   250
  64e264db77f061f16d9132b70c5a58e2461fb630 o default
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   251
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   252
  $ hg strip 4
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   253
  saved backup bundle to $TESTTMP/branch-heads/.hg/strip-backup/4e4f9194f9f1-5ec4b5e6-backup.hg
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   254
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   255
  $ cat $TESTTMP/branch-heads/.hg/cache/branch2-served
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   256
  11abe3fb10b8689b560681094b17fe161871d043 5
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   257
  dc0947a82db884575bb76ea10ac97b08536bfa03 o default
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   258
  575c4b5ec114d64b681d33f8792853568bfb2b2c o default
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   259
  11abe3fb10b8689b560681094b17fe161871d043 o default
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   260
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   261
  $ hg heads --template="{rev}:{node} {branch}\n"
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   262
  5:11abe3fb10b8689b560681094b17fe161871d043 default
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   263
  3:575c4b5ec114d64b681d33f8792853568bfb2b2c default
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   264
  2:dc0947a82db884575bb76ea10ac97b08536bfa03 default
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   265
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   266
  $ cd ..
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   267
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   268
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   269
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   270
Preserves external parent
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   271
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   272
  $ hg init external-parent
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   273
  $ cd external-parent
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   274
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   275
  $ hg debugdrawdag << 'EOF'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   276
  >   H
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   277
  >   |\
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   278
  >   | G
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   279
  >   | |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   280
  >   | F # F/E = F\n
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   281
  >   | |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   282
  >   D E # D/D = D\n
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   283
  >   |\|
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   284
  > I C B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   285
  >  \|/
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   286
  >   A
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   287
  > EOF
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   288
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   289
  $ hg rebase -s F --dest I --collapse # root (F) is not a merge
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   290
  rebasing 6:c82b08f646f1 "F" (F)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   291
  rebasing 7:a6db7fa104e1 "G" (G)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   292
  rebasing 8:e1d201b72d91 "H" (H tip)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   293
  saved backup bundle to $TESTTMP/external-parent/.hg/strip-backup/c82b08f646f1-f2721fbf-rebase.hg
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   294
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   295
  $ hg tglog
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   296
  o    6: 681daa3e686d 'Collapsed revision
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   297
  |\   * F
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   298
  | |  * G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   299
  | |  * H'
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   300
  | | o  5: 49cb92066bfd 'E'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   301
  | | |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   302
  | o |  4: 09143c0bf13e 'D'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   303
  | |\|
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   304
  o | |  3: 08ebfeb61bac 'I'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   305
  | | |
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   306
  | o |  2: dc0947a82db8 'C'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   307
  |/ /
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   308
  | o  1: 112478962961 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   309
  |/
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   310
  o  0: 426bada5c675 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   311
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   312
  $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   313
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   314
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   315
  D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   316
  E
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   317
  F
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   318
  G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   319
  I
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   320
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   321
  $ hg up tip -q
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   322
  $ cat E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   323
  F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   324
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   325
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   326
37030
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   327
Rebasing from multiple bases:
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   328
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   329
  $ hg init multiple-bases
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   330
  $ cd multiple-bases
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   331
  $ hg debugdrawdag << 'EOF'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   332
  >   C B
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   333
  > D |/
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   334
  > |/
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   335
  > A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   336
  > EOF
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   337
  $ hg rebase --collapse -r 'B+C' -d D
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   338
  rebasing 1:fc2b737bb2e5 "B" (B)
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   339
  rebasing 2:dc0947a82db8 "C" (C)
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   340
  saved backup bundle to $TESTTMP/multiple-bases/.hg/strip-backup/dc0947a82db8-b0c1a7ea-rebase.hg
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   341
  $ hg tglog
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   342
  o  2: 2127ae44d291 'Collapsed revision
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   343
  |  * B
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   344
  |  * C'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   345
  o  1: b18e25de2cf5 'D'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   346
  |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   347
  o  0: 426bada5c675 'A'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   348
  
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   349
  $ cd ..
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   350
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   351
With non-contiguous commits:
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   352
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   353
  $ hg init non-contiguous
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   354
  $ cd non-contiguous
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   355
  $ cat >> .hg/hgrc <<EOF
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   356
  > [experimental]
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   357
  > evolution=all
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   358
  > EOF
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   359
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   360
  $ hg debugdrawdag << 'EOF'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   361
  > F
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   362
  > |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   363
  > E
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   364
  > |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   365
  > D
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   366
  > |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   367
  > C
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   368
  > |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   369
  > B G
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   370
  > |/
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   371
  > A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   372
  > EOF
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   373
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   374
BROKEN: should be allowed
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   375
  $ hg rebase --collapse -r 'B+D+F' -d G
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   376
  abort: unable to collapse on top of 2, there is more than one external parent: 3, 5
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   377
  [255]
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   378
  $ cd ..
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   379
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   380
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   381
  $ hg init multiple-external-parents-2
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   382
  $ cd multiple-external-parents-2
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   383
  $ hg debugdrawdag << 'EOF'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   384
  > D       G
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   385
  > |\     /|
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   386
  > B C   E F
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   387
  >  \|   |/
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   388
  >   \ H /
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   389
  >    \|/
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   390
  >     A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   391
  > EOF
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   392
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   393
  $ hg rebase --collapse -d H -s 'B+F'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   394
  abort: unable to collapse on top of 5, there is more than one external parent: 1, 3
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   395
  [255]
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   396
  $ cd ..
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   397
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   398
With internal merge:
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   399
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   400
  $ hg init internal-merge
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   401
  $ cd internal-merge
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   402
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   403
  $ hg debugdrawdag << 'EOF'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   404
  >   E
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   405
  >   |\
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   406
  >   C D
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   407
  >   |/
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   408
  > F B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   409
  > |/
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   410
  > A
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   411
  > EOF
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   412
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   413
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   414
  $ hg rebase -s B --collapse --dest F
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   415
  rebasing 1:112478962961 "B" (B)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   416
  rebasing 3:26805aba1e60 "C" (C)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   417
  rebasing 4:be0ef73c17ad "D" (D)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   418
  rebasing 5:02c4367d6973 "E" (E tip)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   419
  saved backup bundle to $TESTTMP/internal-merge/.hg/strip-backup/112478962961-1dfb057b-rebase.hg
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   420
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   421
  $ hg tglog
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   422
  o  2: c0512a1797b0 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   423
  |  * B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   424
  |  * C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   425
  |  * D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   426
  |  * E'
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   427
  o  1: 8908a377a434 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   428
  |
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   429
  o  0: 426bada5c675 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   430
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   431
  $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   432
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   433
  B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   434
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   435
  D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   436
  F
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   437
  $ cd ..
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   438
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   439
Interactions between collapse and keepbranches
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   440
  $ hg init e
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   441
  $ cd e
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   442
  $ echo 'a' > a
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   443
  $ hg ci -Am 'A'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   444
  adding a
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   445
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
   446
  $ hg branch 'one'
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
   447
  marked working directory as branch one
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15267
diff changeset
   448
  (branches are permanent and global, did you want a bookmark?)
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   449
  $ echo 'b' > b
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   450
  $ hg ci -Am 'B'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   451
  adding b
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   452
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
   453
  $ hg branch 'two'
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
   454
  marked working directory as branch two
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   455
  $ echo 'c' > c
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   456
  $ hg ci -Am 'C'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   457
  adding c
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   458
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   459
  $ hg up -q 0
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   460
  $ echo 'd' > d
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   461
  $ hg ci -Am 'D'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   462
  adding d
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   463
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   464
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   465
  @  3: 41acb9dca9eb 'D'
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   466
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   467
  | o  2: 8ac4a08debf1 'C' two
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   468
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   469
  | o  1: 1ba175478953 'B' one
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   470
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   471
  o  0: 1994f17a630e 'A'
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   472
  
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   473
  $ hg rebase --keepbranches --collapse -s 1 -d 3
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   474
  abort: cannot collapse multiple named branches
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   475
  [255]
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   476
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   477
  $ repeatchange() {
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   478
  >   hg checkout $1
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   479
  >   hg cp d z
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   480
  >   echo blah >> z
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   481
  >   hg commit -Am "$2" --user "$3"
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   482
  > }
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   483
  $ repeatchange 3 "E" "user1"
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   484
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   485
  $ repeatchange 3 "E" "user2"
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   486
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   487
  created new head
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   488
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   489
  @  5: fbfb97b1089a 'E'
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   490
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   491
  | o  4: f338eb3c2c7c 'E'
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   492
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   493
  o  3: 41acb9dca9eb 'D'
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   494
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   495
  | o  2: 8ac4a08debf1 'C' two
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   496
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   497
  | o  1: 1ba175478953 'B' one
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   498
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   499
  o  0: 1994f17a630e 'A'
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   500
  
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   501
  $ hg rebase -s 5 -d 4
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   502
  rebasing 5:fbfb97b1089a "E" (tip)
40865
4edd427f34c1 rebase: clarify that commits that become empty are skipped
Martin von Zweigbergk <martinvonz@google.com>
parents: 40864
diff changeset
   503
  note: not rebasing 5:fbfb97b1089a "E" (tip), its destination already has all its changes
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   504
  saved backup bundle to $TESTTMP/e/.hg/strip-backup/fbfb97b1089a-553e1d85-rebase.hg
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   505
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   506
  @  4: f338eb3c2c7c 'E'
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   507
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   508
  o  3: 41acb9dca9eb 'D'
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   509
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   510
  | o  2: 8ac4a08debf1 'C' two
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   511
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   512
  | o  1: 1ba175478953 'B' one
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   513
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   514
  o  0: 1994f17a630e 'A'
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   515
  
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   516
  $ hg export tip
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   517
  # HG changeset patch
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   518
  # User user1
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   519
  # Date 0 0
18648
76b69cccb07a export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents: 18566
diff changeset
   520
  #      Thu Jan 01 00:00:00 1970 +0000
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   521
  # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   522
  # Parent  41acb9dca9eb976e84cd21fcb756b4afa5a35c09
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   523
  E
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   524
  
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   525
  diff -r 41acb9dca9eb -r f338eb3c2c7c z
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   526
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   527
  +++ b/z	Thu Jan 01 00:00:00 1970 +0000
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   528
  @@ -0,0 +1,2 @@
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   529
  +d
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   530
  +blah
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   531
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   532
  $ cd ..
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   533
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   534
Rebase, collapse and copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   535
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   536
  $ hg init copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   537
  $ cd copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   538
  $ hg unbundle "$TESTDIR/bundles/renames.hg"
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   539
  adding changesets
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   540
  adding manifests
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   541
  adding file changes
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   542
  added 4 changesets with 11 changes to 7 files (+1 heads)
39480
89630d0b3e23 phase: report number of non-public changeset alongside the new range
Boris Feld <boris.feld@octobus.net>
parents: 37032
diff changeset
   543
  new changesets f447d5abf5ea:338e84e2e558 (4 drafts)
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   544
  (run 'hg heads' to see heads, 'hg merge' to merge)
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   545
  $ hg up -q tip
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   546
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   547
  @  3: 338e84e2e558 'move2'
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   548
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   549
  o  2: 6e7340ee38c0 'move1'
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   550
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   551
  | o  1: 1352765a01d4 'change'
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   552
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   553
  o  0: f447d5abf5ea 'add'
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   554
  
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   555
  $ hg rebase --collapse -d 1
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   556
  rebasing 2:6e7340ee38c0 "move1"
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   557
  merging a and d to d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   558
  merging b and e to e
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   559
  merging c and f to f
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   560
  rebasing 3:338e84e2e558 "move2" (tip)
20945
18adc15635a1 merge: keep destination filename as key in filemerge actions
Mads Kiilerich <madski@unity3d.com>
parents: 20766
diff changeset
   561
  merging f and c to c
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   562
  merging e and g to g
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   563
  saved backup bundle to $TESTTMP/copies/.hg/strip-backup/6e7340ee38c0-ef8ef003-rebase.hg
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   564
  $ hg st
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   565
  $ hg st --copies --change tip
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   566
  A d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   567
    a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   568
  A g
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   569
    b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   570
  R b
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   571
  $ hg up tip -q
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   572
  $ cat c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   573
  c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   574
  c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   575
  $ cat d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   576
  a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   577
  a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   578
  $ cat g
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   579
  b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   580
  b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   581
  $ hg log -r . --template "{file_copies}\n"
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   582
  d (a)g (b)
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   583
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   584
Test collapsing a middle revision in-place
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   585
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   586
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   587
  @  2: 64b456429f67 'Collapsed revision
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   588
  |  * move1
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   589
  |  * move2'
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   590
  o  1: 1352765a01d4 'change'
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   591
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   592
  o  0: f447d5abf5ea 'add'
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   593
  
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   594
  $ hg rebase --collapse -r 1 -d 0
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   595
  abort: can't remove original changesets with unrebased descendants
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   596
  (use --keep to keep original changesets)
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   597
  [255]
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   598
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   599
Test collapsing in place
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   600
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   601
  $ hg rebase --collapse -b . -d 0
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   602
  rebasing 1:1352765a01d4 "change"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   603
  rebasing 2:64b456429f67 "Collapsed revision" (tip)
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   604
  saved backup bundle to $TESTTMP/copies/.hg/strip-backup/1352765a01d4-45a352ea-rebase.hg
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   605
  $ hg st --change tip --copies
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   606
  M a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   607
  M c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   608
  A d
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   609
    a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   610
  A g
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   611
    b
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   612
  R b
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   613
  $ hg up tip -q
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   614
  $ cat a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   615
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   616
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   617
  $ cat c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   618
  c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   619
  c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   620
  $ cat d
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   621
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   622
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   623
  $ cat g
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   624
  b
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   625
  b
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   626
  $ cd ..
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   627
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   628
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   629
Test stripping a revision with another child
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   630
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   631
  $ hg init f
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   632
  $ cd f
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   633
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   634
  $ hg debugdrawdag << 'EOF'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   635
  > C B
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   636
  > |/
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   637
  > A
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   638
  > EOF
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   639
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   640
  $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   641
  2:dc0947a82db884575bb76ea10ac97b08536bfa03 default: C
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   642
  1:112478962961147124edd43549aedd1a335e44bf default: B
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   643
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   644
  $ hg strip C
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   645
  saved backup bundle to $TESTTMP/f/.hg/strip-backup/dc0947a82db8-d21b92a4-backup.hg
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   646
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   647
  $ hg tglog
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   648
  o  1: 112478962961 'B'
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   649
  |
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   650
  o  0: 426bada5c675 'A'
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   651
  
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   652
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   653
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   654
  $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   655
  1:112478962961147124edd43549aedd1a335e44bf default: B
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   656
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   657
  $ cd ..
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   658
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   659
Test collapsing changes that add then remove a file
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   660
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   661
  $ hg init collapseaddremove
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   662
  $ cd collapseaddremove
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   663
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   664
  $ touch base
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   665
  $ hg commit -Am base
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   666
  adding base
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   667
  $ touch a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   668
  $ hg commit -Am a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   669
  adding a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   670
  $ hg rm a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   671
  $ touch b
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   672
  $ hg commit -Am b
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   673
  adding b
19986
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
   674
  $ hg book foo
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   675
  $ hg rebase -d 0 -r "1::2" --collapse -m collapsed
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   676
  rebasing 1:6d8d9f24eec3 "a"
34290
4f969b9e0cf5 rebase: also include other namespaces in changeset description
Martin von Zweigbergk <martinvonz@google.com>
parents: 33332
diff changeset
   677
  rebasing 2:1cc73eca5ecc "b" (foo tip)
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   678
  saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/6d8d9f24eec3-77d3b6e2-rebase.hg
19986
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
   679
  $ hg log -G --template "{rev}: '{desc}' {bookmarks}"
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
   680
  @  1: 'collapsed' foo
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   681
  |
19986
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
   682
  o  0: 'base'
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   683
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   684
  $ hg manifest --rev tip
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   685
  b
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   686
  base
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   687
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   688
  $ cd ..
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   689
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   690
Test that rebase --collapse will remember message after
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   691
running into merge conflict and invoking rebase --continue.
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   692
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   693
  $ hg init collapse_remember_message
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   694
  $ cd collapse_remember_message
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   695
  $ hg debugdrawdag << 'EOF'
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   696
  > C B # B/A = B\n
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   697
  > |/  # C/A = C\n
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   698
  > A
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   699
  > EOF
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   700
  $ hg rebase --collapse -m "new message" -b B -d C
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   701
  rebasing 1:81e5401e4d37 "B" (B)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   702
  merging A
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   703
  warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   704
  unresolved conflicts (see hg resolve, then hg rebase --continue)
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   705
  [1]
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   706
  $ rm A.orig
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   707
  $ hg resolve --mark A
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   708
  (no more unresolved files)
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   709
  continue: hg rebase --continue
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   710
  $ hg rebase --continue
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   711
  rebasing 1:81e5401e4d37 "B" (B)
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   712
  saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/81e5401e4d37-96c3dd30-rebase.hg
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   713
  $ hg log
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   714
  changeset:   2:17186933e123
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   715
  tag:         tip
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   716
  user:        test
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   717
  date:        Thu Jan 01 00:00:00 1970 +0000
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   718
  summary:     new message
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   719
  
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   720
  changeset:   1:043039e9df84
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   721
  tag:         C
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   722
  user:        test
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   723
  date:        Thu Jan 01 00:00:00 1970 +0000
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   724
  summary:     C
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   725
  
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   726
  changeset:   0:426bada5c675
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   727
  tag:         A
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   728
  user:        test
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   729
  date:        Thu Jan 01 00:00:00 1970 +0000
37029
dd2833e4d660 tests: use drawdag in test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35393
diff changeset
   730
  summary:     A
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   731
  
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   732
  $ cd ..
37030
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   733
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   734
Test aborted editor on final message
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   735
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   736
  $ HGMERGE=:merge3
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   737
  $ export HGMERGE
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   738
  $ hg init aborted-editor
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   739
  $ cd aborted-editor
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   740
  $ hg debugdrawdag << 'EOF'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   741
  > C   # D/A = D\n
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   742
  > |   # C/A = C\n
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   743
  > B D # B/A = B\n
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   744
  > |/  # A/A = A\n
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   745
  > A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   746
  > EOF
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   747
  $ hg rebase --collapse -t internal:merge3 -s B -d D
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   748
  rebasing 1:f899f3910ce7 "B" (B)
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   749
  merging A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   750
  warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   751
  unresolved conflicts (see hg resolve, then hg rebase --continue)
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   752
  [1]
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   753
  $ hg tglog
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   754
  o  3: 63668d570d21 'C'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   755
  |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   756
  | @  2: 82b8abf9c185 'D'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   757
  | |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   758
  @ |  1: f899f3910ce7 'B'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   759
  |/
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   760
  o  0: 4a2df7238c3b 'A'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   761
  
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   762
  $ cat A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   763
  <<<<<<< dest:   82b8abf9c185 D - test: D
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   764
  D
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   765
  ||||||| base
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   766
  A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   767
  =======
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   768
  B
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   769
  >>>>>>> source: f899f3910ce7 B - test: B
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   770
  $ echo BC > A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   771
  $ hg resolve -m
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   772
  (no more unresolved files)
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   773
  continue: hg rebase --continue
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   774
  $ hg rebase --continue
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   775
  rebasing 1:f899f3910ce7 "B" (B)
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   776
  rebasing 3:63668d570d21 "C" (C tip)
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   777
  merging A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   778
  warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   779
  unresolved conflicts (see hg resolve, then hg rebase --continue)
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   780
  [1]
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   781
  $ hg tglog
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   782
  @  3: 63668d570d21 'C'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   783
  |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   784
  | @  2: 82b8abf9c185 'D'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   785
  | |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   786
  o |  1: f899f3910ce7 'B'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   787
  |/
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   788
  o  0: 4a2df7238c3b 'A'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   789
  
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   790
  $ cat A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   791
  <<<<<<< dest:   82b8abf9c185 D - test: D
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   792
  BC
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   793
  ||||||| base
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   794
  B
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   795
  =======
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   796
  C
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   797
  >>>>>>> source: 63668d570d21 C tip - test: C
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   798
  $ echo BD > A
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   799
  $ hg resolve -m
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   800
  (no more unresolved files)
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   801
  continue: hg rebase --continue
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   802
  $ HGEDITOR=false hg rebase --continue --config ui.interactive=1
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   803
  already rebased 1:f899f3910ce7 "B" (B) as 82b8abf9c185
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   804
  rebasing 3:63668d570d21 "C" (C tip)
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   805
  abort: edit failed: false exited with status 1
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   806
  [255]
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   807
  $ hg tglog
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   808
  o  3: 63668d570d21 'C'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   809
  |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   810
  | @  2: 82b8abf9c185 'D'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   811
  | |
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   812
  o |  1: f899f3910ce7 'B'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   813
  |/
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   814
  o  0: 4a2df7238c3b 'A'
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   815
  
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   816
  $ hg rebase --continue
9cc9b3e155f8 tests: add some more tests to test-rebase-collapse.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 37029
diff changeset
   817
  already rebased 1:f899f3910ce7 "B" (B) as 82b8abf9c185
37032
98663bed146e rebase: store rebase state after each commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 37030
diff changeset
   818
  already rebased 3:63668d570d21 "C" (C tip) as 82b8abf9c185
98663bed146e rebase: store rebase state after each commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 37030
diff changeset
   819
  saved backup bundle to $TESTTMP/aborted-editor/.hg/strip-backup/f899f3910ce7-7cab5e15-rebase.hg