tests/test-rebase-named-branches.t
author Simon Sapin <simon.sapin@octobus.net>
Fri, 10 Sep 2021 09:53:09 +0200
changeset 47955 e834b79def74
parent 46632 9989a276712f
permissions -rw-r--r--
rust: Switch to the memmap2-rs crate https://github.com/RazrFalcon/memmap2-rs This is a fork of the original memmap crate which appears to be unmaintained: https://github.com/danburkert/memmap-rs/issues/90 This fork is the most popular according to https://crates.io/keywords/mmap Differential Revision: https://phab.mercurial-scm.org/D11397
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
     2
  > [extensions]
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
     3
  > rebase=
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
     4
  > 
15742
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     5
  > [phases]
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     6
  > publish=False
65df60a3f96b phases: prevent rebase to rebase immutable changeset.
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15615
diff changeset
     7
  > 
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
     8
  > [alias]
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
     9
  > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n"
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    10
  > EOF
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    11
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    12
  $ hg init a
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    13
  $ cd a
16350
4f795f5fbb0b tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents: 15801
diff changeset
    14
  $ 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: 13733
diff changeset
    15
  adding changesets
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
diff changeset
    16
  adding manifests
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
diff changeset
    17
  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
    18
  added 8 changesets with 7 changes to 7 files (+2 heads)
39480
89630d0b3e23 phase: report number of non-public changeset alongside the new range
Boris Feld <boris.feld@octobus.net>
parents: 35393
diff changeset
    19
  new changesets cd010b8cd998:02de42196ebe (8 drafts)
14118
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
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: 13733
diff changeset
    21
  $ hg up tip
