tests/test-histedit-base.t
author Martin von Zweigbergk <martinvonz@google.com>
Wed, 30 Jan 2019 12:05:43 -0800
changeset 41510 faa49a5914bb
parent 39480 89630d0b3e23
permissions -rw-r--r--
merge: respect ui.relative-paths We print file paths in a lot of places in this code and I've probably missed a few places. We can fix them as we discover them (I'm also happy to fix anything reviewers notice, of course). Differential Revision: https://phab.mercurial-scm.org/D5747
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27085
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
     1
  $ . "$TESTDIR/histedit-helpers.sh"
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
     2
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
     3
  $ cat >> $HGRCPATH <<EOF
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
     4
  > [alias]
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
     5
  > tglog = log -G --template "{rev}:{node}:{phase} '{desc}'\n"
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
     6
  > [extensions]
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
     7
  > histedit=
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
     8
  > EOF
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
     9
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    10
Create repo a:
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    11
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    12
  $ hg init a
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    13
  $ cd a
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    14
  $ hg unbundle "$TESTDIR/bundles/rebase.hg"
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    15
  adding changesets
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    16
  adding manifests
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    17
  adding file changes
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
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: 34661
diff changeset
    19
  new changesets cd010b8cd998:02de42196ebe (8 drafts)
27085
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    20
  (run 'hg heads' to see heads, 'hg merge' to merge)
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    21
  $ hg up tip
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    22
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    23
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    24
  $ hg tglog
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    25
  @  7:02de42196ebee42ef284b6780a87cdc96e8eaab6:draft 'H'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    26
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    27
  | o  6:eea13746799a9e0bfd88f29d3c2e9dc9389f524f:draft 'G'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    28
  |/|
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    29
  o |  5:24b6387c8c8cae37178880f3fa95ded3cb1cf785:draft 'F'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    30
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    31
  | o  4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba:draft 'E'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    32
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    33
  | o  3:32af7686d403cf45b5d95f2d70cebea587ac806a:draft 'D'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    34
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    35
  | o  2:5fddd98957c8a54a4d436dfe1da9d87f21a1b97b:draft 'C'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    36
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    37
  | o  1:42ccdea3bb16d28e1848c95fe2e44c000f3f21b1:draft 'B'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    38
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    39
  o  0:cd010b8cd998f3981a5a8115f94f8da4ab506089:draft 'A'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    40
  
29069
e2a1648a6ce7 tests: test histedit base command plan help
timeless <timeless@mozdev.org>
parents: 27955
diff changeset
    41
Verify that implicit base command and help are listed
27085
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    42
29069
e2a1648a6ce7 tests: test histedit base command plan help
timeless <timeless@mozdev.org>
parents: 27955
diff changeset
    43
  $ HGEDITOR=cat hg histedit |grep base
e2a1648a6ce7 tests: test histedit base command plan help
timeless <timeless@mozdev.org>
parents: 27955
diff changeset
    44
  #  b, base = checkout changeset and apply further changesets from there
