tests/test-rebase-collapse.t
author Anton Shestakov <av6@dwimlabs.net>
Tue, 13 Feb 2018 18:12:26 +0800
branchstable
changeset 35822 9f454a717c43
parent 35400 4441705b7111
child 37032 dd2833e4d660
permissions -rw-r--r--
tests: allow age to go up to triple digits in test-shelve.t We started to glob the age of shelved changes in 51934fc796c0, which says that sometimes tests run slow and `hg shelve --list` says "2s" instead of "1s". However in some instances, like [1], tests run so slow that the age goes up to double digits ("13s" in that case). When that happens, `hg shelve --list` output has less white spaces after the age, so let's glob the spaces too. We probably won't ever need to handle triple digits there, but I went ahead and left only 2 required white spaces in total. [1]: https://buildd.debian.org/status/fetch.php?pkg=mercurial&arch=sparc64&ver=4.5-1&stamp=1518360804&raw=0
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=
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     5
  > 
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     6
  > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     7
  > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     8
  > 
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     9
  > [alias]
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    10
  > 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
    11
  > 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
    12
  > EOF
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10762
diff changeset
    13
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    14
Create repo a:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    15
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    16
  $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    17
  $ cd a
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 15990
diff changeset
    18
  $ hg unbundle "$TESTDIR/bundles/rebase.hg"
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
    19
  adding changesets
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
    20
  adding manifests
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
    21
  adding file changes
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
    22
  added 8 changesets with 7 changes to 7 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34297
diff changeset
    23
  new changesets cd010b8cd998:02de42196ebe
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
    24
  (run 'hg heads' to see heads, 'hg merge' to merge)
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
    25
  $ hg up tip
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
    26
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    27
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    28
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    29
  @  7: 02de42196ebe 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    30
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    31
  | o  6: eea13746799a 'G'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    32
  |/|
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    33
  o |  5: 24b6387c8c8c 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    34
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    35
  | o  4: 9520eea781bc 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    36
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    37
  | o  3: 32af7686d403 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    38
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    39
  | o  2: 5fddd98957c8 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    40
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    41
  | o  1: 42ccdea3bb16 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    42
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    43
  o  0: cd010b8cd998 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    44
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    45
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    46
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    47
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    48
Rebasing B onto H and collapsing changesets with different phases:
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    49
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    50
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    51
  $ hg clone -q -u 3 a a1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    52
  $ cd a1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    53
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    54
  $ hg phase --force --secret 3
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    55
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    56
  $ 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
    57
  > echo "==== before editing"
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    58
  > cat \$1
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    59
  > echo "===="
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    60
  > 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
    61
  > EOF
28101
79437fb352ce tests: add an explicit destination in some rebase tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26811
diff changeset
    62
  $ HGEDITOR="sh $TESTTMP/editor.sh" hg rebase --collapse --keepbranches -e --dest 7
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
    63
  rebasing 1:42ccdea3bb16 "B"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
    64
  rebasing 2:5fddd98957c8 "C"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
    65
  rebasing 3:32af7686d403 "D"
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    66
  ==== before editing
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    67
  Collapsed revision
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    68
  * B
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    69
  * C
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    70
  * D
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    71
  
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    72
  
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    73
  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
    74
  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
    75
  HG: --
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    76
  HG: user: Nicolas Dumazet <nicdumz.commits@gmail.com>
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    77
  HG: branch 'default'
22895
dfa44e25bb53 dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents: 22206
diff changeset
    78
  HG: added B
dfa44e25bb53 dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents: 22206
diff changeset
    79
  HG: added C
dfa44e25bb53 dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com>
parents: 22206
diff changeset
    80
  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
    81
  ====
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
    82
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    83
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    84
  $ hg tglogp
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    85
  @  5: 30882080ba93 secret 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    86
  |  * B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    87
  |  * C
20766
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    88
  |  * D
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    89
  |
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    90
  |