7fd8e597f99c tests: introduce a rebase bundle to use with rebase tests
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 13733
diff changeset
    22
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    23
  $ cd ..
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    24
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    25
  $ hg clone -q -u . a a1
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    26
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    27
  $ cd a1
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    28
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    29
  $ hg update 3
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    30
  3 files updated, 0 files merged, 2 files removed, 0 files unresolved
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    31
  $ hg branch dev-one
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    32
  marked working directory as branch dev-one
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    33
  (branches are permanent and global, did you want a bookmark?)
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    34
  $ hg ci -m 'dev-one named branch'
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    35
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    36
  $ hg update 7
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    37
  2 files updated, 0 files merged, 3 files removed, 0 files unresolved
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    38
  $ hg branch dev-two
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    39
  marked working directory as branch dev-two
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    40
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    41
  $ echo x > x
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    42
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    43
  $ hg add x
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
    44
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    45
  $ hg ci -m 'dev-two named branch'
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    46
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    47
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    48
  @  9: cb039b7cae8e 'dev-two named branch' dev-two
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    49
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    50
  | o  8: 643fc9128048 'dev-one named branch' dev-one
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    51
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    52
  o |  7: 02de42196ebe 'H'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    53
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    54
  +---o  6: eea13746799a 'G'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    55
  | | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    56
  o | |  5: 24b6387c8c8c 'F'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    57
  | | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    58
  +---o  4: 9520eea781bc 'E'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    59
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    60
  | o  3: 32af7686d403 'D'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    61
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    62
  | o  2: 5fddd98957c8 'C'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    63
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    64
  | o  1: 42ccdea3bb16 'B'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    65
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    66
  o  0: cd010b8cd998 'A'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    67
  
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    68
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    69
Branch name containing a dash (issue3181)
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    70
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    71
  $ hg rebase -b dev-two -d dev-one --keepbranches
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
    72
  rebasing 5:24b6387c8c8c "F"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
    73
  rebasing 6:eea13746799a "G"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
    74
  rebasing 7:02de42196ebe "H"
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44923
diff changeset
    75
  rebasing 9:cb039b7cae8e tip "dev-two named branch"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
    76
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/24b6387c8c8c-24cb8001-rebase.hg
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    77
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    78
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    79
  @  9: 9e70cd31750f 'dev-two named branch' dev-two
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    80
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    81
  o  8: 31d0e4ba75e6 'H'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    82
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    83
  | o  7: 4b988a958030 'G'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    84
  |/|
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    85
  o |  6: 24de4aff8e28 'F'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    86
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    87
  o |  5: 643fc9128048 'dev-one named branch' dev-one
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    88
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    89
  | o  4: 9520eea781bc 'E'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    90
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    91
  o |  3: 32af7686d403 'D'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    92
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    93
  o |  2: 5fddd98957c8 'C'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    94
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    95
  o |  1: 42ccdea3bb16 'B'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    96
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
    97
  o  0: cd010b8cd998 'A'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    98
  
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
    99
  $ hg rebase -s dev-one -d 0 --keepbranches
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   100
  rebasing 5:643fc9128048 "dev-one named branch"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   101
  rebasing 6:24de4aff8e28 "F"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   102
  rebasing 7:4b988a958030 "G"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   103
  rebasing 8:31d0e4ba75e6 "H"
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44923
diff changeset
   104
  rebasing 9:9e70cd31750f tip "dev-two named branch"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   105
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-c4ee9ef5-rebase.hg
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   106
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   107
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   108
  @  9: 59c2e59309fe 'dev-two named branch' dev-two
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   109
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   110
  o  8: 904590360559 'H'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   111
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   112
  | o  7: 1a1e6f72ec38 'G'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   113
  |/|
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   114
  o |  6: 42aa3cf0fa7a 'F'
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   115
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   116
  o |  5: bc8139ee757c 'dev-one named branch' dev-one
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   117
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   118
  | o  4: 9520eea781bc 'E'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   119
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   120
  | o  3: 32af7686d403 'D'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   121
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   122
  | o  2: 5fddd98957c8 'C'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   123
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   124
  | o  1: 42ccdea3bb16 'B'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   125
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   126
  o  0: cd010b8cd998 'A'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   127
  
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   128
  $ hg update 3
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   129
  3 files updated, 0 files merged, 3 files removed, 0 files unresolved
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   130
  $ hg branch -f dev-one
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   131
  marked working directory as branch dev-one
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   132
  $ hg ci -m 'dev-one named branch'
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   133
  created new head
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   134
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   135
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   136
  @  10: 643fc9128048 'dev-one named branch' dev-one
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   137
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   138
  | o  9: 59c2e59309fe 'dev-two named branch' dev-two
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   139
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   140
  | o  8: 904590360559 'H'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   141
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   142
  | | o  7: 1a1e6f72ec38 'G'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   143
  | |/|
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   144
  | o |  6: 42aa3cf0fa7a 'F'
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   145
  | | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   146
  | o |  5: bc8139ee757c 'dev-one named branch' dev-one
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   147
  | | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   148
  | | o  4: 9520eea781bc 'E'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   149
  | |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   150
  o |  3: 32af7686d403 'D'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   151
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   152
  o |  2: 5fddd98957c8 'C'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   153
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   154
  o |  1: 42ccdea3bb16 'B'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   155
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   156
  o  0: cd010b8cd998 'A'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   157
  
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   158
  $ hg rebase -b 'max(branch("dev-two"))' -d dev-one --keepbranches
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   159
  rebasing 5:bc8139ee757c "dev-one named branch"
