tests/test-rebase-scenario-global.t
author Mads Kiilerich <madski@unity3d.com>
Sun, 06 Apr 2014 13:39:51 +0200
changeset 21080 04540a8499a3
parent 21024 7731a2281cf0
child 21410 5b70ece79ea7
permissions -rw-r--r--
merge: move ancestor selection tweaking from manifestmerge to update function - passing it through calculateupdates. This will make sure manifestmerge actually use the ancestor it is given.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     2
  > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     3
  > rebase=
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     4
  > 
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
     5
  > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
     6
  > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
     7
  > 
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     8
  > [alias]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
     9
  > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    10
  > EOF
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    11
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    12
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    13
  $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    14
  $ cd a
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 15945
diff changeset
    15
  $ hg unbundle "$TESTDIR/bundles/rebase.hg"
14118
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
    16
  adding changesets
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
    17
  adding manifests
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
    18
  adding file changes
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    19
  added 8 changesets with 7 changes to 7 files (+2 heads)
14118
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
    20
  (run 'hg heads' to see heads, 'hg merge' to merge)
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
    21
  $ hg up tip
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12640
diff changeset
    22
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    23
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    24
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    25
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    26
Rebasing
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    27
D onto H - simple rebase:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    28
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    29
  $ hg clone -q -u . a a1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    30
  $ cd a1
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    31
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    32
  $ hg tglog
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    33
  @  7: 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    34
  |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    35
  | o  6: 'G'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    36
  |/|
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    37
  o |  5: 'F'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    38
  | |
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    39
  | o  4: 'E'
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    40
  |/
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    41
  | o  3: 'D'
12608
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  2: 'C'
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    44
  | |
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    45
  | o  1: 'B'
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
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    48
  
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    49
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    50
  $ hg rebase -s 3 -d 7
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
    51
  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
    52
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    53
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
    54
  o  7: 'D'
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: 16540
diff changeset
    55
  |
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
    56
  @  6: 'H'
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: 16540
diff changeset
    57
  |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    58
  | o  5: 'G'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    59
  |/|
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    60
  o |  4: 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    61
  | |
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: 16540
diff changeset
    62
  | o  3: 'E'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    63
  |/
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    64
  | o  2: 'C'
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    65
  | |
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: 16540
diff changeset
    66
  | o  1: 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    67
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    68
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    69
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    70
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    71
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    72
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    73
D onto F - intermediate point:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    74
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    75
  $ hg clone -q -u . a a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    76
  $ cd a2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    77
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
    78
  $ hg rebase -s 3 -d 5
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
    79
  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
    80
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    81
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
    82
  o  7: 'D'
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: 16540
diff changeset
    83
  |
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
    84
  | @  6: 'H'
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: 16540
diff changeset
    85
  |/
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    86
  | o  5: 'G'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    87
  |/|
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    88
  o |  4: 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    89
  | |
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: 16540
diff changeset
    90
  | o  3: 'E'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    91
  |/
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    92
  | o  2: 'C'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    93
  | |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
    94
  | o  1: 'B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    95
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    96
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    97
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
    98
  $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    99
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   100
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   101
E onto H - skip of G:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   102
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   103
  $ hg clone -q -u . a a3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   104
  $ cd a3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   105
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   106
  $ hg rebase -s 4 -d 7
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
   107
  saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   108
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   109
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   110
  o  6: 'E'
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   111
  |
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   112
  @  5: 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   113
  |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   114
  o  4: 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   115
  |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   116
  | o  3: 'D'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   117
  | |
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   118
  | o  2: 'C'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   119
  | |
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   120
  | o  1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   121
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   122
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   123
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   124
  $ cd ..
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   125
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   126
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   127
F onto E - rebase of a branching point (skip G):
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   128
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   129
  $ hg clone -q -u . a a4
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   130
  $ cd a4
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   131
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   132
  $ hg rebase -s 5 -d 4
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
   133
  saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   134
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   135
  $ hg tglog
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   136
  @  6: 'H'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   137
  |
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   138
  o  5: 'F'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   139
  |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   140
  o  4: 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   141
  |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   142
  | o  3: 'D'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   143
  | |
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   144
  | o  2: 'C'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   145
  | |
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   146
  | o  1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   147
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   148
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   149
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   150
  $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   151
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   152
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   153
G onto H - merged revision having a parent in ancestors of target:
12608
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 clone -q -u . a a5
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   156
  $ cd a5
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   157
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   158
  $ hg rebase -s 6 -d 7
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
   159
  saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob)
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   160
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   161
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   162
  o    7: 'G'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   163
  |\
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   164
  | @  6: 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   165
  | |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   166
  | o  5: 'F'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   167
  | |
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   168
  o |  4: 'E'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   169
  |/
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   170
  | o  3: 'D'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   171
  | |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   172
  | o  2: 'C'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   173
  | |
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   174
  | o  1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   175
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   176
  o  0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   177
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   178
  $ cd ..
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
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   181
F onto B - G maintains E as parent:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   182
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   183
  $ hg clone -q -u . a a6
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   184
  $ cd a6
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   185
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   186
  $ hg rebase -s 5 -d 1
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
   187
  saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   188
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   189
  $ hg tglog
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   190
  @  7: 'H'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   191
  |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   192
  | o  6: 'G'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   193
  |/|
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   194
  o |  5: 'F'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   195
  | |
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   196
  | o  4: 'E'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   197
  | |
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   198
  | | o  3: 'D'
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   199
  | | |
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   200
  +---o  2: 'C'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   201
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   202
  o |  1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   203
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   204
  o  0: 'A'
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
  $ cd ..
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
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   209
These will fail (using --source):
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   210
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   211
G onto F - rebase onto an ancestor:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   212
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   213
  $ hg clone -q -u . a a7
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   214
  $ cd a7
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   215
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   216
  $ hg rebase -s 6 -d 5