95aab23a806b rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20185
diff changeset
    91
  |  edited manually'
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    92
  o  4: 02de42196ebe draft 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    93
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    94
  | o  3: eea13746799a draft 'G'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    95
  |/|
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    96
  o |  2: 24b6387c8c8c draft 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    97
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    98
  | o  1: 9520eea781bc draft 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    99
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   100
  o  0: cd010b8cd998 draft 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   101
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   102
  $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   103
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   104
  B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   105
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   106
  D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   107
  F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   108
  H
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   109
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   110
  $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   111
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   112
15267
3bfdfefea2fc rebase: use revset as soon as possible in internal logic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 14897
diff changeset
   113
Rebasing E onto H:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   114
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   115
  $ hg clone -q -u . a a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   116
  $ cd a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   117
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   118
  $ hg phase --force --secret 6
28101
79437fb352ce tests: add an explicit destination in some rebase tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26811
diff changeset
   119
  $ hg rebase --source 4 --collapse --dest 7
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   120
  rebasing 4:9520eea781bc "E"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   121
  rebasing 6:eea13746799a "G"
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   122
  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   123
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   124
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   125
  o  6: 7dd333a2d1e4 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   126
  |  * E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   127
  |  * G'
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   128
  @  5: 02de42196ebe 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   129
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   130
  o  4: 24b6387c8c8c 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   131
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   132
  | o  3: 32af7686d403 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   133
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   134
  | o  2: 5fddd98957c8 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   135
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   136
  | o  1: 42ccdea3bb16 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   137
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   138
  o  0: cd010b8cd998 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   139
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   140
  $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   141
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   142
  E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   143
  F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   144
  H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   145
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   146
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   147
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   148
Rebasing G onto H with custom message:
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   149
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   150
  $ hg clone -q -u . a a3
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   151
  $ cd a3
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   152
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   153
  $ hg rebase --base 6 -m 'custom message'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   154
  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
   155
  [255]
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   156
22206
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
   157
  $ 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
   158
  > env | grep HGEDITFORM
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
   159
  > true
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
   160
  > EOF
28101
79437fb352ce tests: add an explicit destination in some rebase tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26811
diff changeset
   161
  $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e --dest 7
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   162
  rebasing 4:9520eea781bc "E"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   163
  rebasing 6:eea13746799a "G"
