tests/test-split.t
author Boris Feld <boris.feld@octobus.net>
Thu, 28 Jun 2018 16:11:13 +0200
changeset 38562 c88d2c9b00dd
parent 38424 4f885770c4a2
child 39707 5abc47d4ca6b
permissions -rw-r--r--
diffutil: extract diff options code into a dedicated util-module We want to be able to create and use diffoptions in more places. Currently the official function to instantiate diffoptions live into `mercurial.patch`. A module too high level to be easily imported in some places. So we extract the diff options related function in their own utility module.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
     1
#testcases obsstore-on obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
     2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
     3
  $ cat > $TESTTMP/editor.py <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
     4
  > #!$PYTHON
36645
7bc33d677c0c tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
     5
  > import os
7bc33d677c0c tests: fix various test-check-module-imports.t violations
Augie Fackler <augie@google.com>
parents: 35709
diff changeset
     6
  > import sys
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
     7
  > path = os.path.join(os.environ['TESTTMP'], 'messages')
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
     8
  > messages = open(path).read().split('--\n')
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
     9
  > prompt = open(sys.argv[1]).read()
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    10
  > sys.stdout.write(''.join('EDITOR: %s' % l for l in prompt.splitlines(True)))
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    11
  > sys.stdout.flush()
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    12
  > with open(sys.argv[1], 'w') as f:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    13
  >    f.write(messages[0])
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    14
  > with open(path, 'w') as f:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    15
  >    f.write('--\n'.join(messages[1:]))
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    16
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    17
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    18
  $ cat >> $HGRCPATH <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    19
  > [extensions]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    20
  > drawdag=$TESTDIR/drawdag.py
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    21
  > split=
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    22
  > [ui]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    23
  > interactive=1