15267
3bfdfefea2fc rebase: use revset as soon as possible in internal logic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15132
diff changeset
   217
  nothing to rebase
3bfdfefea2fc rebase: use revset as soon as possible in internal logic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15132
diff changeset
   218
  [1]
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   219
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   220
F onto G - rebase onto a descendant:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   221
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   222
  $ hg rebase -s 5 -d 6
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   223
  abort: source is ancestor of destination
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   224
  [255]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   225
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   226
G onto B - merge revision with both parents not in ancestors of target:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   227
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   228
  $ hg rebase -s 6 -d 1
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   229
  abort: cannot use revision 6 as base, result would have 3 parents
12608
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
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   233
These will abort gracefully (using --base):
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   234
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   235
G onto G - rebase onto same changeset:
6906
808f03f61ebe Add rebase extension
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   236
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   237
  $ hg rebase -b 6 -d 6
20249
dc5157841361 rebase: improve error message for --base being empty or causing emptiness
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   238
  nothing to rebase - eea13746799a is both "base" and destination
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   239
  [1]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   240
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   241
G onto F - rebase onto an ancestor:
9578
341182ac95e4 rebase: return early when source is descendant of destination
Sune Foldager <cryo@cyanite.org>
parents: 8168
diff changeset
   242
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   243
  $ hg rebase -b 6 -d 5
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   244
  nothing to rebase
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   245
  [1]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   246
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   247
F onto G - rebase onto a descendant:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   248
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   249
  $ hg rebase -b 5 -d 6
20249
dc5157841361 rebase: improve error message for --base being empty or causing emptiness
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   250
  nothing to rebase - "base" 24b6387c8c8c is already an ancestor of destination eea13746799a
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   251
  [1]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
   252
15132
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   253
C onto A - rebase onto an ancestor:
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   254
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   255
  $ hg rebase -d 0 -s 2
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15270
diff changeset
   256
  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-backup.hg (glob)
15132
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   257
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   258
  o  7: 'D'
15132
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   259
  |
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   260
  o  6: 'C'
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   261
  |
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   262
  | @  5: 'H'