27085
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    45
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    46
Go to D
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    47
  $ hg update 3
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    48
  3 files updated, 0 files merged, 2 files removed, 0 files unresolved
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    49
edit the history to rebase B onto H
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    50
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    51
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    52
Rebase B onto H
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    53
  $ hg histedit 1 --commands - 2>&1 << EOF | fixbundle
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    54
  > base 02de42196ebe
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    55
  > pick 42ccdea3bb16 B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    56
  > pick 5fddd98957c8 C
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    57
  > pick 32af7686d403 D
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    58
  > EOF
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    59
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    60
  $ hg tglog
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    61
  @  7:0937e82309df47d14176ee15e45dbec5fbdef340:draft 'D'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    62
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    63
  o  6:f778d1cbddac4ab679d9983c9bb92e4c5e09e7fa:draft 'C'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    64
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    65
  o  5:3d41b7cc708545206213a842f96d812d2e73d818:draft 'B'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    66
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    67
  o  4:02de42196ebee42ef284b6780a87cdc96e8eaab6:draft 'H'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    68
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    69
  | o  3:eea13746799a9e0bfd88f29d3c2e9dc9389f524f:draft 'G'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    70
  |/|
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    71
  o |  2:24b6387c8c8cae37178880f3fa95ded3cb1cf785:draft 'F'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    72
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    73
  | o  1:9520eea781bcca16c1e15acc0ba14335a0e8e5ba:draft 'E'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    74
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    75
  o  0:cd010b8cd998f3981a5a8115f94f8da4ab506089:draft 'A'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    76
  
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    77
Rebase back and drop something
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    78
  $ hg histedit 5 --commands - 2>&1 << EOF | fixbundle
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    79
  > base cd010b8cd998
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    80
  > pick 3d41b7cc7085 B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    81
  > drop f778d1cbddac C
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    82
  > pick 0937e82309df D
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    83
  > EOF
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    84
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    85
  $ hg tglog
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    86
  @  6:476cc3e4168da2d036b141f7f7dcff7f8e3fe846:draft 'D'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    87
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    88
  o  5:d273e35dcdf21a7eb305192ef2e362887cd0a6f8:draft 'B'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    89
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    90
  | o  4:02de42196ebee42ef284b6780a87cdc96e8eaab6:draft 'H'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    91
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    92
  | | o  3:eea13746799a9e0bfd88f29d3c2e9dc9389f524f:draft 'G'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    93
  | |/|
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    94
  | o |  2:24b6387c8c8cae37178880f3fa95ded3cb1cf785:draft 'F'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    95
  |/ /
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    96
  | o  1:9520eea781bcca16c1e15acc0ba14335a0e8e5ba:draft 'E'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    97
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    98
  o  0:cd010b8cd998f3981a5a8115f94f8da4ab506089:draft 'A'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
    99
  
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   100
Split stack
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   101
  $ hg histedit 5 --commands - 2>&1 << EOF | fixbundle
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   102
  > base cd010b8cd998
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   103
  > pick d273e35dcdf2 B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   104
  > base cd010b8cd998
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   105
  > pick 476cc3e4168d D
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   106
  > EOF
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   107
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   108
  $ hg tglog
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   109
  @  6:d7a6f907a822c4ce6f15662ae45a42aa46d3818a:draft 'D'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   110
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   111
  | o  5:d273e35dcdf21a7eb305192ef2e362887cd0a6f8:draft 'B'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   112
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   113
  | o  4:02de42196ebee42ef284b6780a87cdc96e8eaab6:draft 'H'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   114
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   115
  | | o  3:eea13746799a9e0bfd88f29d3c2e9dc9389f524f:draft 'G'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   116
  | |/|
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   117
  | o |  2:24b6387c8c8cae37178880f3fa95ded3cb1cf785:draft 'F'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   118
  |/ /
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   119
  | o  1:9520eea781bcca16c1e15acc0ba14335a0e8e5ba:draft 'E'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   120
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   121
  o  0:cd010b8cd998f3981a5a8115f94f8da4ab506089:draft 'A'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   122
  
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   123
Abort
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   124
  $ echo x > B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   125
  $ hg add B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   126
  $ hg commit -m "X"
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   127
  $ hg tglog
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   128
  @  7:591369deedfdcbf57471e894999a70d7f676186d:draft 'X'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   129
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   130
  o  6:d7a6f907a822c4ce6f15662ae45a42aa46d3818a:draft 'D'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   131
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   132
  | o  5:d273e35dcdf21a7eb305192ef2e362887cd0a6f8:draft 'B'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   133
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   134
  | o  4:02de42196ebee42ef284b6780a87cdc96e8eaab6:draft 'H'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   135
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   136
  | | o  3:eea13746799a9e0bfd88f29d3c2e9dc9389f524f:draft 'G'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   137
  | |/|
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   138
  | o |  2:24b6387c8c8cae37178880f3fa95ded3cb1cf785:draft 'F'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   139
  |/ /
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   140
  | o  1:9520eea781bcca16c1e15acc0ba14335a0e8e5ba:draft 'E'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   141
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   142
  o  0:cd010b8cd998f3981a5a8115f94f8da4ab506089:draft 'A'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   143
  
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   144
  $ hg histedit 6 --commands - 2>&1 << EOF | fixbundle
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   145
  > base d273e35dcdf2 B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   146
  > drop d7a6f907a822 D
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   147
  > pick 591369deedfd X
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   148
  > EOF
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   149
  merging B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   150
  warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
27629
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27627
diff changeset
   151
  Fix up the change (pick 591369deedfd)
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27627
diff changeset
   152
  (hg histedit --continue to resume)
27085
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   153
  $ hg histedit --abort | fixbundle
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   154
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   155
  $ hg tglog
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   156
  @  7:591369deedfdcbf57471e894999a70d7f676186d:draft 'X'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   157
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   158
  o  6:d7a6f907a822c4ce6f15662ae45a42aa46d3818a:draft 'D'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   159
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   160
  | o  5:d273e35dcdf21a7eb305192ef2e362887cd0a6f8:draft 'B'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   161
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   162
  | o  4:02de42196ebee42ef284b6780a87cdc96e8eaab6:draft 'H'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   163
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   164
  | | o  3:eea13746799a9e0bfd88f29d3c2e9dc9389f524f:draft 'G'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   165
  | |/|
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   166
  | o |  2:24b6387c8c8cae37178880f3fa95ded3cb1cf785:draft 'F'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   167
  |/ /
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   168
  | o  1:9520eea781bcca16c1e15acc0ba14335a0e8e5ba:draft 'E'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   169
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   170
  o  0:cd010b8cd998f3981a5a8115f94f8da4ab506089:draft 'A'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   171
  
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   172
Continue
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   173
  $ hg histedit 6 --commands - 2>&1 << EOF | fixbundle
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   174
  > base d273e35dcdf2 B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   175
  > drop d7a6f907a822 D
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   176
  > pick 591369deedfd X
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   177
  > EOF
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   178
  merging B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   179
  warning: conflicts while merging B! (edit, then use 'hg resolve --mark')