40865
4edd427f34c1 rebase: clarify that commits that become empty are skipped
Martin von Zweigbergk <martinvonz@google.com>
parents: 40864
diff changeset
   160
  note: not rebasing 5:bc8139ee757c "dev-one named branch", its destination already has all its changes
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   161
  rebasing 6:42aa3cf0fa7a "F"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   162
  rebasing 7:1a1e6f72ec38 "G"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   163
  rebasing 8:904590360559 "H"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   164
  rebasing 9:59c2e59309fe "dev-two named branch"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   165
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/bc8139ee757c-f11c1080-rebase.hg
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   166
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   167
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   168
  o  9: 71325f8bc082 'dev-two named branch' dev-two
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   169
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   170
  o  8: 12b2bc666e20 'H'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   171
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   172
  | o  7: 549f007a9f5f 'G'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   173
  |/|
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   174
  o |  6: 679f28760620 'F'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   175
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   176
  @ |  5: 643fc9128048 'dev-one named branch' dev-one
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   177
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   178
  | o  4: 9520eea781bc 'E'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   179
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   180
  o |  3: 32af7686d403 'D'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   181
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   182
  o |  2: 5fddd98957c8 'C'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   183
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   184
  o |  1: 42ccdea3bb16 'B'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   185
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   186
  o  0: cd010b8cd998 'A'
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   187
  
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   188
  $ hg rebase -s 'max(branch("dev-one"))' -d 0 --keepbranches
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   189
  rebasing 5:643fc9128048 "dev-one named branch"
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   190
  rebasing 6:679f28760620 "F"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   191
  rebasing 7:549f007a9f5f "G"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   192
  rebasing 8:12b2bc666e20 "H"
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44923
diff changeset
   193
  rebasing 9:71325f8bc082 tip "dev-two named branch"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   194
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/643fc9128048-6cdd1a52-rebase.hg
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   195
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   196
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   197
  o  9: 3944801ae4ea 'dev-two named branch' dev-two
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   198
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   199
  o  8: 8e279d293175 'H'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   200
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   201
  | o  7: aeefee77ab01 'G'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   202
  |/|
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   203
  o |  6: e908b85f3729 'F'
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   204
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   205
  @ |  5: bc8139ee757c 'dev-one named branch' dev-one
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   206
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   207
  | o  4: 9520eea781bc 'E'
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   208
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   209
  | o  3: 32af7686d403 'D'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   210
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   211
  | o  2: 5fddd98957c8 'C'
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   212
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   213
  | o  1: 42ccdea3bb16 'B'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   214
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   215
  o  0: cd010b8cd998 'A'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   216
  
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   217
  $ hg up -r 0 > /dev/null
14120
d7f80dbbaf49 tests: simplify test-rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14119
diff changeset
   218
15800
e4fc0f0b4f7e rebase: reinstate old-style rev spec support for the source and base (issue3181)
Steven Brown <StevenGBrown@gmail.com>
parents: 15615
diff changeset
   219
Rebasing descendant onto ancestor across different named branches
14120
d7f80dbbaf49 tests: simplify test-rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14119
diff changeset
   220
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   221
  $ hg rebase -s 1 -d 9 --keepbranches
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   222
  rebasing 1:42ccdea3bb16 "B"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   223
  rebasing 2:5fddd98957c8 "C"
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   224
  rebasing 3:32af7686d403 "D"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   225
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/42ccdea3bb16-3cb021d3-rebase.hg
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   226
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   227
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   228
  o  9: e9f862ce8bad 'D'
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   229
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   230
  o  8: a0d543090fa4 'C'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   231
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   232
  o  7: 3bdb949809d9 'B'
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   233
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   234
  o  6: 3944801ae4ea 'dev-two named branch' dev-two
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   235
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   236
  o  5: 8e279d293175 'H'
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   237
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   238
  | o  4: aeefee77ab01 'G'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   239
  |/|
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   240
  o |  3: e908b85f3729 'F'
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   241
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   242
  o |  2: bc8139ee757c 'dev-one named branch' dev-one
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   243
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   244
  | o  1: 9520eea781bc 'E'
14119
624e5ce615ec tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14118
diff changeset
   245
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   246
  @  0: cd010b8cd998 'A'
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   247
  
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   248
  $ hg rebase -s 5 -d 6
34006
32528419db64 rebase: sort destmap topologically
Jun Wu <quark@fb.com>
parents: 33332
diff changeset
   249
  abort: source and destination form a cycle