22206
6122ad50e38f rebase: use "rebase.collapse" as "editform" for "--collapse" always
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20945
diff changeset
   164
  HGEDITFORM=rebase.collapse
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   165
  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/9520eea781bc-fcd8edd4-rebase.hg
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   166
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   167
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   168
  o  6: 38ed6a6b026b 'custom message'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   169
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   170
  @  5: 02de42196ebe 'H'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   171
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   172
  o  4: 24b6387c8c8c 'F'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   173
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   174
  | o  3: 32af7686d403 'D'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   175
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   176
  | o  2: 5fddd98957c8 'C'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   177
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   178
  | o  1: 42ccdea3bb16 'B'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   179
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   180
  o  0: cd010b8cd998 'A'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   181
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   182
  $ hg manifest --rev tip
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   183
  A
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   184
  E
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   185
  F
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   186
  H
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   187
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   188
  $ cd ..
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   189
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   190
Create repo b:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   191
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   192
  $ hg init b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   193
  $ cd b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   194
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   195
  $ echo A > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   196
  $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   197
  adding A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   198
  $ echo B > B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   199
  $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   200
  adding B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   201
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   202
  $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   203
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   204
  $ echo C > C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   205
  $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   206
  adding C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   207
  created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   208
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   209
  $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   210
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   211
  (branch merge, don't forget to commit)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   212
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   213
  $ echo D > D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   214
  $ hg ci -Am D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   215
  adding D
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
  $ hg up -q 1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   218
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   219
  $ echo E > E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   220
  $ hg ci -Am E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   221
  adding E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   222
  created new head
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   223
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   224
  $ echo F > F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   225
  $ hg ci -Am F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   226
  adding F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   227
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   228
  $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   229
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   230
  (branch merge, don't forget to commit)
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   231
  $ hg ci -m G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   232
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   233
  $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   234
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   235
  $ echo H > H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   236
  $ hg ci -Am H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   237
  adding H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   238
  created new head
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   239
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   240
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   241
  @  7: c65502d41787 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   242
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   243
  | o    6: c772a8b2dc17 'G'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   244
  | |\
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   245
  | | o  5: 7f219660301f 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   246
  | | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   247
  | | o  4: 8a5212ebc852 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   248
  | | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   249
  | o |  3: 2870ad076e54 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   250
  | |\|
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   251
  | o |  2: c5cefa58fd55 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   252
  |/ /
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   253
  | o  1: 27547f69f254 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   254
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   255
  o  0: 4a2df7238c3b 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   256
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   257
  $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   258
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   259
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   260
Rebase and collapse - more than one external (fail):
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   261
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   262
  $ hg clone -q -u . b b1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   263
  $ cd b1
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   264
28101
79437fb352ce tests: add an explicit destination in some rebase tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26811
diff changeset
   265
  $ hg rebase -s 2 --dest 7 --collapse
19956
78ab0f85e249 rebase: improve error message for more than one external parent
Mads Kiilerich <madski@unity3d.com>
parents: 19925
diff changeset
   266
  abort: unable to collapse on top of 7, there is more than one external parent: 1, 5
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   267
  [255]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   268
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   269
Rebase and collapse - E onto H:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   270
28101
79437fb352ce tests: add an explicit destination in some rebase tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26811
diff changeset
   271
  $ hg rebase -s 4 --dest 7 --collapse # root (4) is not a merge
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   272
  rebasing 4:8a5212ebc852 "E"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   273
  rebasing 5:7f219660301f "F"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   274
  rebasing 6:c772a8b2dc17 "G"
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   275
  saved backup bundle to $TESTTMP/b1/.hg/strip-backup/8a5212ebc852-75046b61-rebase.hg
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   276
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   277
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   278
  o    5: f97c4725bd99 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   279
  |\   * E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   280
  | |  * F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   281
  | |  * G'
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   282
  | @  4: c65502d41787 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   283
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   284
  o |    3: 2870ad076e54 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   285
  |\ \
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   286
  | o |  2: c5cefa58fd55 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   287
  | |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   288
  o /  1: 27547f69f254 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   289
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   290
  o  0: 4a2df7238c3b 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   291
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   292
  $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   293
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   294
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   295
  D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   296
  E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   297
  F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   298
  H
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   299
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   300
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   301
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   302
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   303
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   304
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   305
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
   306
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
   307
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
   308
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
   309
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
   310
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   311
  $ hg clone -q -u . b b2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   312
  $ cd b2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   313
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   314
  $ hg heads --template="{rev}:{node} {branch}\n"
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   315
  7:c65502d4178782309ce0574c5ae6ee9485a9bafa default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   316
  6:c772a8b2dc17629cec88a19d09c926c4814b12c7 default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   317
20185
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
   318
  $ cat $TESTTMP/b2/.hg/cache/branch2-served
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   319
  c65502d4178782309ce0574c5ae6ee9485a9bafa 7
20185
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
   320
  c772a8b2dc17629cec88a19d09c926c4814b12c7 o default
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
   321
  c65502d4178782309ce0574c5ae6ee9485a9bafa o default
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   322
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   323
  $ hg strip 4
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   324
  saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-75046b61-backup.hg
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   325
20185
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
   326
  $ cat $TESTTMP/b2/.hg/cache/branch2-served
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   327
  c65502d4178782309ce0574c5ae6ee9485a9bafa 4
20185
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
   328
  2870ad076e541e714f3c2bc32826b5c6a6e5b040 o default
7d4219512823 branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents: 20117
diff changeset
   329
  c65502d4178782309ce0574c5ae6ee9485a9bafa o default
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   330
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   331
  $ hg heads --template="{rev}:{node} {branch}\n"
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   332
  4:c65502d4178782309ce0574c5ae6ee9485a9bafa default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   333
  3:2870ad076e541e714f3c2bc32826b5c6a6e5b040 default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   334
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   335
  $ cd ..
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   336
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   337
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   338
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   339
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   340
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   341
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   342
Create repo c:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   343
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   344
  $ hg init c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   345
  $ cd c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   346
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   347
  $ echo A > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   348
  $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   349
  adding A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   350
  $ echo B > B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   351
  $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   352
  adding B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   353
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   354
  $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   355
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   356
  $ echo C > C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   357
  $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   358
  adding C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   359
  created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   360
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   361
  $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   362
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   363
  (branch merge, don't forget to commit)
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   364
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   365
  $ echo D > D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   366
  $ hg ci -Am D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   367
  adding D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   368
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   369
  $ hg up -q 1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   370
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   371
  $ echo E > E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   372
  $ hg ci -Am E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   373
  adding E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   374
  created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   375
  $ echo F > E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   376
  $ hg ci -m 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   377
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   378
  $ echo G > G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   379
  $ hg ci -Am G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   380
  adding G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   381
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   382
  $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   383
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   384
  (branch merge, don't forget to commit)
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   385
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   386
  $ hg ci -m H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   387
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   388
  $ hg up -q 0
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   389
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   390
  $ echo I > I
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   391
  $ hg ci -Am I
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   392
  adding I
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   393
  created new head
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   394
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   395
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   396
  @  8: 46d6f0e29c20 'I'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   397
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   398
  | o    7: 417d3b648079 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   399
  | |\
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   400
  | | o  6: 55a44ad28289 'G'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   401
  | | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   402
  | | o  5: dca5924bb570 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   403
  | | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   404
  | | o  4: 8a5212ebc852 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   405
  | | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   406
  | o |  3: 2870ad076e54 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   407
  | |\|
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   408
  | o |  2: c5cefa58fd55 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   409
  |/ /
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   410
  | o  1: 27547f69f254 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   411
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   412
  o  0: 4a2df7238c3b 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   413
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   414
  $ cd ..
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   415
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   416
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   417
Rebase and collapse - E onto I:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   418
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   419
  $ hg clone -q -u . c c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   420
  $ cd c1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   421
28101
79437fb352ce tests: add an explicit destination in some rebase tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26811
diff changeset
   422
  $ hg rebase -s 4 --dest 8 --collapse # root (4) is not a merge
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   423
  rebasing 4:8a5212ebc852 "E"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   424
  rebasing 5:dca5924bb570 "F"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   425
  merging E
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   426
  rebasing 6:55a44ad28289 "G"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   427
  rebasing 7:417d3b648079 "H"
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   428
  saved backup bundle to $TESTTMP/c1/.hg/strip-backup/8a5212ebc852-f95d0879-rebase.hg
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   429
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   430
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   431
  o    5: 340b34a63b39 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   432
  |\   * E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   433
  | |  * F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   434
  | |  * G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   435
  | |  * H'
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   436
  | @  4: 46d6f0e29c20 'I'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   437
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   438
  o |    3: 2870ad076e54 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   439
  |\ \
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   440
  | o |  2: c5cefa58fd55 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   441
  | |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   442
  o /  1: 27547f69f254 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   443
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   444
  o  0: 4a2df7238c3b 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   445
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   446
  $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   447
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   448
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   449
  D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   450
  E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   451
  G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   452
  I
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   453
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   454
  $ hg up tip -q
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   455
  $ cat E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   456
  F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   457
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   458
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   459
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   460
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   461
Create repo d:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   462
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   463
  $ hg init d
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   464
  $ cd d
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   465
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   466
  $ echo A > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   467
  $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   468
  adding A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   469
  $ echo B > B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   470
  $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   471
  adding B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   472
  $ echo C > C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   473
  $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   474
  adding C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   475
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   476
  $ hg up -q 1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   477
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   478
  $ echo D > D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   479
  $ hg ci -Am D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   480
  adding D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   481
  created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   482
  $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   483
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   484
  (branch merge, don't forget to commit)
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   485
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   486
  $ hg ci -m E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   487
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   488
  $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   489
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   490
  $ echo F > F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   491
  $ hg ci -Am F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   492
  adding F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   493
  created new head
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   494
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   495
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   496
  @  5: c137c2b8081f 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   497
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   498
  | o    4: 0a42590ed746 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   499
  | |\
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   500
  | | o  3: 7bbcd6078bcc 'D'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   501
  | | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   502
  | o |  2: f838bfaca5c7 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   503
  | |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   504
  | o  1: 27547f69f254 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   505
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   506
  o  0: 4a2df7238c3b 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   507
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   508
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   509
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   510
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   511
Rebase and collapse - B onto F:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   512
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   513
  $ hg clone -q -u . d d1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   514
  $ cd d1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   515
28101
79437fb352ce tests: add an explicit destination in some rebase tests
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26811
diff changeset
   516
  $ hg rebase -s 1 --collapse --dest 5
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   517
  rebasing 1:27547f69f254 "B"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   518
  rebasing 2:f838bfaca5c7 "C"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   519
  rebasing 3:7bbcd6078bcc "D"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   520
  rebasing 4:0a42590ed746 "E"
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   521
  saved backup bundle to $TESTTMP/d1/.hg/strip-backup/27547f69f254-9a3f7d92-rebase.hg
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   522
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   523
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   524
  o  2: b72eaccb283f 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   525
  |  * B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   526
  |  * C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   527
  |  * D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   528
  |  * E'
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   529
  @  1: c137c2b8081f 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   530
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   531
  o  0: 4a2df7238c3b 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   532
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   533
  $ hg manifest --rev tip
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   534
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   535
  B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   536
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   537
  D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   538
  F
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   539
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   540
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
   541
  $ cd ..
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   542
  $ hg init e
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   543
  $ cd e
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   544
  $ echo 'a' > a
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   545
  $ 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
   546
  adding a
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   547
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
   548
  $ hg branch 'one'
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
   549
  marked working directory as branch one
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15267
diff changeset
   550
  (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
   551
  $ echo 'b' > b
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   552
  $ 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
   553
  adding b
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   554
18566
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
   555
  $ hg branch 'two'
341868ef0cf6 bookmark: don't allow integers as bookmark/branch/tag names
Durham Goode <durham@fb.com>
parents: 18395
diff changeset
   556
  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
   557
  $ echo 'c' > c
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   558
  $ 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
   559
  adding c
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   560
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   561
  $ 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
   562
  $ echo 'd' > d
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   563
  $ 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
   564
  adding d
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   565
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   566
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   567
  @  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
   568
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   569
  | 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
   570
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   571
  | 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
   572
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   573
  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
   574
  
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   575
  $ 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
   576
  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
   577
  [255]
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   578
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   579
  $ repeatchange() {
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   580
  >   hg checkout $1
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   581
  >   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
   582
  >   echo blah >> z
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   583
  >   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
   584
  > }
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   585
  $ 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
   586
  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
   587
  $ 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
   588
  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
   589
  created new head
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   590
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   591
  @  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
   592
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   593
  | 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
   594
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   595
  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
   596
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   597
  | 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
   598
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   599
  | 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
   600
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   601
  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
   602
  
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   603
  $ 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
   604
  rebasing 5:fbfb97b1089a "E" (tip)
23518
2fb0504b8175 rebase: show warning when rebase creates no changes to commit
Mads Kiilerich <madski@unity3d.com>
parents: 23517
diff changeset
   605
  note: rebase of 5:fbfb97b1089a created no changes to commit
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   606
  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
   607
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   608
  @  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
   609
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   610
  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
   611
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   612
  | 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
   613
  | |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   614
  | 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
   615
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   616
  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
   617
  
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   618
  $ hg export tip
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   619
  # HG changeset patch
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   620
  # User user1
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   621
  # 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
   622
  #      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
   623
  # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   624
  # Parent  41acb9dca9eb976e84cd21fcb756b4afa5a35c09
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   625
  E
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   626
  
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   627
  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
   628
  --- /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
   629
  +++ 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
   630
  @@ -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
   631
  +d
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   632
  +blah
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   633
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   634
  $ cd ..
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   635
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   636
Rebase, collapse and copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   637
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   638
  $ hg init copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   639
  $ cd copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   640
  $ hg unbundle "$TESTDIR/bundles/renames.hg"
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   641
  adding changesets
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   642
  adding manifests
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   643
  adding file changes
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   644
  added 4 changesets with 11 changes to 7 files (+1 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34297
diff changeset
   645
  new changesets f447d5abf5ea:338e84e2e558
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   646
  (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
   647
  $ hg up -q tip
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   648
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   649
  @  3: 338e84e2e558 'move2'
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   650
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   651
  o  2: 6e7340ee38c0 'move1'
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   652
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   653
  | o  1: 1352765a01d4 'change'
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   654
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   655
  o  0: f447d5abf5ea 'add'
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   656
  
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   657
  $ hg rebase --collapse -d 1
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   658
  rebasing 2:6e7340ee38c0 "move1"
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   659
  merging a and d to d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   660
  merging b and e to e
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   661
  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
   662
  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
   663
  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
   664
  merging e and g to g
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   665
  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
   666
  $ 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
   667
  $ hg st --copies --change tip
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   668
  A d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   669
    a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   670
  A g
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   671
    b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   672
  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
   673
  $ hg up tip -q
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   674
  $ cat c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   675
  c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   676
  c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   677
  $ cat d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   678
  a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   679
  a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   680
  $ cat g
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   681
  b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   682
  b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   683
  $ 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
   684
  d (a)g (b)
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   685
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   686
Test collapsing a middle revision in-place
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   687
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   688
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   689
  @  2: 64b456429f67 'Collapsed revision
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   690
  |  * move1
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   691
  |  * move2'
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   692
  o  1: 1352765a01d4 'change'
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   693
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   694
  o  0: f447d5abf5ea 'add'
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   695
  
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   696
  $ hg rebase --collapse -r 1 -d 0
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   697
  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
   698
  (use --keep to keep original changesets)
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   699
  [255]
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   700
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   701
Test collapsing in place
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   702
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   703
  $ 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
   704
  rebasing 1:1352765a01d4 "change"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   705
  rebasing 2:64b456429f67 "Collapsed revision" (tip)
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   706
  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
   707
  $ hg st --change tip --copies
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   708
  M a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   709
  M c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   710
  A d
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   711
    a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   712
  A g
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   713
    b
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   714
  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
   715
  $ hg up tip -q
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   716
  $ cat a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   717
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   718
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   719
  $ cat c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   720
  c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   721
  c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   722
  $ cat d
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   723
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   724
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   725
  $ cat g
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   726
  b
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   727
  b
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   728
  $ cd ..
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   729
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   730
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   731
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
   732
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   733
  $ hg init f
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   734
  $ cd f
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   735
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   736
  $ echo A > A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   737
  $ hg ci -Am A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   738
  adding A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   739
  $ echo B > B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   740
  $ hg ci -Am B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   741
  adding B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   742
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   743
  $ hg up -q 0
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   744
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   745
  $ echo C > C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   746
  $ hg ci -Am C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   747
  adding C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   748
  created new head
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   749
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   750
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   751
  @  2: c5cefa58fd55 'C'
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   752
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   753
  | o  1: 27547f69f254 'B'
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   754
  |/
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   755
  o  0: 4a2df7238c3b 'A'
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   756
  
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   757
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   758
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   759
  $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   760
  2:c5cefa58fd557f84b72b87f970135984337acbc5 default: C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   761
  1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   762
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   763
  $ hg strip 2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   764
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   765
  saved backup bundle to $TESTTMP/f/.hg/strip-backup/c5cefa58fd55-629429f4-backup.hg
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   766
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   767
  $ hg tglog
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   768
  o  1: 27547f69f254 'B'
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   769
  |
35394
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   770
  @  0: 4a2df7238c3b 'A'
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   771
  
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   772
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   773
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   774
  $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   775
  1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   776
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   777
  $ cd ..
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   778
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   779
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
   780
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   781
  $ hg init collapseaddremove
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   782
  $ cd collapseaddremove
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   783
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   784
  $ touch base
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   785
  $ hg commit -Am base
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   786
  adding base
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   787
  $ touch a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   788
  $ hg commit -Am a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   789
  adding a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   790
  $ hg rm a
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   791
  $ touch b
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   792
  $ hg commit -Am b
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   793
  adding b
19986
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
   794
  $ hg book foo
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   795
  $ 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
   796
  rebasing 1:6d8d9f24eec3 "a"
34297
4f969b9e0cf5 rebase: also include other namespaces in changeset description
Martin von Zweigbergk <martinvonz@google.com>
parents: 33332
diff changeset
   797
  rebasing 2:1cc73eca5ecc "b" (foo tip)
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   798
  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
   799
  $ 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
   800
  @  1: 'collapsed' foo
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   801
  |
19986
ea81f8b2364e rebase: fix working copy location after a --collapse (issue4080)
Durham Goode <durham@fb.com>
parents: 19956
diff changeset
   802
  o  0: 'base'
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   803
  
19924
c23c62209cc4 tests: prepare rebase test for wc parent preservation
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 18778
diff changeset
   804
  $ 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
   805
  b
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   806
  base
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   807
18778
1ef89df2c248 rebase: fix --collapse when a file was added then removed
Durham Goode <durham@fb.com>
parents: 18648
diff changeset
   808
  $ cd ..
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   809
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   810
Test that rebase --collapse will remember message after
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   811
running into merge conflict and invoking rebase --continue.
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   812
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   813
  $ hg init collapse_remember_message
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   814
  $ cd collapse_remember_message
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   815
  $ touch a
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   816
  $ hg add a
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   817
  $ hg commit -m "a"
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   818
  $ echo "a-default" > a
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   819
  $ hg commit -m "a-default"
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   820
  $ hg update -r 0
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   821
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   822
  $ hg branch dev
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   823
  marked working directory as branch dev
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   824
  (branches are permanent and global, did you want a bookmark?)
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   825
  $ echo "a-dev" > a
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   826
  $ hg commit -m "a-dev"
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   827
  $ hg rebase --collapse -m "a-default-dev" -d 1
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   828
  rebasing 2:b8d8db2b242d "a-dev" (tip)
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   829
  merging a
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   830
  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   831
  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
   832
  [1]
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   833
  $ rm a.orig
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   834
  $ hg resolve --mark a
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   835
  (no more unresolved files)
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   836
  continue: hg rebase --continue
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   837
  $ hg rebase --continue
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   838
  rebasing 2:b8d8db2b242d "a-dev" (tip)
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35394
diff changeset
   839
  saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/b8d8db2b242d-f474c19a-rebase.hg
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   840
  $ hg log
30469
ce3a133f71b3 conflicts: make spacing consistent in conflict markers
Kostia Balytskyi <ikostia@fb.com>
parents: 28185
diff changeset
   841
  changeset:   2:45ba1d1a8665
28185
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   842
  tag:         tip
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   843
  user:        test
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   844
  date:        Thu Jan 01 00:00:00 1970 +0000
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   845
  summary:     a-default-dev
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   846
  
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   847
  changeset:   1:3c8db56a44bc
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   848
  user:        test
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   849
  date:        Thu Jan 01 00:00:00 1970 +0000
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   850
  summary:     a-default
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   851
  
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   852
  changeset:   0:3903775176ed
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   853
  user:        test
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   854
  date:        Thu Jan 01 00:00:00 1970 +0000
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   855
  summary:     a
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   856
  
c7e8948627f3 rebase: adds storing collapse message (issue4792)
liscju <piotr.listkiewicz@gmail.com>
parents: 28101
diff changeset
   857
  $ cd ..