27629
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27627
diff changeset
   180
  Fix up the change (pick 591369deedfd)
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27627
diff changeset
   181
  (hg histedit --continue to resume)
27085
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   182
  $ echo b2 > B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   183
  $ hg resolve --mark B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   184
  (no more unresolved files)
27627
dcbba68e076f histedit: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
   185
  continue: hg histedit --continue
27085
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   186
  $ hg histedit --continue | fixbundle
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   187
  $ hg tglog
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   188
  @  6:03772da75548bb42a8f1eacd8c91d0717a147fcd:draft 'X'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   189
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   190
  o  5:d273e35dcdf21a7eb305192ef2e362887cd0a6f8:draft 'B'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   191
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   192
  | o  4:02de42196ebee42ef284b6780a87cdc96e8eaab6:draft 'H'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   193
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   194
  | | o  3:eea13746799a9e0bfd88f29d3c2e9dc9389f524f:draft 'G'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   195
  | |/|
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   196
  | o |  2:24b6387c8c8cae37178880f3fa95ded3cb1cf785:draft 'F'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   197
  |/ /
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   198
  | o  1:9520eea781bcca16c1e15acc0ba14335a0e8e5ba:draft 'E'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   199
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   200
  o  0:cd010b8cd998f3981a5a8115f94f8da4ab506089:draft 'A'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   201
  
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   202
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   203
base on a previously picked changeset
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   204
  $ echo i > i
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   205
  $ hg add i
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   206
  $ hg commit -m "I"
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   207
  $ echo j > j
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   208
  $ hg add j
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   209
  $ hg commit -m "J"
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   210
  $ hg tglog
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   211
  @  8:e8c55b19d366b335626e805484110d1d5f6f2ea3:draft 'J'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   212
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   213
  o  7:b2f90fd8aa85db5569e3cfc30cd1d7739546368e:draft 'I'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   214
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   215
  o  6:03772da75548bb42a8f1eacd8c91d0717a147fcd:draft 'X'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   216
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   217
  o  5:d273e35dcdf21a7eb305192ef2e362887cd0a6f8:draft 'B'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   218
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   219
  | o  4:02de42196ebee42ef284b6780a87cdc96e8eaab6:draft 'H'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   220
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   221
  | | o  3:eea13746799a9e0bfd88f29d3c2e9dc9389f524f:draft 'G'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   222
  | |/|
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   223
  | o |  2:24b6387c8c8cae37178880f3fa95ded3cb1cf785:draft 'F'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   224
  |/ /
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   225
  | o  1:9520eea781bcca16c1e15acc0ba14335a0e8e5ba:draft 'E'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   226
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   227
  o  0:cd010b8cd998f3981a5a8115f94f8da4ab506089:draft 'A'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   228
  
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   229
  $ hg histedit 5 --commands - 2>&1 << EOF | fixbundle
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   230
  > pick d273e35dcdf2 B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   231
  > pick 03772da75548 X
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   232
  > base d273e35dcdf2 B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   233
  > pick e8c55b19d366 J
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   234
  > base d273e35dcdf2 B
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   235
  > pick b2f90fd8aa85 I
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   236
  > EOF
29887
6d66200bff3b histedit: correct output of error when 'base' is from the edit list
Augie Fackler <augie@google.com>
parents: 29069
diff changeset
   237
  hg: parse error: base "d273e35dcdf2" changeset was an edited list candidate
6d66200bff3b histedit: correct output of error when 'base' is from the edit list
Augie Fackler <augie@google.com>
parents: 29069
diff changeset
   238
  (base must only use unlisted changesets)
27085
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   239
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   240
  $ hg tglog
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   241
  @  8:e8c55b19d366b335626e805484110d1d5f6f2ea3:draft 'J'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   242
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   243
  o  7:b2f90fd8aa85db5569e3cfc30cd1d7739546368e:draft 'I'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   244
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   245
  o  6:03772da75548bb42a8f1eacd8c91d0717a147fcd:draft 'X'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   246
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   247
  o  5:d273e35dcdf21a7eb305192ef2e362887cd0a6f8:draft 'B'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   248
  |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   249
  | o  4:02de42196ebee42ef284b6780a87cdc96e8eaab6:draft 'H'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   250
  | |
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   251
  | | o  3:eea13746799a9e0bfd88f29d3c2e9dc9389f524f:draft 'G'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   252
  | |/|
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   253
  | o |  2:24b6387c8c8cae37178880f3fa95ded3cb1cf785:draft 'F'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   254
  |/ /
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   255
  | o  1:9520eea781bcca16c1e15acc0ba14335a0e8e5ba:draft 'E'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   256
  |/
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   257
  o  0:cd010b8cd998f3981a5a8115f94f8da4ab506089:draft 'A'
d50ff8f4891f histedit: add an experimental base action
Mateusz Kwapich <mitrandir@fb.com>
parents:
diff changeset
   258