15132
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   263
  | |
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   264
  | | o  4: 'G'
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   265
  | |/|
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   266
  | o |  3: 'F'
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   267
  |/ /
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   268
  | o  2: 'E'
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   269
  |/
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   270
  | o  1: 'B'
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   271
  |/
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   272
  o  0: 'A'
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   273
  
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
   274
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
   275
Check rebasing public changeset
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
   276
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
   277
  $ hg pull --config phases.publish=True -q -r 6 . # update phase of 6
19059
53eadcb814fd rebase: check no-op before checking phase (issue3891)
Siddharth Agarwal <sid0@fb.com>
parents: 18644
diff changeset
   278
  $ hg rebase -d 0 -b 6
53eadcb814fd rebase: check no-op before checking phase (issue3891)
Siddharth Agarwal <sid0@fb.com>
parents: 18644
diff changeset
   279
  nothing to rebase
53eadcb814fd rebase: check no-op before checking phase (issue3891)
Siddharth Agarwal <sid0@fb.com>
parents: 18644
diff changeset
   280
  [1]
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
   281
  $ hg rebase -d 5 -b 6
15945
cd42f77d30c4 rebase: drop uppercase in abort message
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 15917
diff changeset
   282
  abort: can't rebase immutable changeset e1c4361dd923
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
   283
  (see hg help phases for details)
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
   284
  [255]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
   285
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15447
diff changeset
   286
  $ hg rebase -d 5 -b 6 --keep
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   287
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   288
Check rebasing mutable changeset
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   289
Source phase greater or equal to destination phase: new changeset get the phase of source:
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   290
  $ hg rebase -s9 -d0
16540
4fe8eb4a6e2c tests: add missing accept of native pathname separator
Mads Kiilerich <mads@kiilerich.com>
parents: 16350
diff changeset
   291
  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-backup.hg (glob)
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   292
  $ hg log --template "{phase}\n" -r 9
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   293
  draft
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   294
  $ hg rebase -s9 -d1
16540
4fe8eb4a6e2c tests: add missing accept of native pathname separator
Mads Kiilerich <mads@kiilerich.com>
parents: 16350
diff changeset
   295
  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2cb10d0cfc6c-backup.hg (glob)
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   296
  $ hg log --template "{phase}\n" -r 9
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   297
  draft
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   298
  $ hg phase --force --secret 9
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   299
  $ hg rebase -s9 -d0
16540
4fe8eb4a6e2c tests: add missing accept of native pathname separator
Mads Kiilerich <mads@kiilerich.com>
parents: 16350
diff changeset
   300
  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/c5b12b67163a-backup.hg (glob)
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   301
  $ hg log --template "{phase}\n" -r 9
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   302
  secret
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   303
  $ hg rebase -s9 -d1
16540
4fe8eb4a6e2c tests: add missing accept of native pathname separator
Mads Kiilerich <mads@kiilerich.com>
parents: 16350
diff changeset
   304
  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2a0524f868ac-backup.hg (glob)
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   305
  $ hg log --template "{phase}\n" -r 9
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   306
  secret
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   307
Source phase lower than destination phase: new changeset get the phase of destination:
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: 16540
diff changeset
   308
  $ hg rebase -s8 -d9
17029
832f106945e8 tests: add missing 'backup bundle' path glob in test-rebase-scenario-global.t
Mads Kiilerich <mads@kiilerich.com>
parents: 17005
diff changeset
   309
  saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6d4f22462821-backup.hg (glob)
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: 16540
diff changeset
   310
  $ hg log --template "{phase}\n" -r 'rev(9)'
15917
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   311
  secret
e66084ef8449 rebase: fix phases movement
Alain Leufroy <alain.leufroyATgmailMYDOTcom>
parents: 15742
diff changeset
   312
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   313
  $ cd ..