35479
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
    24
  > color=no
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
    25
  > paginate=never
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    26
  > [diff]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    27
  > git=1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    28
  > unified=0
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    29
  > [alias]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    30
  > glog=log -G -T '{rev}:{node|short} {desc} {bookmarks}\n'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    31
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    32
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    33
#if obsstore-on
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    34
  $ cat >> $HGRCPATH <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    35
  > [experimental]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    36
  > evolution=all
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    37
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    38
#endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    39
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    40
  $ hg init a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    41
  $ cd a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    42
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    43
Nothing to split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    44
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    45
  $ hg split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    46
  nothing to split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    47
  [1]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    48
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    49
  $ hg commit -m empty --config ui.allowemptycommit=1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    50
  $ hg split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    51
  abort: cannot split an empty revision
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    52
  [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    53
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    54
  $ rm -rf .hg
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    55
  $ hg init
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    56
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    57
Cannot split working directory
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    58
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    59
  $ hg split -r 'wdir()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    60
  abort: cannot split working directory
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    61
  [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    62
35479
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
    63
Generate some content.  The sed filter drop CR on Windows, which is dropped in
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
    64
the a > b line.
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    65
35479
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
    66
  $ $TESTDIR/seq.py 1 5 | sed 's/\r$//' >> a
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    67
  $ hg ci -m a1 -A a -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    68
  $ hg bookmark -i r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    69
  $ sed 's/1/11/;s/3/33/;s/5/55/' a > b
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    70
  $ mv b a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    71
  $ hg ci -m a2 -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    72
  $ hg bookmark -i r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    73
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    74
Cannot split a public changeset
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    75
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    76
  $ hg phase --public -r 'all()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    77
  $ hg split .
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    78
  abort: cannot split public changeset
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    79
  (see 'hg help phases' for details)
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    80
  [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    81
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    82
  $ hg phase --draft -f -r 'all()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    83
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    84
Cannot split while working directory is dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    85
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    86
  $ touch dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    87
  $ hg add dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    88
  $ hg split .
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    89
  abort: uncommitted changes
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    90
  [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    91
  $ hg forget dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    92
  $ rm dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    93
38412
a0e185f10454 tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents: 36645
diff changeset
    94
Make a clean directory for future tests to build off of
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    95
38412
a0e185f10454 tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents: 36645
diff changeset
    96
  $ cp -R . ../clean
a0e185f10454 tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents: 36645
diff changeset
    97
a0e185f10454 tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents: 36645
diff changeset
    98
Split a head
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    99
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   100
  $ hg bookmark r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   101
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   102
  $ hg split 'all()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   103
  abort: cannot split multiple revisions
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   104
  [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   105
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   106
  $ runsplit() {
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   107
  > cat > $TESTTMP/messages <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   108
  > split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   109
  > --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   110
  > split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   111
  > --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   112
  > split 3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   113
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   114
  > cat <<EOF | hg split "$@"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   115
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   116
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   117
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   118
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   119
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   120
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   121
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   122
  > }
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   123
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   124
  $ HGEDITOR=false runsplit
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   125
  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   126
  1 hunks, 1 lines changed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   127
  examine changes to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   128
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   129
  @@ -5,1 +5,1 @@ 4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   130
  -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   131
  +55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   132
  record this change to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   133
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   134
  transaction abort!
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   135
  rollback completed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   136
  abort: edit failed: false exited with status 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   137
  [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   138
  $ hg status
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   139
35479
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
   140
  $ HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py"
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   141
  $ runsplit
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   142
  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   143
  1 hunks, 1 lines changed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   144
  examine changes to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   145
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   146
  @@ -5,1 +5,1 @@ 4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   147
  -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   148
  +55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   149
  record this change to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   150
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   151
  EDITOR: HG: Splitting 1df0d5c5a3ab. Write commit message for the first split changeset.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   152
  EDITOR: a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   153
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   154
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   155
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   156
  EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   157
  EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   158
  EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   159
  EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   160
  EDITOR: HG: changed a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   161
  created new head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   162
  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   163
  1 hunks, 1 lines changed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   164
  examine changes to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   165
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   166
  @@ -3,1 +3,1 @@ 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   167
  -3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   168
  +33
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   169
  record this change to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   170
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   171
  EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   172
  EDITOR: HG: - e704349bd21b: split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   173
  EDITOR: HG: Write commit message for the next split changeset.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   174
  EDITOR: a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   175
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   176
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   177
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   178
  EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   179
  EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   180
  EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   181
  EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   182
  EDITOR: HG: changed a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   183
  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   184
  1 hunks, 1 lines changed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   185
  examine changes to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   186
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   187
  @@ -1,1 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   188
  -1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   189
  +11
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   190
  record this change to 'a'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   191
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   192
  EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   193
  EDITOR: HG: - e704349bd21b: split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   194
  EDITOR: HG: - a09ad58faae3: split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   195
  EDITOR: HG: Write commit message for the next split changeset.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   196
  EDITOR: a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   197
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   198
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   199
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   200
  EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   201
  EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   202
  EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   203
  EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   204
  EDITOR: HG: changed a
35479
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
   205
  saved backup bundle to $TESTTMP/a/.hg/strip-backup/1df0d5c5a3ab-8341b760-split.hg (obsstore-off !)
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   206
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   207
#if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   208
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   209
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   210
     r2                        3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   211
   * r3                        3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   212
  $ hg glog -p
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   213
  @  3:00eebaf8d2e2 split 3 r2 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   214
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   215
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   216
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   217
  |  @@ -1,1 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   218
  |  -1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   219
  |  +11
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   220
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   221
  o  2:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   222
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   223
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   224
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   225
  |  @@ -3,1 +3,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   226
  |  -3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   227
  |  +33
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   228
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   229
  o  1:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   230
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   231
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   232
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   233
  |  @@ -5,1 +5,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   234
  |  -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   235
  |  +55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   236
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   237
  o  0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   238
     diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   239
     new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   240
     --- /dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   241
     +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   242
     @@ -0,0 +1,5 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   243
     +1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   244
     +2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   245
     +3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   246
     +4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   247
     +5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   248
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   249
#else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   250
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   251
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   252
     r2                        4:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   253
   * r3                        4:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   254
  $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   255
  @  4:00eebaf8d2e2 split 3 r2 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   256
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   257
  o  3:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   258
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   259
  o  2:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   260
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   261
  o  0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   262
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   263
#endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   264
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   265
Split a head while working parent is not that head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   266
38412
a0e185f10454 tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents: 36645
diff changeset
   267
  $ cp -R $TESTTMP/clean $TESTTMP/b
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   268
  $ cd $TESTTMP/b
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   269
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   270
  $ hg up 0 -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   271
  $ hg bookmark r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   272
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   273
  $ runsplit tip >/dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   274
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   275
#if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   276
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   277
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   278
     r2                        3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   279
   * r3                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   280
  $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   281
  o  3:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   282
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   283
  o  2:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   284
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   285
  o  1:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   286
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   287
  @  0:a61bcde8c529 a1 r1 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   288
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   289
#else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   290
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   291
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   292
     r2                        4:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   293
   * r3                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   294
  $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   295
  o  4:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   296
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   297
  o  3:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   298
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   299
  o  2:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   300
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   301
  @  0:a61bcde8c529 a1 r1 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   302
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   303
#endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   304
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   305
Split a non-head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   306
38412
a0e185f10454 tests: in test-split.t, save a "clean" copy of pre-split repo for later use
Kyle Lippincott <spectral@google.com>
parents: 36645
diff changeset
   307
  $ cp -R $TESTTMP/clean $TESTTMP/c
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   308
  $ cd $TESTTMP/c
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   309
  $ echo d > d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   310
  $ hg ci -m d1 -A d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   311
  $ hg bookmark -i d1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   312
  $ echo 2 >> d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   313
  $ hg ci -m d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   314
  $ echo 3 >> d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   315
  $ hg ci -m d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   316
  $ hg bookmark -i d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   317
  $ hg up '.^' -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   318
  $ hg bookmark d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   319
  $ cp -R . ../d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   320
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   321
  $ runsplit -r 1 | grep rebasing
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   322
  rebasing 2:b5c5ea414030 "d1" (d1)
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   323
  rebasing 3:f4a0a8d004cc "d2" (d2)
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   324
  rebasing 4:777940761eba "d3" (d3)
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   325
#if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   326
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   327
     d1                        4:c4b449ef030e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   328
   * d2                        5:c9dd00ab36a3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   329
     d3                        6:19f476bc865c
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   330
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   331
     r2                        3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   332
  $ hg glog -p
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   333
  o  6:19f476bc865c d3 d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   334
  |  diff --git a/d b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   335
  |  --- a/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   336
  |  +++ b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   337
  |  @@ -2,0 +3,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   338
  |  +3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   339
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   340
  @  5:c9dd00ab36a3 d2 d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   341
  |  diff --git a/d b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   342
  |  --- a/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   343
  |  +++ b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   344
  |  @@ -1,0 +2,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   345
  |  +2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   346
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   347
  o  4:c4b449ef030e d1 d1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   348
  |  diff --git a/d b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   349
  |  new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   350
  |  --- /dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   351
  |  +++ b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   352
  |  @@ -0,0 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   353
  |  +d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   354
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   355
  o  3:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   356
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   357
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   358
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   359
  |  @@ -1,1 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   360
  |  -1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   361
  |  +11
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   362
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   363
  o  2:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   364
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   365
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   366
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   367
  |  @@ -3,1 +3,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   368
  |  -3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   369
  |  +33
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   370
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   371
  o  1:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   372
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   373
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   374
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   375
  |  @@ -5,1 +5,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   376
  |  -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   377
  |  +55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   378
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   379
  o  0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   380
     diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   381
     new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   382
     --- /dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   383
     +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   384
     @@ -0,0 +1,5 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   385
     +1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   386
     +2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   387
     +3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   388
     +4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   389
     +5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   390
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   391
#else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   392
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   393
     d1                        8:c4b449ef030e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   394
   * d2                        9:c9dd00ab36a3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   395
     d3                        10:19f476bc865c
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   396
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   397
     r2                        7:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   398
  $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   399
  o  10:19f476bc865c d3 d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   400
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   401
  @  9:c9dd00ab36a3 d2 d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   402
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   403
  o  8:c4b449ef030e d1 d1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   404
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   405
  o  7:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   406
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   407
  o  6:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   408
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   409
  o  5:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   410
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   411
  o  0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   412
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   413
#endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   414
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   415
Split a non-head without rebase
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   416
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   417
  $ cd $TESTTMP/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   418
#if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   419
  $ runsplit -r 1 --no-rebase
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   420
  abort: cannot split changeset with children without rebase
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   421
  [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   422
#else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   423
  $ runsplit -r 1 --no-rebase >/dev/null
35709
1a09dad8b85a evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 35508
diff changeset
   424
  3 new orphan changesets
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   425
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   426
     d1                        2:b5c5ea414030
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   427
   * d2                        3:f4a0a8d004cc
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   428
     d3                        4:777940761eba
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   429
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   430
     r2                        7:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   431
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   432
  $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   433
  o  7:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   434
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   435
  o  6:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   436
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   437
  o  5:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   438
  |
35508
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35479
diff changeset
   439
  | *  4:777940761eba d3 d3
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   440
  | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   441
  | @  3:f4a0a8d004cc d2 d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   442
  | |
35508
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35479
diff changeset
   443
  | *  2:b5c5ea414030 d1 d1
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   444
  | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   445
  | x  1:1df0d5c5a3ab a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   446
  |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   447
  o  0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   448
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   449
#endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   450
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   451
Split a non-head with obsoleted descendants
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   452
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   453
#if obsstore-on
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   454
  $ hg init $TESTTMP/e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   455
  $ cd $TESTTMP/e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   456
  $ hg debugdrawdag <<'EOS'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   457
  >   H I   J
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   458
  >   | |   |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   459
  >   F G1 G2  # amend: G1 -> G2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   460
  >   | |  /   # prune: F
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   461
  >   C D E
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   462
  >    \|/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   463
  >     B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   464
  >     |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   465
  >     A
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   466
  > EOS
35709
1a09dad8b85a evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 35508
diff changeset
   467
  2 new orphan changesets
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   468
  $ eval `hg tags -T '{tag}={node}\n'`
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   469
  $ rm .hg/localtags
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   470
  $ hg split $B --config experimental.evolution=createmarkers
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   471
  abort: split would leave orphaned changesets behind
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   472
  [255]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   473
  $ cat > $TESTTMP/messages <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   474
  > Split B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   475
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   476
  $ cat <<EOF | hg split $B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   477
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   478
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   479
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   480
  diff --git a/B b/B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   481
  new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   482
  examine changes to 'B'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   483
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   484
  @@ -0,0 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   485
  +B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   486
  \ No newline at end of file
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   487
  record this change to 'B'? [Ynesfdaq?] y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   488
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   489
  EDITOR: HG: Splitting 112478962961. Write commit message for the first split changeset.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   490
  EDITOR: B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   491
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   492
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   493
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   494
  EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   495
  EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   496
  EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   497
  EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   498
  EDITOR: HG: added B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   499
  created new head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   500
  rebasing 2:26805aba1e60 "C"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   501
  rebasing 3:be0ef73c17ad "D"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   502
  rebasing 4:49cb92066bfd "E"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   503
  rebasing 7:97a6268cc7ef "G2"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   504
  rebasing 10:e2f1e425c0db "J"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   505
  $ hg glog -r 'sort(all(), topo)'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   506
  o  16:556c085f8b52 J
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   507
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   508
  o  15:8761f6c9123f G2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   509
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   510
  o  14:a7aeffe59b65 E
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   511
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   512
  | o  13:e1e914ede9ab D
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   513
  |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   514
  | o  12:01947e9b98aa C
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   515
  |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   516
  o  11:0947baa74d47 Split B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   517
  |
35508
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35479
diff changeset
   518
  | *  9:88ede1d5ee13 I
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   519
  | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   520
  | x  6:af8cbf225b7b G1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   521
  | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   522
  | x  3:be0ef73c17ad D
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   523
  | |
35508
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35479
diff changeset
   524
  | | *  8:74863e5b5074 H
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   525
  | | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   526
  | | x  5:ee481a2a1e69 F
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   527
  | | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   528
  | | x  2:26805aba1e60 C
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   529
  | |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   530
  | x  1:112478962961 B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   531
  |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   532
  o  0:426bada5c675 A
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   533
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   534
#endif
38424
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   535
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   536
Preserve secret phase in split
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   537
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   538
  $ cp -R $TESTTMP/clean $TESTTMP/phases1
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   539
  $ cd $TESTTMP/phases1
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   540
  $ hg phase --secret -fr tip
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   541
  $ hg log -T '{short(node)} {phase}\n'
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   542
  1df0d5c5a3ab secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   543
  a61bcde8c529 draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   544
  $ runsplit tip >/dev/null
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   545
  $ hg log -T '{short(node)} {phase}\n'
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   546
  00eebaf8d2e2 secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   547
  a09ad58faae3 secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   548
  e704349bd21b secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   549
  a61bcde8c529 draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   550
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   551
Do not move things to secret even if phases.new-commit=secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   552
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   553
  $ cp -R $TESTTMP/clean $TESTTMP/phases2
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   554
  $ cd $TESTTMP/phases2
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   555
  $ cat >> .hg/hgrc <<EOF
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   556
  > [phases]
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   557
  > new-commit=secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   558
  > EOF
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   559
  $ hg log -T '{short(node)} {phase}\n'
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   560
  1df0d5c5a3ab draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   561
  a61bcde8c529 draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   562
  $ runsplit tip >/dev/null
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   563
  $ hg log -T '{short(node)} {phase}\n'
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   564
  00eebaf8d2e2 draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   565
  a09ad58faae3 draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   566
  e704349bd21b draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   567
  a61bcde8c529 draft