46632
9989a276712f errors: use more specific errors in rebase extension
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
   250
  [10]
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   251
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   252
  $ hg rebase -s 6 -d 5
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   253
  rebasing 6:3944801ae4ea "dev-two named branch"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   254
  rebasing 7:3bdb949809d9 "B"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   255
  rebasing 8:a0d543090fa4 "C"
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44923
diff changeset
   256
  rebasing 9:e9f862ce8bad tip "D"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   257
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/3944801ae4ea-fb46ed74-rebase.hg
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   258
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   259
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   260
  o  9: e522577ccdbd 'D'
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   261
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   262
  o  8: 810110211f50 'C'
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   263
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   264
  o  7: 160b0930ccc6 'B'
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   265
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   266
  o  6: c57724c84928 'dev-two named branch'
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   267
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   268
  o  5: 8e279d293175 'H'
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   269
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   270
  | o  4: aeefee77ab01 'G'
14124
81ecc951f57b tests: move rebase-keep-branch into rebase-named-branches
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 14123
diff changeset
   271
  |/|
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   272
  o |  3: e908b85f3729 'F'
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   273
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   274
  o |  2: bc8139ee757c 'dev-one named branch' dev-one
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   275
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   276
  | o  1: 9520eea781bc 'E'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   277
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   278
  @  0: cd010b8cd998 'A'
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   279
  
21027
25ee5dbebc6b rebase: tell when reopening a closed branch head
Mads Kiilerich <madski@unity3d.com>
parents: 20251
diff changeset
   280
25ee5dbebc6b rebase: tell when reopening a closed branch head
Mads Kiilerich <madski@unity3d.com>
parents: 20251
diff changeset
   281
Reopen branch by rebase
25ee5dbebc6b rebase: tell when reopening a closed branch head
Mads Kiilerich <madski@unity3d.com>
parents: 20251
diff changeset
   282
25ee5dbebc6b rebase: tell when reopening a closed branch head
Mads Kiilerich <madski@unity3d.com>
parents: 20251
diff changeset
   283
  $ hg up -qr3
25ee5dbebc6b rebase: tell when reopening a closed branch head
Mads Kiilerich <madski@unity3d.com>
parents: 20251
diff changeset
   284
  $ hg branch -q b
25ee5dbebc6b rebase: tell when reopening a closed branch head
Mads Kiilerich <madski@unity3d.com>
parents: 20251
diff changeset
   285
  $ hg ci -m 'create b'
25ee5dbebc6b rebase: tell when reopening a closed branch head
Mads Kiilerich <madski@unity3d.com>
parents: 20251
diff changeset
   286
  $ hg ci -m 'close b' --close
25ee5dbebc6b rebase: tell when reopening a closed branch head
Mads Kiilerich <madski@unity3d.com>
parents: 20251
diff changeset
   287
  $ hg rebase -b 8 -d b
26360
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   288
  reopening closed branch head 2b586e70108d
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   289
  rebasing 5:8e279d293175 "H"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   290
  rebasing 6:c57724c84928 "dev-two named branch"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   291
  rebasing 7:160b0930ccc6 "B"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   292
  rebasing 8:810110211f50 "C"
