tests/test-rebase-collapse.t
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 17 Dec 2012 17:12:02 +0100
changeset 18102 3c7b67b76190
parent 17030 ec5ef276077f
child 18234 a55b06885cda
permissions -rw-r--r--
clfilter: introduce a "unserver" filtering mode This mode is for repository used as a server. It filter secret and hidden changeset out. It is put to use in later changeset.
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
  > graphlog=
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     4
  > rebase=
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
     5
  > mq=
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     6
  > 
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     7
  > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     8
  > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     9
  > 
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    10
  > [alias]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    11
  > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    12
  > tglogp = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    13
  > EOF
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 10762
diff changeset
    14
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    15
Create repo a:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    16
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    17
  $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    18
  $ cd a
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 15990
diff changeset
    19
  $ 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
    20
  adding changesets
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
    21
  adding manifests
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
    22
  adding file changes
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13661
diff changeset
    23
  added 8 changesets with 7 changes to 7 files (+2 heads)
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
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    29
  @  7: 'H'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    30
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    31
  | o  6: 'G'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    32
  |/|
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    33
  o |  5: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    34
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    35
  | o  4: 'E'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    36
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    37
  | o  3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    38
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    39
  | o  2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    40
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    41
  | o  1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    42
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    43
  o  0: 'A'
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
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    56
  $ hg rebase --collapse --keepbranches
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
    57
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    58
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    59
  $ hg tglogp
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    60
  @  5:secret 'Collapsed revision
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    61
  |  * B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    62
  |  * C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    63
  |  * D'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    64
  o  4:draft 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    65
  |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    66
  | o  3:draft 'G'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    67
  |/|
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    68
  o |  2:draft 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    69
  | |
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    70
  | o  1:draft 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    71
  |/
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    72
  o  0:draft 'A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    73
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    74
  $ hg manifest
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    75
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    76
  B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    77
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    78
  D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    79
  F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    80
  H
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    81
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    82
  $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    83
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    84
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
    85
Rebasing E onto H:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    86
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    87
  $ hg clone -q -u . a a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    88
  $ cd a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    89
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
    90
  $ hg phase --force --secret 6
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
    91
  $ hg rebase --source 4 --collapse
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
    92
  saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    93
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    94
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    95
  @  6: 'Collapsed revision
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    96
  |  * E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    97
  |  * G'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    98
  o  5: 'H'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    99
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   100
  o  4: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   101
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   102
  | o  3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   103
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   104
  | o  2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   105
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   106
  | o  1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   107
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   108
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   109
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   110
  $ hg manifest
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   111
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   112
  E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   113
  F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   114
  H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   115
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   116
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   117
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   118
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
   119
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   120
  $ hg clone -q -u . a a3
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   121
  $ cd a3
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   122
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   123
  $ 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
   124
  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
   125
  [255]
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   126
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
   127
  $ hg rebase --source 4 --collapse -m 'custom message'