15132
81f76098211e rebase: allow rebase to ancestor (issue3010)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 14119
diff changeset
   314
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   315
Test for revset
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   316
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   317
We need a bit different graph
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   318
All destination are B
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   319
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   320
  $ hg init ah
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   321
  $ cd ah
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 15945
diff changeset
   322
  $ hg unbundle "$TESTDIR/bundles/rebase-revset.hg"
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   323
  adding changesets
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   324
  adding manifests
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   325
  adding file changes
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   326
  added 9 changesets with 9 changes to 9 files (+2 heads)
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   327
  (run 'hg heads' to see heads, 'hg merge' to merge)
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   328
  $ hg tglog
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   329
  o  8: 'I'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   330
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   331
  o  7: 'H'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   332
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   333
  o  6: 'G'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   334
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   335
  | o  5: 'F'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   336
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   337
  | o  4: 'E'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   338
  |/
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   339
  o  3: 'D'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   340
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   341
  o  2: 'C'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   342
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   343
  | o  1: 'B'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   344
  |/
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   345
  o  0: 'A'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   346
  
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   347
  $ cd ..
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   348
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   349
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   350
Simple case with keep:
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   351
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   352
Source on have two descendant heads but ask for one
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   353
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   354
  $ hg clone -q -u . ah ah1
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   355
  $ cd ah1
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   356
  $ hg rebase -r '2::8' -d 1
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   357
  abort: can't remove original changesets with unrebased descendants
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   358
  (use --keep to keep original changesets)
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   359
  [255]
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   360
  $ hg rebase -r '2::8' -d 1 --keep
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   361
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   362
  o  13: 'I'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   363
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   364
  o  12: 'H'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   365
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   366
  o  11: 'G'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   367
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   368
  o  10: 'D'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   369
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   370
  o  9: 'C'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   371
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   372
  | o  8: 'I'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   373
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   374
  | o  7: 'H'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   375
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   376
  | o  6: 'G'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   377
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   378
  | | o  5: 'F'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   379
  | | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   380
  | | o  4: 'E'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   381
  | |/
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   382
  | o  3: 'D'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   383
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   384
  | o  2: 'C'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   385
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   386
  o |  1: 'B'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   387
  |/
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   388
  o  0: 'A'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   389
  
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   390
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   391
  $ cd ..
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   392
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   393
Base on have one descendant heads we ask for but common ancestor have two
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   394
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   395
  $ hg clone -q -u . ah ah2
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   396
  $ cd ah2
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   397
  $ hg rebase -r '3::8' -d 1
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   398
  abort: can't remove original changesets with unrebased descendants
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   399
  (use --keep to keep original changesets)
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   400
  [255]
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   401
  $ hg rebase -r '3::8' -d 1 --keep
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   402
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   403
  o  12: 'I'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   404
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   405
  o  11: 'H'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   406
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   407
  o  10: 'G'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   408
  |
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: 16540
diff changeset
   409
  o  9: 'D'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   410
  |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   411
  | o  8: 'I'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   412
  | |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   413
  | o  7: 'H'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   414
  | |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   415
  | o  6: 'G'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   416
  | |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   417
  | | o  5: 'F'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   418
  | | |
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: 16540
diff changeset
   419
  | | o  4: 'E'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   420
  | |/
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: 16540
diff changeset
   421
  | o  3: 'D'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   422
  | |
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   423
  | o  2: 'C'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   424
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   425
  o |  1: 'B'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   426
  |/
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   427
  o  0: 'A'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   428
  
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   429
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   430
  $ cd ..
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   431
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   432
rebase subset
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   433
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   434
  $ hg clone -q -u . ah ah3
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   435
  $ cd ah3
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   436
  $ hg rebase -r '3::7' -d 1
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   437
  abort: can't remove original changesets with unrebased descendants
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   438
  (use --keep to keep original changesets)
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   439
  [255]
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   440
  $ hg rebase -r '3::7' -d 1 --keep
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   441
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   442
  o  11: 'H'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   443
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   444
  o  10: 'G'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   445
  |
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: 16540
diff changeset
   446
  o  9: 'D'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   447
  |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   448
  | o  8: 'I'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   449
  | |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   450
  | o  7: 'H'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   451
  | |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   452
  | o  6: 'G'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   453
  | |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   454
  | | o  5: 'F'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   455
  | | |
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: 16540
diff changeset
   456
  | | o  4: 'E'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   457
  | |/
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: 16540
diff changeset
   458
  | o  3: 'D'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   459
  | |
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   460
  | o  2: 'C'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   461
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   462
  o |  1: 'B'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   463
  |/
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   464
  o  0: 'A'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   465
  
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   466
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   467
  $ cd ..
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   468
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   469
rebase subset with multiple head
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   470
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   471
  $ hg clone -q -u . ah ah4
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   472
  $ cd ah4
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   473
  $ hg rebase -r '3::(7+5)' -d 1
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   474
  abort: can't remove original changesets with unrebased descendants
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   475
  (use --keep to keep original changesets)
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   476
  [255]
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   477
  $ hg rebase -r '3::(7+5)' -d 1 --keep
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   478
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   479
  o  13: 'H'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   480
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   481
  o  12: 'G'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   482
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   483
  | o  11: 'F'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   484
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   485
  | o  10: 'E'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   486
  |/
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: 16540
diff changeset
   487
  o  9: 'D'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   488
  |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   489
  | o  8: 'I'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   490
  | |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   491
  | o  7: 'H'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   492
  | |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   493
  | o  6: 'G'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   494
  | |
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   495
  | | o  5: 'F'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   496
  | | |
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: 16540
diff changeset
   497
  | | o  4: 'E'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   498
  | |/
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: 16540
diff changeset
   499
  | o  3: 'D'