b2415e94b2f5 rebase: avoid losing branch commits with --keepbranch (issue4835)
timeless@mozdev.org
parents: 25295
diff changeset
   293
  rebasing 9:e522577ccdbd "D"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   294
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/8e279d293175-b023e27c-rebase.hg
21027
25ee5dbebc6b rebase: tell when reopening a closed branch head
Mads Kiilerich <madski@unity3d.com>
parents: 20251
diff changeset
   295
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   296
  $ hg log -G -Tcompact
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   297
  o  11[tip]   be1dea60f2a6   2011-04-30 15:24 +0200   nicdumz
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   298
  |    D
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   299
  |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   300
  o  10   ac34ce92632a   2011-04-30 15:24 +0200   nicdumz
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   301
  |    C
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   302
  |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   303
  o  9   7bd665b6ce12   2011-04-30 15:24 +0200   nicdumz
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   304
  |    B
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   305
  |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   306
  o  8   58e7c36e77f7   1970-01-01 00:00 +0000   test
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   307
  |    dev-two named branch
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   308
  |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   309
  o  7   8e5a320651f3   2011-04-30 15:24 +0200   nicdumz
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   310
  |    H
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   311
  |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   312
  @  6   2b586e70108d   1970-01-01 00:00 +0000   test
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   313
  |    close b
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   314
  |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   315
  o  5:3   3f9d5df8a707   1970-01-01 00:00 +0000   test
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   316
  |    create b
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   317
  |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   318
  | o  4:3,1   aeefee77ab01   2011-04-30 15:24 +0200   nicdumz
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   319
  |/|    G
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   320
  | |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   321
  o |  3   e908b85f3729   2011-04-30 15:24 +0200   nicdumz
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   322
  | |    F
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   323
  | |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   324
  o |  2:0   bc8139ee757c   1970-01-01 00:00 +0000   test
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   325
  | |    dev-one named branch
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   326
  | |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   327
  | o  1   9520eea781bc   2011-04-30 15:24 +0200   nicdumz
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   328
  |/     E
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   329
  |
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   330
  o  0   cd010b8cd998   2011-04-30 15:24 +0200   nicdumz
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   331
       A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   332
  
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   333
  $ echo A-mod > A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   334
  $ hg diff
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   335
  diff -r 2b586e70108d A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   336
  --- a/A	Thu Jan 01 00:00:00 1970 +0000
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   337
  +++ b/A	Thu Jan 01 00:00:00 1970 +0000
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   338
  @@ -1,1 +1,1 @@
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   339
  -A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   340
  +A-mod
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   341
44923
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   342
--dry-run doesn't affect a dirty working directory that is unrelated to the
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   343
source or destination.
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   344
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   345
  $ hg rebase -s tip -d 4 --dry-run
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   346
  starting dry-run rebase; repository will not be changed
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44923
diff changeset
   347
  rebasing 11:be1dea60f2a6 tip "D"
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   348
  dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   349
  $ hg diff
44923
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   350
  diff -r 2b586e70108d A
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   351
  --- a/A	Thu Jan 01 00:00:00 1970 +0000
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   352
  +++ b/A	Thu Jan 01 00:00:00 1970 +0000
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   353
  @@ -1,1 +1,1 @@
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   354
  -A
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   355
  +A-mod
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   356
44923
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   357
Bailing out on --confirm doesn't affect a dirty working directory that is
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   358
unrelated to the source or destination.
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   359
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   360
  $ echo A-mod > A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   361
  $ echo n | hg rebase -s tip -d 4 --confirm --config ui.interactive=True
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   362
  starting in-memory rebase
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44923
diff changeset
   363
  rebasing 11:be1dea60f2a6 tip "D"
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   364
  rebase completed successfully
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   365
  apply changes (yn)? n
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   366
  $ hg diff
44923
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   367
  diff -r 2b586e70108d A
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   368
  --- a/A	Thu Jan 01 00:00:00 1970 +0000
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   369
  +++ b/A	Thu Jan 01 00:00:00 1970 +0000
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   370
  @@ -1,1 +1,1 @@
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   371
  -A