13661
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   128
  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   129
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   130
  $ hg tglog
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   131
  @  6: 'custom message'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   132
  |
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   133
  o  5: 'H'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   134
  |
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   135
  o  4: 'F'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   136
  |
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   137
  | o  3: 'D'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   138
  | |
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   139
  | o  2: 'C'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   140
  | |
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   141
  | o  1: 'B'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   142
  |/
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   143
  o  0: 'A'
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   144
  
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   145
  $ hg manifest
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   146
  A
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   147
  E
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   148
  F
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   149
  H
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   150
ee349e228835 rebase: add -m/--message to rebase --collapse (issue2389)
Radomir Dopieralski <sheep@stxnext.pl>
parents: 12640
diff changeset
   151
  $ cd ..
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   152
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   153
Create repo b:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   154
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   155
  $ hg init b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   156
  $ cd b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   157
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   158
  $ echo A > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   159
  $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   160
  adding A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   161
  $ echo B > B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   162
  $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   163
  adding B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   164
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   165
  $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   166
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   167
  $ echo C > C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   168
  $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   169
  adding C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   170
  created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   171
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   172
  $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   173
  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
   174
  (branch merge, don't forget to commit)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   175
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   176
  $ echo D > D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   177
  $ hg ci -Am D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   178
  adding D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   179
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   180
  $ hg up -q 1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   181
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   182
  $ echo E > E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   183
  $ hg ci -Am E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   184
  adding E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   185
  created new head
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   186
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   187
  $ echo F > F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   188
  $ hg ci -Am F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   189
  adding F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   190
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   191
  $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   192
  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
   193
  (branch merge, don't forget to commit)
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   194
  $ hg ci -m G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   195
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   196
  $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   197
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   198
  $ echo H > H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   199
  $ hg ci -Am H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   200
  adding H
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   201
  created new head
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   202
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   203
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   204
  @  7: 'H'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   205
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   206
  | o    6: 'G'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   207
  | |\
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   208
  | | o  5: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   209
  | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   210
  | | o  4: 'E'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   211
  | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   212
  | o |  3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   213
  | |\|
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   214
  | o |  2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   215
  |/ /
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   216
  | o  1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   217
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   218
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   219
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   220
  $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   221
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   222
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   223
Rebase and collapse - more than one external (fail):
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   224
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   225
  $ hg clone -q -u . b b1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   226
  $ cd b1
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   227
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   228
  $ hg rebase -s 2 --collapse
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   229
  abort: unable to collapse, there is more than one external parent
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   230
  [255]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   231
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   232
Rebase and collapse - E onto H:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   233
17005
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16714
diff changeset
   234
  $ hg rebase -s 4 --collapse # root (4) is not a merge
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
   235
  saved backup bundle to $TESTTMP/b1/.hg/strip-backup/*-backup.hg (glob)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   236
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   237
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   238
  @    5: 'Collapsed revision
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   239
  |\   * E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   240
  | |  * F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   241
  | |  * G'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   242
  | o  4: 'H'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   243
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   244
  o |    3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   245
  |\ \
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   246
  | o |  2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   247
  | |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   248
  o /  1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   249
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   250
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   251
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   252
  $ hg manifest
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   253
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   254
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   255
  D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   256
  E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   257
  F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   258
  H
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   259
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   260
  $ cd ..
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
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   263
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   264
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   265
Test that branchheads cache is updated correctly when doing a strip in which
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   266
the parent of the ancestor node to be stripped does not become a head and
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   267
also, the parent of a node that is a child of the node stripped becomes a head
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   268
(node 3).
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   269
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   270
  $ 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
   271
  $ cd b2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   272
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   273
  $ 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
   274
  7:c65502d4178782309ce0574c5ae6ee9485a9bafa default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   275
  6:c772a8b2dc17629cec88a19d09c926c4814b12c7 default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   276
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   277
  $ cat $TESTTMP/b2/.hg/cache/branchheads
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   278
  c65502d4178782309ce0574c5ae6ee9485a9bafa 7
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   279
  c772a8b2dc17629cec88a19d09c926c4814b12c7 default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   280
  c65502d4178782309ce0574c5ae6ee9485a9bafa default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   281
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   282
  $ hg strip 4
17030
ec5ef276077f tests: add missing 'backup bundle' path glob in test-rebase-collapse.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17013
diff changeset
   283
  saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-backup.hg (glob)
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   284
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   285
  $ cat $TESTTMP/b2/.hg/cache/branchheads
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   286
  c65502d4178782309ce0574c5ae6ee9485a9bafa 4
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   287
  2870ad076e541e714f3c2bc32826b5c6a6e5b040 default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   288
  c65502d4178782309ce0574c5ae6ee9485a9bafa default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   289
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   290
  $ 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
   291
  4:c65502d4178782309ce0574c5ae6ee9485a9bafa default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   292
  3:2870ad076e541e714f3c2bc32826b5c6a6e5b040 default
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   293
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   294
  $ cd ..
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   295
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   296
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   297
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   298
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   299
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   300
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   301
Create repo c:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   302
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   303
  $ hg init c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   304
  $ cd c
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   305
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   306
  $ echo A > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   307
  $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   308
  adding A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   309
  $ echo B > B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   310
  $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   311
  adding B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   312
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   313
  $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   314
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   315
  $ echo C > C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   316
  $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   317
  adding C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   318
  created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   319
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   320
  $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   321
  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
   322
  (branch merge, don't forget to commit)
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   323
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   324
  $ echo D > D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   325
  $ hg ci -Am D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   326
  adding D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   327
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   328
  $ hg up -q 1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   329
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   330
  $ echo E > E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   331
  $ hg ci -Am E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   332
  adding E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   333
  created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   334
  $ echo F > E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   335
  $ hg ci -m 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   336
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   337
  $ echo G > G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   338
  $ hg ci -Am G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   339
  adding G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   340
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   341
  $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   342
  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
   343
  (branch merge, don't forget to commit)
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   344
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   345
  $ hg ci -m H
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
  $ hg up -q 0
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   348
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   349
  $ echo I > I
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   350
  $ hg ci -Am I
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   351
  adding I
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   352
  created new head
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   353
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   354
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   355
  @  8: 'I'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   356
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   357
  | o    7: 'H'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   358
  | |\
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   359
  | | o  6: 'G'
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
  | | o  5: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   362
  | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   363
  | | o  4: 'E'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   364
  | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   365
  | o |  3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   366
  | |\|
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   367
  | o |  2: 'C'
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
  | o  1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   370
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   371
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   372
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   373
  $ cd ..
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   374
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   375
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   376
Rebase and collapse - E onto I:
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
  $ hg clone -q -u . c c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   379
  $ cd c1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   380
17005
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16714
diff changeset
   381
  $ hg rebase -s 4 --collapse # root (4) is not a merge
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   382
  merging E
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
   383
  saved backup bundle to $TESTTMP/c1/.hg/strip-backup/*-backup.hg (glob)
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   384
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   385
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   386
  @    5: 'Collapsed revision
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   387
  |\   * E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   388
  | |  * F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   389
  | |  * G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   390
  | |  * H'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   391
  | o  4: 'I'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   392
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   393
  o |    3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   394
  |\ \
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   395
  | o |  2: 'C'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   396
  | |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   397
  o /  1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   398
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   399
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   400
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   401
  $ hg manifest
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   402
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   403
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   404
  D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   405
  E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   406
  G
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   407
  I
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   408
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   409
  $ cat E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   410
  F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   411
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   412
  $ cd ..
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
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   415
Create repo d:
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
  $ hg init d
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   418
  $ cd d
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   419
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   420
  $ echo A > A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   421
  $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   422
  adding A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   423
  $ echo B > B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   424
  $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   425
  adding B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   426
  $ echo C > C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   427
  $ hg ci -Am C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   428
  adding C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   429
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   430
  $ hg up -q 1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   431
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   432
  $ echo D > D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   433
  $ hg ci -Am D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   434
  adding D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   435
  created new head
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   436
  $ hg merge
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   437
  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
   438
  (branch merge, don't forget to commit)
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   439
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   440
  $ hg ci -m E
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   441
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   442
  $ hg up -q 0
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   443
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   444
  $ echo F > F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   445
  $ hg ci -Am F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   446
  adding F
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   447
  created new head
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   448
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   449
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   450
  @  5: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   451
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   452
  | o    4: 'E'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   453
  | |\
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   454
  | | o  3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   455
  | | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   456
  | o |  2: 'C'
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
  | o  1: 'B'
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
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   461
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   462
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   463
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   464
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   465
Rebase and collapse - B onto F:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   466
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   467
  $ hg clone -q -u . d d1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   468
  $ cd d1
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   469
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   470
  $ hg rebase -s 1 --collapse
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
   471
  saved backup bundle to $TESTTMP/d1/.hg/strip-backup/*-backup.hg (glob)
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   472
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   473
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   474
  @  2: 'Collapsed revision
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   475
  |  * B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   476
  |  * C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   477
  |  * D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   478
  |  * E'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   479
  o  1: 'F'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   480
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   481
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   482
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   483
  $ hg manifest
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   484
  A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   485
  B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   486
  C
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   487
  D
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   488
  F
7278
45495d784ad6 rebase: avoid redundant merges (issue1301)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 6910
diff changeset
   489
14897
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   490
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
   491
  $ cd ..
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   492
  $ hg init e
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   493
  $ cd e
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   494
  $ echo 'a' > a
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   495
  $ 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
   496
  adding a
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   497
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   498
  $ hg branch '1'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   499
  marked working directory as branch 1
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15267
diff changeset
   500
  (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
   501
  $ echo 'b' > b
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   502
  $ 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
   503
  adding b
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   504
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   505
  $ hg branch '2'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   506
  marked working directory as branch 2
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 15267
diff changeset
   507
  (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
   508
  $ echo 'c' > c
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   509
  $ 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
   510
  adding c
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   511
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   512
  $ 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
   513
  $ echo 'd' > d
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   514
  $ 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
   515
  adding d
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   516
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   517
  $ hg tglog
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   518
  @  3: 'D'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   519
  |
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   520
  | o  2: 'C' 2
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   521
  | |
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   522
  | o  1: 'B' 1
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   523
  |/
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   524
  o  0: 'A'
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   525
  
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   526
  $ 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
   527
  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
   528
  [255]
b9daa5b7a3af rebase: block collapse with keepbranches on multiple named branches (issue2112)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 14119
diff changeset
   529
15990
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   530
  $ repeatchange() {
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   531
  >   hg checkout $1
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   532
  >   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
   533
  >   echo blah >> z
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   534
  >   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
   535
  > }
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   536
  $ 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
   537
  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
   538
  $ 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
   539
  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
   540
  created new head
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   541
  $ hg tglog
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   542
  @  5: 'E'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   543
  |
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   544
  | o  4: 'E'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   545
  |/
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   546
  o  3: 'D'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   547
  |
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   548
  | o  2: 'C' 2
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   549
  | |
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   550
  | o  1: 'B' 1
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   551
  |/
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   552
  o  0: 'A'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   553
  
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   554
  $ hg rebase -s 5 -d 4
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   555
  saved backup bundle to $TESTTMP/e/.hg/strip-backup/*-backup.hg (glob)
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   556
  $ hg tglog
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   557
  @  4: 'E'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   558
  |
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   559
  o  3: 'D'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   560
  |
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   561
  | o  2: 'C' 2
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   562
  | |
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   563
  | o  1: 'B' 1
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   564
  |/
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   565
  o  0: 'A'
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   566
  
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   567
  $ hg export tip
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   568
  # HG changeset patch
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   569
  # User user1
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   570
  # Date 0 0
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   571
  # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   572
  # Parent  41acb9dca9eb976e84cd21fcb756b4afa5a35c09
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   573
  E
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   574
  
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   575
  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
   576
  --- /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
   577
  +++ 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
   578
  @@ -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
   579
  +d
76630fbbf4fa test-rebase-collapse: Add test for rebase regression introduced in 12309c09d19a
Augie Fackler <durin42@gmail.com>
parents: 15917
diff changeset
   580
  +blah
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   581
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   582
  $ cd ..
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   583
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   584
Rebase, collapse and copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   585
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   586
  $ hg init copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   587
  $ cd copies
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   588
  $ hg unbundle "$TESTDIR/bundles/renames.hg"
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   589
  adding changesets
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   590
  adding manifests
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   591
  adding file changes
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   592
  added 4 changesets with 11 changes to 7 files (+1 heads)
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   593
  (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
   594
  $ hg up -q tip
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   595
  $ hg tglog
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   596
  @  3: 'move2'
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   597
  |
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   598
  o  2: 'move1'
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   599
  |
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   600
  | o  1: 'change'
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   601
  |/
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   602
  o  0: 'add'
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   603
  
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   604
  $ hg rebase --collapse -d 1
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   605
  merging a and d to d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   606
  merging b and e to e
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   607
  merging c and f to f
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   608
  merging e and g to g
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   609
  merging f and c to c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   610
  saved backup bundle to $TESTTMP/copies/.hg/strip-backup/*-backup.hg (glob)
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   611
  $ hg st
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   612
  $ hg st --copies --change .
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   613
  A d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   614
    a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   615
  A g
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   616
    b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   617
  R b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   618
  $ cat c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   619
  c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   620
  c
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   621
  $ cat d
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   622
  a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   623
  a
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   624
  $ cat g
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   625
  b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   626
  b
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   627
  $ 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
   628
  d (a)g (b)
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   629
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   630
Test collapsing a middle revision in-place
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   631
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   632
  $ hg tglog
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   633
  @  2: 'Collapsed revision
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   634
  |  * move1
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   635
  |  * move2'
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   636
  o  1: 'change'
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   637
  |
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   638
  o  0: 'add'
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   639
  
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   640
  $ hg rebase --collapse -r 1 -d 0
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   641
  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
   642
  (use --keep to keep original changesets)
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   643
  [255]
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   644
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   645
Test collapsing in place
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   646
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   647
  $ hg rebase --collapse -b . -d 0
16714
0a176990243c test-rebase-collapse: fix Windows path separator
Patrick Mezard <patrick@mezard.eu>
parents: 16696
diff changeset
   648
  saved backup bundle to $TESTTMP/copies/.hg/strip-backup/*-backup.hg (glob)
16696
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   649
  $ hg st --change . --copies
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   650
  M a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   651
  M c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   652
  A d
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   653
    a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   654
  A g
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   655
    b
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   656
  R b
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   657
  $ cat a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   658
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   659
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   660
  $ cat c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   661
  c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   662
  c
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   663
  $ cat d
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   664
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   665
  a
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   666
  $ cat g
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   667
  b
d1afbf03e69a rebase: allow collapsing branches in place (issue3111)
Patrick Mezard <patrick@mezard.eu>
parents: 16551
diff changeset
   668
  b
16551
ebf6d38c9063 localrepo: add setparents() to adjust dirstate copies (issue3407)
Patrick Mezard <patrick@mezard.eu>
parents: 16350
diff changeset
   669
  $ cd ..
17013
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   670
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   671
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   672
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
   673
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   674
  $ hg init f
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   675
  $ cd f
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   676
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   677
  $ echo A > A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   678
  $ hg ci -Am A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   679
  adding A
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   680
  $ echo B > B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   681
  $ hg ci -Am B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   682
  adding B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   683
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   684
  $ hg up -q 0
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   685
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   686
  $ echo C > C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   687
  $ hg ci -Am C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   688
  adding C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   689
  created new head
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   690
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   691
  $ hg tglog
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   692
  @  2: 'C'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   693
  |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   694
  | o  1: 'B'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   695
  |/
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   696
  o  0: 'A'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   697
  
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   698
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   699
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   700
  $ 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
   701
  2:c5cefa58fd557f84b72b87f970135984337acbc5 default: C
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   702
  1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   703
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   704
  $ hg strip 2
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   705
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   706
  saved backup bundle to $TESTTMP/f/.hg/strip-backup/*-backup.hg (glob)
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   707
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   708
  $ hg tglog
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   709
  o  1: 'B'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   710
  |
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   711
  @  0: 'A'
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   712
  
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   713
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   714
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   715
  $ 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
   716
  1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   717
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   718
  $ cd ..
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   719
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   720
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   721
c8eda7bbdcab strip: incrementally update the branchheads cache after a strip
Joshua Redstone <joshua.redstone@fb.com>
parents: 17005
diff changeset
   722