50f434510da6 rebase: do not add second parent to rebased changeset (drop detach option) (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 16540
diff changeset
   500
  | |
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   501
  | o  2: 'C'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   502
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   503
  o |  1: 'B'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   504
  |/
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   505
  o  0: 'A'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   506
  
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   507
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   508
  $ cd ..
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   509
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   510
More advanced tests
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   511
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   512
rebase on ancestor with revset
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   513
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   514
  $ hg clone -q -u . ah ah5
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   515
  $ cd ah5
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   516
  $ hg rebase -r '6::' -d 2
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15270
diff changeset
   517
  saved backup bundle to $TESTTMP/ah5/.hg/strip-backup/3d8a618087a7-backup.hg (glob)
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   518
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   519
  o  8: 'I'
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   520
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   521
  o  7: 'H'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   522
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   523
  o  6: 'G'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   524
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   525
  | o  5: 'F'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   526
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   527
  | o  4: 'E'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   528
  | |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   529
  | o  3: 'D'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   530
  |/
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   531
  o  2: 'C'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   532
  |
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   533
  | o  1: 'B'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   534
  |/
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   535
  o  0: 'A'
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   536
  
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   537
  $ cd ..
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   538
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   539
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   540
rebase with multiple root.
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   541
We rebase E and G on B
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   542
We would expect heads are I, F if it was supported
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   543
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   544
  $ hg clone -q -u . ah ah6
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   545
  $ cd ah6
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   546
  $ hg rebase -r '(4+6)::' -d 1
18424
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   547
  saved backup bundle to $TESTTMP/ah6/.hg/strip-backup/3d8a618087a7-backup.hg (glob)
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   548
  $ hg tglog
19925
9c78ed396075 rebase: preserve working directory parent (BC)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 19059
diff changeset
   549
  o  8: 'I'
18424
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   550
  |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   551
  o  7: 'H'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   552
  |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   553
  o  6: 'G'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   554
  |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   555
  | o  5: 'F'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   556
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   557
  | o  4: 'E'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   558
  |/
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   559
  | o  3: 'D'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   560
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   561
  | o  2: 'C'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   562
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   563
  o |  1: 'B'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   564
  |/
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   565
  o  0: 'A'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   566
  
15270
6cb6064f1d50 rebase: add --rev option to rebase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15267
diff changeset
   567
  $ cd ..
18424
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   568
18644
3e92772d5383 spelling: fix some minor issues found by spell checker
Mads Kiilerich <mads@kiilerich.com>
parents: 18424
diff changeset
   569
More complex rebase with multiple roots
18424
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   570
each root have a different common ancestor with the destination and this is a detach
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   571
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   572
(setup)
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   573
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   574
  $ hg clone -q -u . a a8
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   575
  $ cd a8
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   576
  $ echo I > I
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   577
  $ hg add I
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   578
  $ hg commit -m I
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   579
  $ hg up 4
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   580
  1 files updated, 0 files merged, 3 files removed, 0 files unresolved
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   581
  $ echo I > J
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   582
  $ hg add J
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   583
  $ hg commit -m J
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   584
  created new head
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   585
  $ echo I > K
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   586
  $ hg add K
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   587
  $ hg commit -m K
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   588
  $ hg tglog
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   589
  @  10: 'K'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   590
  |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   591
  o  9: 'J'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   592
  |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   593
  | o  8: 'I'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   594
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   595
  | o  7: 'H'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   596
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   597
  +---o  6: 'G'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   598
  | |/
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   599
  | o  5: 'F'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   600
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   601
  o |  4: 'E'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   602
  |/
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   603
  | o  3: 'D'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   604
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   605
  | o  2: 'C'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   606
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   607
  | o  1: 'B'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   608
  |/
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   609
  o  0: 'A'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   610
  
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   611
(actual test)
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   612
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   613
  $ hg rebase --dest 'desc(G)' --rev 'desc(K) + desc(I)'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   614
  saved backup bundle to $TESTTMP/a8/.hg/strip-backup/23a4ace37988-backup.hg (glob)
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   615
  $ hg log --rev 'children(desc(G))'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   616
  changeset:   9:adb617877056
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   617
  parent:      6:eea13746799a
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   618
  user:        test
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   619
  date:        Thu Jan 01 00:00:00 1970 +0000
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   620
  summary:     I
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   621
  
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   622
  changeset:   10:882431a34a0e
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   623
  tag:         tip
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   624
  parent:      6:eea13746799a
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   625
  user:        test
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   626
  date:        Thu Jan 01 00:00:00 1970 +0000
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   627
  summary:     K
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   628
  
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   629
  $ hg tglog
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   630
  @  10: 'K'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   631
  |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   632
  | o  9: 'I'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   633
  |/
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   634
  | o  8: 'J'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   635
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   636
  | | o  7: 'H'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   637
  | | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   638
  o---+  6: 'G'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   639
  |/ /
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   640
  | o  5: 'F'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   641
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   642
  o |  4: 'E'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   643
  |/
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   644
  | o  3: 'D'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   645
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   646
  | o  2: 'C'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   647
  | |
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   648
  | o  1: 'B'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   649
  |/
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   650
  o  0: 'A'
100fdc84670f rebase: support multiple roots for rebaseset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17029
diff changeset
   651
  
20335
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   652
21024
7731a2281cf0 spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents: 20335
diff changeset
   653
Test that rebase is not confused by $CWD disappearing during rebase (issue 4121)
20335
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   654
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   655
  $ cd ..
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   656
  $ hg init cwd-vanish
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   657
  $ cd cwd-vanish
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   658
  $ touch initial-file
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   659
  $ hg add initial-file
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   660
  $ hg commit -m 'initial commit'
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   661
  $ touch dest-file
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   662
  $ hg add dest-file
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   663
  $ hg commit -m 'dest commit'
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   664
  $ hg up 0
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   665
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   666
  $ touch other-file
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   667
  $ hg add other-file
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   668
  $ hg commit -m 'first source commit'
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   669
  created new head
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   670
  $ mkdir subdir
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   671
  $ cd subdir
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   672
  $ touch subfile
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   673
  $ hg add subfile
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   674
  $ hg commit -m 'second source with subdir'
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   675
  $ hg rebase -b . -d 1 --traceback
e40520642e64 rebase: do not crash in panic when cwd disapear in the process (issue4121)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 20249
diff changeset
   676
  saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-backup.hg (glob)