1f114c797961 rebase: avoid clobbering wdir() with --dry-run or --confirm (issue6291)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44922
diff changeset
   372
  +A-mod
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   373
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   374
  $ echo A-mod > A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   375
  $ hg rebase -s tip -d 4 --confirm
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   376
  starting in-memory rebase
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44923
diff changeset
   377
  rebasing 11:be1dea60f2a6 tip "D"
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   378
  rebase completed successfully
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   379
  apply changes (yn)? y
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   380
  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/be1dea60f2a6-ca6d2dac-rebase.hg
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   381
  $ hg diff
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   382
  diff -r 2b586e70108d A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   383
  --- a/A	Thu Jan 01 00:00:00 1970 +0000
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   384
  +++ b/A	Thu Jan 01 00:00:00 1970 +0000
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   385
  @@ -1,1 +1,1 @@
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   386
  -A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   387
  +A-mod
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   388
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   389
Attempting to rebase the parent of a dirty working directory will abort, without
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   390
mangling the working directory...
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   391
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   392
  $ hg rebase -s 5 -d 4 --dry-run
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   393
  starting dry-run rebase; repository will not be changed
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   394
  abort: uncommitted changes
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   395
  [20]
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   396
  $ hg diff
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   397
  diff -r 2b586e70108d A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   398
  --- a/A	Thu Jan 01 00:00:00 1970 +0000
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   399
  +++ b/A	Thu Jan 01 00:00:00 1970 +0000
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   400
  @@ -1,1 +1,1 @@
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   401
  -A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   402
  +A-mod
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   403
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   404
... ditto for --confirm
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   405
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   406
  $ echo n | hg rebase -s 5 -d 4 --confirm --config ui.interactive=True
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   407
  starting in-memory rebase
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   408
  abort: uncommitted changes
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   409
  [20]
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   410
  $ hg diff
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   411
  diff -r 2b586e70108d A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   412
  --- a/A	Thu Jan 01 00:00:00 1970 +0000
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   413
  +++ b/A	Thu Jan 01 00:00:00 1970 +0000
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   414
  @@ -1,1 +1,1 @@
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   415
  -A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   416
  +A-mod
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   417
  $ hg rebase -s 5 -d 4 --confirm
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   418
  starting in-memory rebase
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   419
  abort: uncommitted changes
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   420
  [20]
44922
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   421
  $ hg diff
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   422
  diff -r 2b586e70108d A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   423
  --- a/A	Thu Jan 01 00:00:00 1970 +0000
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   424
  +++ b/A	Thu Jan 01 00:00:00 1970 +0000
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   425
  @@ -1,1 +1,1 @@
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   426
  -A
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   427
  +A-mod
9f3aa0d3de41 tests: show that rebase --dry-run and --confirm wipeout uncommitted changes
Matt Harbison <matt_harbison@yahoo.com>
parents: 43114
diff changeset
   428
13733
4e2690a764c1 rebase: allow for rebasing descendants onto ancestors on different named branches
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
   429
  $ cd ..
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   430
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   431
Rebase to other head on branch
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   432
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   433
Set up a case:
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   434
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   435
  $ hg init case1
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   436
  $ cd case1
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   437
  $ touch f
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   438
  $ hg ci -qAm0
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   439
  $ hg branch -q b
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   440
  $ echo >> f
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   441
  $ hg ci -qAm 'b1'
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   442
  $ hg up -qr -2
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   443
  $ hg branch -qf b
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   444
  $ hg ci -qm 'b2'
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   445
  $ hg up -qr -3
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   446
  $ hg branch -q c
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   447
  $ hg ci -m 'c1'
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   448
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   449
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   450
  @  3: c062e3ecd6c6 'c1' c
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   451
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   452
  | o  2: 792845bb77ee 'b2' b
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   453
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   454
  | o  1: 40039acb7ca5 'b1' b
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   455
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   456
  o  0: d681519c3ea7 '0'
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   457
  
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   458
  $ hg clone -q . ../case2
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   459
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   460
rebase 'b2' to another lower branch head
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   461
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   462
  $ hg up -qr 2
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   463
  $ hg rebase
28189
fac3a24be50e rebase: choose default destination the same way as 'hg merge' (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26360
diff changeset
   464
  rebasing 2:792845bb77ee "b2"
40865
4edd427f34c1 rebase: clarify that commits that become empty are skipped
Martin von Zweigbergk <martinvonz@google.com>
parents: 40864
diff changeset
   465
  note: not rebasing 2:792845bb77ee "b2", its destination already has all its changes
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   466
  saved backup bundle to $TESTTMP/case1/.hg/strip-backup/792845bb77ee-627120ee-rebase.hg
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   467
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   468
  o  2: c062e3ecd6c6 'c1' c
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   469
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   470
  | @  1: 40039acb7ca5 'b1' b
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   471
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   472
  o  0: d681519c3ea7 '0'
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   473
  
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   474
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   475
rebase 'b1' on top of the tip of the branch ('b2') - ignoring the tip branch ('c1')
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   476
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   477
  $ cd ../case2
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   478
  $ hg up -qr 1
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   479
  $ hg rebase
23517
4f18e80d9c30 rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents: 23516
diff changeset
   480
  rebasing 1:40039acb7ca5 "b1"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   481
  saved backup bundle to $TESTTMP/case2/.hg/strip-backup/40039acb7ca5-342b72d1-rebase.hg
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   482
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   483
  @  3: 76abc1c6f8c7 'b1' b
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   484
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   485
  | o  2: c062e3ecd6c6 'c1' c
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   486
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   487
  o |  1: 792845bb77ee 'b2' b
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   488
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   489
  o  0: d681519c3ea7 '0'
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   490
  
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   491
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   492
rebase 'c1' to the branch head 'c2' that is closed
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   493
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   494
  $ hg branch -qf c
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   495
  $ hg ci -qm 'c2 closed' --close
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   496
  $ hg up -qr 2
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   497
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   498
  _  4: 8427af5d86f2 'c2 closed' c
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   499
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   500
  o  3: 76abc1c6f8c7 'b1' b
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   501
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   502
  | @  2: c062e3ecd6c6 'c1' c
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   503
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   504
  o |  1: 792845bb77ee 'b2' b
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   505
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   506
  o  0: d681519c3ea7 '0'
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   507
  
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   508
  $ hg rebase
28189
fac3a24be50e rebase: choose default destination the same way as 'hg merge' (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26360
diff changeset
   509
  abort: branch 'c' has one head - please rebase to an explicit rev
43114
8197b395710e destutil: provide hint on rebase+merge for how to specify destination/rev
Kyle Lippincott <spectral@google.com>
parents: 40865
diff changeset
   510
  (run 'hg heads' to see all heads, specify destination with -d)
28189
fac3a24be50e rebase: choose default destination the same way as 'hg merge' (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26360
diff changeset
   511
  [255]
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   512
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   513
  _  4: 8427af5d86f2 'c2 closed' c
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   514
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   515
  o  3: 76abc1c6f8c7 'b1' b
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   516
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   517
  | @  2: c062e3ecd6c6 'c1' c
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   518
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   519
  o |  1: 792845bb77ee 'b2' b
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   520
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   521
  o  0: d681519c3ea7 '0'
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   522
  
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   523
31380
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   524
  $ hg up -cr 1
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   525
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   526
  $ hg branch x
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   527
  marked working directory as branch x
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   528
  $ hg rebase -r 3:: -d .
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   529
  rebasing 3:76abc1c6f8c7 "b1"
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44923
diff changeset
   530
  rebasing 4:8427af5d86f2 tip "c2 closed"
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 44923
diff changeset
   531
  note: not rebasing 4:8427af5d86f2 tip "c2 closed", its destination already has all its changes
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35385
diff changeset
   532
  saved backup bundle to $TESTTMP/case2/.hg/strip-backup/76abc1c6f8c7-cd698d13-rebase.hg
31380
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   533
  $ hg tglog
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   534
  o  3: 117b0ed08075 'b1' x
31380
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   535
  |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   536
  | o  2: c062e3ecd6c6 'c1' c
31380
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   537
  | |
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   538
  @ |  1: 792845bb77ee 'b2' b
31380
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   539
  |/
35385
469b06b4c3ca tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents: 34661
diff changeset
   540
  o  0: d681519c3ea7 '0'
31380
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   541
  
65d93d712777 rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
Mads Kiilerich <mads@kiilerich.com>
parents: 28189
diff changeset
   542
20251
7876013de139 tests: introduce test for rebasing on named branches with closed heads
Mads Kiilerich <madski@unity3d.com>
parents: 20117
diff changeset
   543
  $ cd ..