tests/test-split.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Sun, 11 Jul 2021 17:03:58 +0200
changeset 47641 5d9f89cd4984
parent 47070 d90f6237b3aa
child 49995 27fd12eca557
permissions -rw-r--r--
dummyssh: call python script with python We don't want windows to grab whatever python got configured to run .py file. We need the python used during the test to be used. Differential Revision: https://phab.mercurial-scm.org/D11083
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
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 38424
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
41560
66399f2e92aa commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents: 41557
diff changeset
    29
  > [commands]
66399f2e92aa commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents: 41557
diff changeset
    30
  > commit.interactive.unified=0
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    31
  > [alias]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    32
  > 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
    33
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    34
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    35
#if obsstore-on
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    36
  $ cat >> $HGRCPATH <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    37
  > [experimental]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    38
  > evolution=all
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    39
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    40
#endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    41
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    42
  $ hg init a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    43
  $ cd a
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
Nothing to split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    46
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    47
  $ hg split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    48
  nothing to split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    49
  [1]
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    50
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    51
  $ hg commit -m empty --config ui.allowemptycommit=1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    52
  $ hg split
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    53
  abort: cannot split an empty revision
45876
568c05d8f3d2 errors: raise InputError in `hg split`
Martin von Zweigbergk <martinvonz@google.com>
parents: 45856
diff changeset
    54
  [10]
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    56
  $ rm -rf .hg
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    57
  $ hg init
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
Cannot split working directory
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    60
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    61
  $ hg split -r 'wdir()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    62
  abort: cannot split working directory
45876
568c05d8f3d2 errors: raise InputError in `hg split`
Martin von Zweigbergk <martinvonz@google.com>
parents: 45856
diff changeset
    63
  [10]
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    64
35479
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
    65
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
    66
the a > b line.
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    67
35479
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
    68
  $ $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
    69
  $ hg ci -m a1 -A a -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    70
  $ hg bookmark -i r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    71
  $ 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
    72
  $ mv b a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    73
  $ hg ci -m a2 -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    74
  $ hg bookmark -i r2
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
Cannot split a public changeset
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    77
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    78
  $ hg phase --public -r 'all()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    79
  $ hg split .
47069
5b6dd0d9171b rewriteutil: give examples of public changesets that can't be rewritten
Martin von Zweigbergk <martinvonz@google.com>
parents: 47018
diff changeset
    80
  abort: cannot split public changesets: 1df0d5c5a3ab
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    81
  (see 'hg help phases' for details)
45853
b4694ef45db5 errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
    82
  [10]
35455
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
  $ hg phase --draft -f -r 'all()'
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
Cannot split while working directory is dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    87
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    88
  $ touch dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    89
  $ hg add dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    90
  $ hg split .
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    91
  abort: uncommitted changes
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45773
diff changeset
    92
  [20]
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    93
  $ hg forget dirty
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
    94
  $ rm dirty
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
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
    97
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
    98
  $ 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
    99
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
   100
Split a head
35455
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 bookmark r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   103
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   104
  $ hg split 'all()'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   105
  abort: cannot split multiple revisions
45876
568c05d8f3d2 errors: raise InputError in `hg split`
Martin von Zweigbergk <martinvonz@google.com>
parents: 45856
diff changeset
   106
  [10]
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   107
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   108
This function splits a bit strangely primarily to avoid changing the behavior of
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   109
the test after a bug was fixed with how split/commit --interactive handled
41560
66399f2e92aa commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents: 41557
diff changeset
   110
`commands.commit.interactive.unified=0`: when there were no context lines,
66399f2e92aa commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents: 41557
diff changeset
   111
it kept only the last diff hunk. When running split, this meant that runsplit
66399f2e92aa commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents: 41557
diff changeset
   112
was always recording three commits, one for each diff hunk, in reverse order
66399f2e92aa commit: if interactive, look elsewhere for whitespace settings (BC)
Kyle Lippincott <spectral@google.com>
parents: 41557
diff changeset
   113
(the base commit was the last diff hunk in the file).
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   114
  $ runsplit() {
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   115
  > cat > $TESTTMP/messages <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   116
  > split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   117
  > --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   118
  > split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   119
  > --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   120
  > split 3
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
  > cat <<EOF | hg split "$@"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   123
  > y
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   124
  > n
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   125
  > n
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   126
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   127
  > y
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   128
  > n
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   129
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   130
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   131
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   132
  > EOF
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
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   135
  $ HGEDITOR=false runsplit
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   136
  diff --git a/a b/a
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   137
  3 hunks, 3 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   138
  examine changes to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   139
  (enter ? for help) [Ynesfdaq?] y
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   140
  
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   141
  @@ -1,1 +1,1 @@
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   142
  -1
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   143
  +11
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   144
  record change 1/3 to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   145
  (enter ? for help) [Ynesfdaq?] n
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   146
  
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   147
  @@ -3,1 +3,1 @@ 2
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   148
  -3
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   149
  +33
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   150
  record change 2/3 to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   151
  (enter ? for help) [Ynesfdaq?] n
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   152
  
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   153
  @@ -5,1 +5,1 @@ 4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   154
  -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   155
  +55
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   156
  record change 3/3 to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   157
  (enter ? for help) [Ynesfdaq?] y
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   158
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   159
  transaction abort!
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   160
  rollback completed
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   161
  abort: edit failed: false exited with status 1
45877
ac362d5a7893 errors: introduce CanceledError and use it in a few places
Martin von Zweigbergk <martinvonz@google.com>
parents: 45876
diff changeset
   162
  [250]
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   163
  $ hg status
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   164
35479
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
   165
  $ HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py"
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   166
  $ runsplit
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   167
  diff --git a/a b/a
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   168
  3 hunks, 3 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   169
  examine changes to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   170
  (enter ? for help) [Ynesfdaq?] y
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   171
  
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   172
  @@ -1,1 +1,1 @@
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   173
  -1
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   174
  +11
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   175
  record change 1/3 to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   176
  (enter ? for help) [Ynesfdaq?] n
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   177
  
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   178
  @@ -3,1 +3,1 @@ 2
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   179
  -3
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   180
  +33
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   181
  record change 2/3 to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   182
  (enter ? for help) [Ynesfdaq?] n
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   183
  
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   184
  @@ -5,1 +5,1 @@ 4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   185
  -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   186
  +55
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   187
  record change 3/3 to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   188
  (enter ? for help) [Ynesfdaq?] y
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   189
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   190
  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
   191
  EDITOR: a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   192
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   193
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   194
  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
   195
  EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   196
  EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   197
  EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   198
  EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   199
  EDITOR: HG: changed a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   200
  created new head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   201
  diff --git a/a b/a
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   202
  2 hunks, 2 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   203
  examine changes to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   204
  (enter ? for help) [Ynesfdaq?] y
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   205
  
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   206
  @@ -1,1 +1,1 @@
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   207
  -1
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   208
  +11
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   209
  record change 1/2 to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   210
  (enter ? for help) [Ynesfdaq?] n
41454
d1d3094b54f9 patch: handle 0 context lines (diff.unified=0) when parsing patches
Kyle Lippincott <spectral@google.com>
parents: 39707
diff changeset
   211
  
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   212
  @@ -3,1 +3,1 @@ 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   213
  -3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   214
  +33
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   215
  record change 2/2 to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   216
  (enter ? for help) [Ynesfdaq?] y
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   217
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   218
  EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
45773
84ce9ffc95ad split: use default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   219
  EDITOR: HG: - 2:e704349bd21b tip "split 1"
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   220
  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
   221
  EDITOR: a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   222
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   223
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   224
  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
   225
  EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   226
  EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   227
  EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   228
  EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   229
  EDITOR: HG: changed a
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
  1 hunks, 1 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   232
  examine changes to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   233
  (enter ? for help) [Ynesfdaq?] y
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   234
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   235
  @@ -1,1 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   236
  -1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   237
  +11
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   238
  record this change to 'a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   239
  (enter ? for help) [Ynesfdaq?] y
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   240
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   241
  EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
45773
84ce9ffc95ad split: use default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   242
  EDITOR: HG: - 2:e704349bd21b tip "split 1"
84ce9ffc95ad split: use default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   243
  EDITOR: HG: - 3:a09ad58faae3 "split 2"
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   244
  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
   245
  EDITOR: a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   246
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   247
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   248
  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
   249
  EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   250
  EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   251
  EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   252
  EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   253
  EDITOR: HG: changed a
35479
8d05705bde0a test-split: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35455
diff changeset
   254
  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
   255
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   256
#if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   257
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   258
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   259
     r2                        3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   260
   * r3                        3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   261
  $ hg glog -p
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   262
  @  3:00eebaf8d2e2 split 3 r2 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   263
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   264
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   265
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   266
  |  @@ -1,1 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   267
  |  -1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   268
  |  +11
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
  o  2:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   271
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   272
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   273
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   274
  |  @@ -3,1 +3,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   275
  |  -3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   276
  |  +33
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   277
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   278
  o  1:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   279
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   280
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   281
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   282
  |  @@ -5,1 +5,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   283
  |  -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   284
  |  +55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   285
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   286
  o  0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   287
     diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   288
     new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   289
     --- /dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   290
     +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   291
     @@ -0,0 +1,5 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   292
     +1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   293
     +2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   294
     +3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   295
     +4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   296
     +5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   297
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   298
#else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   299
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   300
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   301
     r2                        4:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   302
   * r3                        4:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   303
  $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   304
  @  4:00eebaf8d2e2 split 3 r2 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   305
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   306
  o  3:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   307
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   308
  o  2:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   309
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   310
  o  0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   311
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   312
#endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   313
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   314
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
   315
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
   316
  $ cp -R $TESTTMP/clean $TESTTMP/b
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   317
  $ cd $TESTTMP/b
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   318
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   319
  $ hg up 0 -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   320
  $ hg bookmark r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   321
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   322
  $ runsplit tip >/dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   323
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   324
#if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   325
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   326
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   327
     r2                        3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   328
   * r3                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   329
  $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   330
  o  3:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   331
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   332
  o  2:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   333
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   334
  o  1:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   335
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   336
  @  0:a61bcde8c529 a1 r1 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   337
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   338
#else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   339
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   340
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   341
     r2                        4:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   342
   * r3                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   343
  $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   344
  o  4:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   345
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   346
  o  3:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   347
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   348
  o  2:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   349
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   350
  @  0:a61bcde8c529 a1 r1 r3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   351
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   352
#endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   353
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   354
Split a non-head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   355
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
   356
  $ cp -R $TESTTMP/clean $TESTTMP/c
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   357
  $ cd $TESTTMP/c
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   358
  $ echo d > d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   359
  $ hg ci -m d1 -A d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   360
  $ hg bookmark -i d1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   361
  $ echo 2 >> d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   362
  $ hg ci -m d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   363
  $ echo 3 >> d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   364
  $ hg ci -m d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   365
  $ hg bookmark -i d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   366
  $ hg up '.^' -q
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   367
  $ hg bookmark d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   368
  $ cp -R . ../d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   369
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   370
  $ runsplit -r 1 | grep rebasing
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 43935
diff changeset
   371
  rebasing 2:b5c5ea414030 d1 "d1"
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 43935
diff changeset
   372
  rebasing 3:f4a0a8d004cc d2 "d2"
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 43935
diff changeset
   373
  rebasing 4:777940761eba d3 "d3"
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   374
#if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   375
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   376
     d1                        4:c4b449ef030e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   377
   * d2                        5:c9dd00ab36a3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   378
     d3                        6:19f476bc865c
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   379
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   380
     r2                        3:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   381
  $ hg glog -p
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   382
  o  6:19f476bc865c d3 d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   383
  |  diff --git a/d b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   384
  |  --- a/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   385
  |  +++ b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   386
  |  @@ -2,0 +3,1 @@
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
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   389
  @  5:c9dd00ab36a3 d2 d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   390
  |  diff --git a/d b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   391
  |  --- a/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   392
  |  +++ b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   393
  |  @@ -1,0 +2,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   394
  |  +2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   395
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   396
  o  4:c4b449ef030e d1 d1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   397
  |  diff --git a/d b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   398
  |  new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   399
  |  --- /dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   400
  |  +++ b/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   401
  |  @@ -0,0 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   402
  |  +d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   403
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   404
  o  3:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   405
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   406
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   407
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   408
  |  @@ -1,1 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   409
  |  -1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   410
  |  +11
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   411
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   412
  o  2:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   413
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   414
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   415
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   416
  |  @@ -3,1 +3,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   417
  |  -3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   418
  |  +33
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   419
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   420
  o  1:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   421
  |  diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   422
  |  --- a/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   423
  |  +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   424
  |  @@ -5,1 +5,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   425
  |  -5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   426
  |  +55
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   427
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   428
  o  0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   429
     diff --git a/a b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   430
     new file mode 100644
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   431
     --- /dev/null
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   432
     +++ b/a
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   433
     @@ -0,0 +1,5 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   434
     +1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   435
     +2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   436
     +3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   437
     +4
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   438
     +5
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   439
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   440
#else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   441
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   442
     d1                        8:c4b449ef030e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   443
   * d2                        9:c9dd00ab36a3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   444
     d3                        10:19f476bc865c
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   445
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   446
     r2                        7:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   447
  $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   448
  o  10:19f476bc865c d3 d3
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   449
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   450
  @  9:c9dd00ab36a3 d2 d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   451
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   452
  o  8:c4b449ef030e d1 d1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   453
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   454
  o  7:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   455
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   456
  o  6:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   457
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   458
  o  5:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   459
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   460
  o  0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   461
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   462
#endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   463
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   464
Split a non-head without rebase
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   465
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   466
  $ cd $TESTTMP/d
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   467
#if obsstore-off
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   468
  $ runsplit -r 1 --no-rebase
47070
d90f6237b3aa rewriteutil: say how many commits would become orphan if commit is rewritten
Martin von Zweigbergk <martinvonz@google.com>
parents: 47069
diff changeset
   469
  abort: cannot split changeset, as that will orphan 3 descendants
47018
7a90fddb13b0 rewriteutil: point to help about instability when rewriting creates orphan
Martin von Zweigbergk <martinvonz@google.com>
parents: 46924
diff changeset
   470
  (see 'hg help evolution.instability')
45853
b4694ef45db5 errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
   471
  [10]
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   472
#else
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   473
  $ runsplit -r 1 --no-rebase >/dev/null
35709
1a09dad8b85a evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 35508
diff changeset
   474
  3 new orphan changesets
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   475
  $ hg bookmark
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   476
     d1                        2:b5c5ea414030
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   477
   * d2                        3:f4a0a8d004cc
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   478
     d3                        4:777940761eba
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   479
     r1                        0:a61bcde8c529
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   480
     r2                        7:00eebaf8d2e2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   481
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   482
  $ hg glog
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   483
  o  7:00eebaf8d2e2 split 3 r2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   484
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   485
  o  6:a09ad58faae3 split 2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   486
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   487
  o  5:e704349bd21b split 1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   488
  |
35508
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35479
diff changeset
   489
  | *  4:777940761eba d3 d3
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   490
  | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   491
  | @  3:f4a0a8d004cc d2 d2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   492
  | |
35508
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35479
diff changeset
   493
  | *  2:b5c5ea414030 d1 d1
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   494
  | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   495
  | x  1:1df0d5c5a3ab a2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   496
  |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   497
  o  0:a61bcde8c529 a1 r1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   498
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   499
#endif
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   500
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   501
Split a non-head with obsoleted descendants
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   502
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   503
#if obsstore-on
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   504
  $ hg init $TESTTMP/e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   505
  $ cd $TESTTMP/e
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   506
  $ hg debugdrawdag <<'EOS'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   507
  >   H I   J
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   508
  >   | |   |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   509
  >   F G1 G2  # amend: G1 -> G2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   510
  >   | |  /   # prune: F
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   511
  >   C D E
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   512
  >    \|/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   513
  >     B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   514
  >     |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   515
  >     A
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   516
  > EOS
35709
1a09dad8b85a evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 35508
diff changeset
   517
  2 new orphan changesets
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   518
  $ eval `hg tags -T '{tag}={node}\n'`
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   519
  $ rm .hg/localtags
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   520
  $ hg split $B --config experimental.evolution=createmarkers
47070
d90f6237b3aa rewriteutil: say how many commits would become orphan if commit is rewritten
Martin von Zweigbergk <martinvonz@google.com>
parents: 47069
diff changeset
   521
  abort: cannot split changeset, as that will orphan 4 descendants
47018
7a90fddb13b0 rewriteutil: point to help about instability when rewriting creates orphan
Martin von Zweigbergk <martinvonz@google.com>
parents: 46924
diff changeset
   522
  (see 'hg help evolution.instability')
45853
b4694ef45db5 errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
   523
  [10]
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   524
  $ cat > $TESTTMP/messages <<EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   525
  > Split B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   526
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   527
  $ cat <<EOF | hg split $B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   528
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   529
  > y
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   530
  > EOF
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   531
  diff --git a/B b/B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   532
  new file mode 100644
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   533
  examine changes to 'B'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   534
  (enter ? for help) [Ynesfdaq?] y
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   535
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   536
  @@ -0,0 +1,1 @@
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   537
  +B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   538
  \ No newline at end of file
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   539
  record this change to 'B'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   540
  (enter ? for help) [Ynesfdaq?] y
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   541
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   542
  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
   543
  EDITOR: B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   544
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   545
  EDITOR: 
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   546
  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
   547
  EDITOR: HG: Leave message empty to abort commit.
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   548
  EDITOR: HG: --
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   549
  EDITOR: HG: user: test
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   550
  EDITOR: HG: branch 'default'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   551
  EDITOR: HG: added B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   552
  created new head
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   553
  rebasing 2:26805aba1e60 "C"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   554
  rebasing 3:be0ef73c17ad "D"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   555
  rebasing 4:49cb92066bfd "E"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   556
  rebasing 7:97a6268cc7ef "G2"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   557
  rebasing 10:e2f1e425c0db "J"
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   558
  $ hg glog -r 'sort(all(), topo)'
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   559
  o  16:556c085f8b52 J
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   560
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   561
  o  15:8761f6c9123f G2
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   562
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   563
  o  14:a7aeffe59b65 E
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   564
  |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   565
  | o  13:e1e914ede9ab D
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   566
  |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   567
  | o  12:01947e9b98aa C
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   568
  |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   569
  o  11:0947baa74d47 Split B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   570
  |
35508
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35479
diff changeset
   571
  | *  9:88ede1d5ee13 I
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   572
  | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   573
  | x  6:af8cbf225b7b G1
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   574
  | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   575
  | x  3:be0ef73c17ad D
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   576
  | |
35508
9b3f95d9783d graphlog: add another graph node type, unstable, using character "*" (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 35479
diff changeset
   577
  | | *  8:74863e5b5074 H
35455
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   578
  | | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   579
  | | x  5:ee481a2a1e69 F
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   580
  | | |
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   581
  | | x  2:26805aba1e60 C
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   582
  | |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   583
  | x  1:112478962961 B
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   584
  |/
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   585
  o  0:426bada5c675 A
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   586
  
02ea370c2baa split: new extension to split changesets
Jun Wu <quark@fb.com>
parents:
diff changeset
   587
#endif
38424
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   588
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   589
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
   590
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   591
  $ 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
   592
  $ cd $TESTTMP/phases1
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   593
  $ 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
   594
  $ 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
   595
  1df0d5c5a3ab secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   596
  a61bcde8c529 draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   597
  $ runsplit tip >/dev/null
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   598
  $ 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
   599
  00eebaf8d2e2 secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   600
  a09ad58faae3 secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   601
  e704349bd21b secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   602
  a61bcde8c529 draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   603
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   604
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
   605
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   606
  $ 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
   607
  $ cd $TESTTMP/phases2
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   608
  $ cat >> .hg/hgrc <<EOF
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   609
  > [phases]
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   610
  > new-commit=secret
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   611
  > EOF
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   612
  $ 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
   613
  1df0d5c5a3ab draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   614
  a61bcde8c529 draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   615
  $ runsplit tip >/dev/null
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   616
  $ 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
   617
  00eebaf8d2e2 draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   618
  a09ad58faae3 draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   619
  e704349bd21b draft
4f885770c4a2 split: preserve phase of commit that is being split
Martin von Zweigbergk <martinvonz@google.com>
parents: 38412
diff changeset
   620
  a61bcde8c529 draft
41557
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   621
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   622
`hg split` with ignoreblanklines=1 does not infinite loop
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   623
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   624
  $ mkdir $TESTTMP/f
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   625
  $ hg init $TESTTMP/f/a
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   626
  $ cd $TESTTMP/f/a
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   627
  $ printf '1\n2\n3\n4\n5\n' > foo
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   628
  $ cp foo bar
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   629
  $ hg ci -qAm initial
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   630
  $ printf '1\n\n2\n3\ntest\n4\n5\n' > bar
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   631
  $ printf '1\n2\n3\ntest\n4\n5\n' > foo
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   632
  $ hg ci -qm splitme
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   633
  $ cat > $TESTTMP/messages <<EOF
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   634
  > split 1
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   635
  > --
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   636
  > split 2
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   637
  > EOF
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   638
  $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   639
  diff --git a/bar b/bar
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   640
  2 hunks, 2 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   641
  examine changes to 'bar'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   642
  (enter ? for help) [Ynesfdaq?] f
41557
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   643
  
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   644
  diff --git a/foo b/foo
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   645
  1 hunks, 1 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   646
  examine changes to 'foo'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   647
  (enter ? for help) [Ynesfdaq?] n
41557
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   648
  
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   649
  EDITOR: HG: Splitting dd3c45017cbf. Write commit message for the first split changeset.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   650
  EDITOR: splitme
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   651
  EDITOR: 
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   652
  EDITOR: 
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   653
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   654
  EDITOR: HG: Leave message empty to abort commit.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   655
  EDITOR: HG: --
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   656
  EDITOR: HG: user: test
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   657
  EDITOR: HG: branch 'default'
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   658
  EDITOR: HG: changed bar
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   659
  created new head
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   660
  diff --git a/foo b/foo
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   661
  1 hunks, 1 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   662
  examine changes to 'foo'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   663
  (enter ? for help) [Ynesfdaq?] f
41557
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   664
  
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   665
  EDITOR: HG: Splitting dd3c45017cbf. So far it has been split into:
45773
84ce9ffc95ad split: use default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   666
  EDITOR: HG: - 2:f205aea1c624 tip "split 1"
41557
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   667
  EDITOR: HG: Write commit message for the next split changeset.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   668
  EDITOR: splitme
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   669
  EDITOR: 
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   670
  EDITOR: 
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   671
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   672
  EDITOR: HG: Leave message empty to abort commit.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   673
  EDITOR: HG: --
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   674
  EDITOR: HG: user: test
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   675
  EDITOR: HG: branch 'default'
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   676
  EDITOR: HG: changed foo
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   677
  saved backup bundle to $TESTTMP/f/a/.hg/strip-backup/dd3c45017cbf-463441b5-split.hg (obsstore-off !)
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   678
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   679
Let's try that again, with a slightly different set of patches, to ensure that
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   680
the ignoreblanklines thing isn't somehow position dependent.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   681
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   682
  $ hg init $TESTTMP/f/b
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   683
  $ cd $TESTTMP/f/b
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   684
  $ printf '1\n2\n3\n4\n5\n' > foo
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   685
  $ cp foo bar
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   686
  $ hg ci -qAm initial
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   687
  $ printf '1\n2\n3\ntest\n4\n5\n' > bar
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   688
  $ printf '1\n2\n3\ntest\n4\n\n5\n' > foo
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   689
  $ hg ci -qm splitme
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   690
  $ cat > $TESTTMP/messages <<EOF
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   691
  > split 1
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   692
  > --
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   693
  > split 2
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   694
  > EOF
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   695
  $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   696
  diff --git a/bar b/bar
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   697
  1 hunks, 1 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   698
  examine changes to 'bar'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   699
  (enter ? for help) [Ynesfdaq?] f
41557
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   700
  
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   701
  diff --git a/foo b/foo
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   702
  2 hunks, 2 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   703
  examine changes to 'foo'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   704
  (enter ? for help) [Ynesfdaq?] n
41557
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   705
  
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   706
  EDITOR: HG: Splitting 904c80b40a4a. Write commit message for the first split changeset.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   707
  EDITOR: splitme
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   708
  EDITOR: 
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   709
  EDITOR: 
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   710
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   711
  EDITOR: HG: Leave message empty to abort commit.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   712
  EDITOR: HG: --
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   713
  EDITOR: HG: user: test
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   714
  EDITOR: HG: branch 'default'
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   715
  EDITOR: HG: changed bar
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   716
  created new head
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   717
  diff --git a/foo b/foo
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   718
  2 hunks, 2 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   719
  examine changes to 'foo'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   720
  (enter ? for help) [Ynesfdaq?] f
41557
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   721
  
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   722
  EDITOR: HG: Splitting 904c80b40a4a. So far it has been split into:
45773
84ce9ffc95ad split: use default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   723
  EDITOR: HG: - 2:ffecf40fa954 tip "split 1"
41557
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   724
  EDITOR: HG: Write commit message for the next split changeset.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   725
  EDITOR: splitme
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   726
  EDITOR: 
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   727
  EDITOR: 
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   728
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   729
  EDITOR: HG: Leave message empty to abort commit.
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   730
  EDITOR: HG: --
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   731
  EDITOR: HG: user: test
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   732
  EDITOR: HG: branch 'default'
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   733
  EDITOR: HG: changed foo
3a01ce246ece commit: ignore diff whitespace settings when doing `commit -i` (issue5839)
Kyle Lippincott <spectral@google.com>
parents: 41454
diff changeset
   734
  saved backup bundle to $TESTTMP/f/b/.hg/strip-backup/904c80b40a4a-47fb907f-split.hg (obsstore-off !)
41890
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   735
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   736
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   737
Testing the case in split when commiting flag-only file changes (issue5864)
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   738
---------------------------------------------------------------------------
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   739
  $ hg init $TESTTMP/issue5864
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   740
  $ cd $TESTTMP/issue5864
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   741
  $ echo foo > foo
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   742
  $ hg add foo
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   743
  $ hg ci -m "initial"
41892
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   744
  $ hg import -q --bypass -m "make executable" - <<EOF
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   745
  > diff --git a/foo b/foo
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   746
  > old mode 100644
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   747
  > new mode 100755
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   748
  > EOF
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   749
  $ hg up -q
41890
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   750
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   751
  $ hg glog
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   752
  @  1:3a2125f0f4cb make executable
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   753
  |
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   754
  o  0:51f273a58d82 initial
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   755
  
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   756
41892
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   757
#if no-windows
41982
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   758
  $ cat > $TESTTMP/messages <<EOF
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   759
  > split 1
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   760
  > EOF
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   761
  $ printf 'y\n' | hg split
41890
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   762
  diff --git a/foo b/foo
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   763
  old mode 100644
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   764
  new mode 100755
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   765
  examine changes to 'foo'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 41982
diff changeset
   766
  (enter ? for help) [Ynesfdaq?] y
41890
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   767
  
41982
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   768
  EDITOR: HG: Splitting 3a2125f0f4cb. Write commit message for the first split changeset.
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   769
  EDITOR: make executable
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   770
  EDITOR: 
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   771
  EDITOR: 
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   772
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   773
  EDITOR: HG: Leave message empty to abort commit.
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   774
  EDITOR: HG: --
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   775
  EDITOR: HG: user: test
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   776
  EDITOR: HG: branch 'default'
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   777
  EDITOR: HG: changed foo
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   778
  created new head
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   779
  saved backup bundle to $TESTTMP/issue5864/.hg/strip-backup/3a2125f0f4cb-629e4432-split.hg (obsstore-off !)
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   780
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   781
  $ hg log -G -T "{node|short} {desc}\n"
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   782
  @  b154670c87da split 1
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   783
  |
f8c5225b9054 patch: include flag-only file changes in "special" when filtering (issue5864)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41892
diff changeset
   784
  o  51f273a58d82 initial
41890
7da6307cc07a split: add tests which demonstrate the issue5864
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41560
diff changeset
   785
  
41892
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   786
#else
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   787
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   788
TODO: Fix this on Windows. See issue 2020 and 5883
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   789
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   790
  $ printf 'y\ny\ny\n' | hg split
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   791
  abort: cannot split an empty revision
46071
f4f07cc92a47 tests: update the exit status codes for Windows specific tests
Matt Harbison <matt_harbison@yahoo.com>
parents: 45877
diff changeset
   792
  [10]
41892
0cbcb3e13fcf tests: stabilize test-split.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 41890
diff changeset
   793
#endif
42855
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   794
42856
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   795
Test that splitting moves works properly (issue5723)
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   796
----------------------------------------------------
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   797
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   798
  $ hg init $TESTTMP/issue5723-mv
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   799
  $ cd $TESTTMP/issue5723-mv
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   800
  $ printf '1\n2\n' > file
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   801
  $ hg ci -qAm initial
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   802
  $ hg mv file file2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   803
  $ printf 'a\nb\n1\n2\n3\n4\n' > file2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   804
  $ cat > $TESTTMP/messages <<EOF
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   805
  > split1, keeping only the numbered lines
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   806
  > --
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   807
  > split2, keeping the lettered lines
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   808
  > EOF
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   809
  $ hg ci -m 'move and modify'
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   810
  $ printf 'y\nn\na\na\n' | hg split
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   811
  diff --git a/file b/file2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   812
  rename from file
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   813
  rename to file2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   814
  2 hunks, 4 lines changed
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   815
  examine changes to 'file' and 'file2'?
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   816
  (enter ? for help) [Ynesfdaq?] y
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   817
  
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   818
  @@ -0,0 +1,2 @@
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   819
  +a
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   820
  +b
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   821
  record change 1/2 to 'file2'?
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   822
  (enter ? for help) [Ynesfdaq?] n
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   823
  
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   824
  @@ -2,0 +5,2 @@ 2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   825
  +3
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   826
  +4
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   827
  record change 2/2 to 'file2'?
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   828
  (enter ? for help) [Ynesfdaq?] a
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   829
  
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   830
  EDITOR: HG: Splitting 8c42fa635116. Write commit message for the first split changeset.
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   831
  EDITOR: move and modify
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   832
  EDITOR: 
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   833
  EDITOR: 
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   834
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   835
  EDITOR: HG: Leave message empty to abort commit.
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   836
  EDITOR: HG: --
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   837
  EDITOR: HG: user: test
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   838
  EDITOR: HG: branch 'default'
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   839
  EDITOR: HG: added file2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   840
  EDITOR: HG: removed file
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   841
  created new head
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   842
  diff --git a/file2 b/file2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   843
  1 hunks, 2 lines changed
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   844
  examine changes to 'file2'?
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   845
  (enter ? for help) [Ynesfdaq?] a
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   846
  
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   847
  EDITOR: HG: Splitting 8c42fa635116. So far it has been split into:
45773
84ce9ffc95ad split: use default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   848
  EDITOR: HG: - 2:478be2a70c27 tip "split1, keeping only the numbered lines"
42856
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   849
  EDITOR: HG: Write commit message for the next split changeset.
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   850
  EDITOR: move and modify
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   851
  EDITOR: 
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   852
  EDITOR: 
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   853
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   854
  EDITOR: HG: Leave message empty to abort commit.
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   855
  EDITOR: HG: --
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   856
  EDITOR: HG: user: test
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   857
  EDITOR: HG: branch 'default'
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   858
  EDITOR: HG: changed file2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   859
  saved backup bundle to $TESTTMP/issue5723-mv/.hg/strip-backup/8c42fa635116-a38044d4-split.hg (obsstore-off !)
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   860
  $ hg log -T '{desc}: {files%"{file} "}\n'
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   861
  split2, keeping the lettered lines: file2 
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   862
  split1, keeping only the numbered lines: file file2 
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   863
  initial: file 
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   864
  $ cat file2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   865
  a
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   866
  b
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   867
  1
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   868
  2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   869
  3
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   870
  4
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   871
  $ hg cat -r ".^" file2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   872
  1
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   873
  2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   874
  3
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   875
  4
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   876
  $ hg cat -r . file2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   877
  a
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   878
  b
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   879
  1
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   880
  2
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   881
  3
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   882
  4
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   883
3cf091843b4f split: handle partial commit of renames when doing split or record (issue5723)
Kyle Lippincott <spectral@google.com>
parents: 42855
diff changeset
   884
42855
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   885
Test that splitting copies works properly (issue5723)
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   886
----------------------------------------------------
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   887
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   888
  $ hg init $TESTTMP/issue5723-cp
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   889
  $ cd $TESTTMP/issue5723-cp
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   890
  $ printf '1\n2\n' > file
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   891
  $ hg ci -qAm initial
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   892
  $ hg cp file file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   893
  $ printf 'a\nb\n1\n2\n3\n4\n' > file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   894
Also modify 'file' to prove that the changes aren't being pulled in
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   895
accidentally.
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   896
  $ printf 'this is the new contents of "file"' > file
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   897
  $ cat > $TESTTMP/messages <<EOF
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   898
  > split1, keeping "file" and only the numbered lines in file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   899
  > --
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   900
  > split2, keeping the lettered lines in file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   901
  > EOF
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   902
  $ hg ci -m 'copy file->file2, modify both'
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   903
  $ printf 'f\ny\nn\na\na\n' | hg split
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   904
  diff --git a/file b/file
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   905
  1 hunks, 2 lines changed
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   906
  examine changes to 'file'?
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   907
  (enter ? for help) [Ynesfdaq?] f
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   908
  
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   909
  diff --git a/file b/file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   910
  copy from file
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   911
  copy to file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   912
  2 hunks, 4 lines changed
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   913
  examine changes to 'file' and 'file2'?
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   914
  (enter ? for help) [Ynesfdaq?] y
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   915
  
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   916
  @@ -0,0 +1,2 @@
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   917
  +a
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   918
  +b
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   919
  record change 2/3 to 'file2'?
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   920
  (enter ? for help) [Ynesfdaq?] n
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   921
  
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   922
  @@ -2,0 +5,2 @@ 2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   923
  +3
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   924
  +4
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   925
  record change 3/3 to 'file2'?
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   926
  (enter ? for help) [Ynesfdaq?] a
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   927
  
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   928
  EDITOR: HG: Splitting 41c861dfa61e. Write commit message for the first split changeset.
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   929
  EDITOR: copy file->file2, modify both
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   930
  EDITOR: 
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   931
  EDITOR: 
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   932
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   933
  EDITOR: HG: Leave message empty to abort commit.
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   934
  EDITOR: HG: --
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   935
  EDITOR: HG: user: test
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   936
  EDITOR: HG: branch 'default'
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   937
  EDITOR: HG: added file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   938
  EDITOR: HG: changed file
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   939
  created new head
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   940
  diff --git a/file2 b/file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   941
  1 hunks, 2 lines changed
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   942
  examine changes to 'file2'?
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   943
  (enter ? for help) [Ynesfdaq?] a
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   944
  
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   945
  EDITOR: HG: Splitting 41c861dfa61e. So far it has been split into:
45773
84ce9ffc95ad split: use default one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
   946
  EDITOR: HG: - 2:4b19e06610eb tip "split1, keeping "file" and only the numbered lines in file2"
42855
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   947
  EDITOR: HG: Write commit message for the next split changeset.
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   948
  EDITOR: copy file->file2, modify both
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   949
  EDITOR: 
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   950
  EDITOR: 
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   951
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   952
  EDITOR: HG: Leave message empty to abort commit.
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   953
  EDITOR: HG: --
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   954
  EDITOR: HG: user: test
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   955
  EDITOR: HG: branch 'default'
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   956
  EDITOR: HG: changed file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   957
  saved backup bundle to $TESTTMP/issue5723-cp/.hg/strip-backup/41c861dfa61e-467e8d3c-split.hg (obsstore-off !)
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   958
  $ hg log -T '{desc}: {files%"{file} "}\n'
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   959
  split2, keeping the lettered lines in file2: file2 
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   960
  split1, keeping "file" and only the numbered lines in file2: file file2 
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   961
  initial: file 
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   962
  $ cat file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   963
  a
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   964
  b
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   965
  1
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   966
  2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   967
  3
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   968
  4
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   969
  $ hg cat -r ".^" file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   970
  1
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   971
  2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   972
  3
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   973
  4
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   974
  $ hg cat -r . file2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   975
  a
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   976
  b
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   977
  1
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   978
  2
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   979
  3
1fd530b1e1cf split: handle partial commit of copies when doing split or record
Kyle Lippincott <spectral@google.com>
parents: 42566
diff changeset
   980
  4
45855
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   981
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   982
Test that color codes don't end up in the commit message template
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   983
----------------------------------------------------
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   984
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   985
  $ hg init $TESTTMP/colorless
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   986
  $ cd $TESTTMP/colorless
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   987
  $ echo 1 > file1
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   988
  $ echo 1 > file2
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   989
  $ hg ci -qAm initial
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   990
  $ echo 2 > file1
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   991
  $ echo 2 > file2
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   992
  $ cat > $TESTTMP/messages <<EOF
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   993
  > split1, modifying file1
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   994
  > --
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   995
  > split2, modifying file2
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   996
  > EOF
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   997
  $ hg ci
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   998
  EDITOR: 
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
   999
  EDITOR: 
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1000
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1001
  EDITOR: HG: Leave message empty to abort commit.
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1002
  EDITOR: HG: --
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1003
  EDITOR: HG: user: test
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1004
  EDITOR: HG: branch 'default'
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1005
  EDITOR: HG: changed file1
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1006
  EDITOR: HG: changed file2
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1007
  $ printf 'f\nn\na\n' | hg split --color=debug \
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1008
  > --config command-templates.oneline-summary='{label("rev", rev)} {desc}'
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1009
  [diff.diffline|diff --git a/file1 b/file1]
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1010
  1 hunks, 1 lines changed
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1011
  [ ui.prompt|examine changes to 'file1'?
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1012
  (enter ? for help) [Ynesfdaq?]] [ ui.promptecho|f]
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1013
  
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1014
  [diff.diffline|diff --git a/file2 b/file2]
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1015
  1 hunks, 1 lines changed
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1016
  [ ui.prompt|examine changes to 'file2'?
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1017
  (enter ? for help) [Ynesfdaq?]] [ ui.promptecho|n]
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1018
  
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1019
  EDITOR: HG: Splitting 6432c65c3078. Write commit message for the first split changeset.
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1020
  EDITOR: split1, modifying file1
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1021
  EDITOR: 
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1022
  EDITOR: 
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1023
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1024
  EDITOR: HG: Leave message empty to abort commit.
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1025
  EDITOR: HG: --
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1026
  EDITOR: HG: user: test
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1027
  EDITOR: HG: branch 'default'
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1028
  EDITOR: HG: changed file1
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1029
  [ ui.status|created new head]
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1030
  [diff.diffline|diff --git a/file2 b/file2]
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1031
  1 hunks, 1 lines changed
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1032
  [ ui.prompt|examine changes to 'file2'?
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1033
  (enter ? for help) [Ynesfdaq?]] [ ui.promptecho|a]
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1034
  
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1035
  EDITOR: HG: Splitting 6432c65c3078. So far it has been split into:
45856
8357e0e81bb7 split: disable color while rendering template for use in commit message
Martin von Zweigbergk <martinvonz@google.com>
parents: 45855
diff changeset
  1036
  EDITOR: HG: - 2 split2, modifying file2
45855
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1037
  EDITOR: HG: Write commit message for the next split changeset.
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1038
  EDITOR: split1, modifying file1
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1039
  EDITOR: 
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1040
  EDITOR: 
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1041
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1042
  EDITOR: HG: Leave message empty to abort commit.
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1043
  EDITOR: HG: --
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1044
  EDITOR: HG: user: test
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1045
  EDITOR: HG: branch 'default'
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1046
  EDITOR: HG: changed file2
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1047
  [ ui.warning|transaction abort!]
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1048
  [ ui.warning|rollback completed]
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1049
  [ ui.error|abort: empty commit message]
c10683da6889 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
  1050
  [10]
46922
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1051
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1052
Test that creating an empty split or "no-op"
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1053
(identical to original) commit doesn't cause chaos
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1054
--------------------------------------------------
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1055
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1056
  $ hg init $TESTTMP/noop
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1057
  $ cd $TESTTMP/noop
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1058
  $ echo r0 > r0
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1059
  $ hg ci -qAm r0
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1060
  $ hg phase -p
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1061
  $ echo foo > foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1062
  $ hg ci -qAm foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1063
  $ hg log -G -T'{phase} {rev}:{node|short} {desc}'
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1064
  @  draft 1:ae694b2901bb foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1065
  |
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1066
  o  public 0:222799e2f90b r0
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1067
  
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1068
  $ printf 'd\na\n' | HGEDITOR=cat hg split || true
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1069
  diff --git a/foo b/foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1070
  new file mode 100644
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1071
  examine changes to 'foo'?
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1072
  (enter ? for help) [Ynesfdaq?] d
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1073
  
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1074
  no changes to record
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1075
  diff --git a/foo b/foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1076
  new file mode 100644
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1077
  examine changes to 'foo'?
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1078
  (enter ? for help) [Ynesfdaq?] a
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1079
  
46923
8ee1ac083ee7 split: fix issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46922
diff changeset
  1080
  HG: Splitting ae694b2901bb. Write commit message for the first split changeset.
46922
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1081
  foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1082
  
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1083
  
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1084
  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1085
  HG: Leave message empty to abort commit.
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1086
  HG: --
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1087
  HG: user: test
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1088
  HG: branch 'default'
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1089
  HG: added foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1090
  warning: commit already existed in the repository!
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1091
  $ hg log -G -T'{phase} {rev}:{node|short} {desc}'
46924
ca0049946e9a split: avoid strip if split is a no-op (identical to original)
Kyle Lippincott <spectral@google.com>
parents: 46923
diff changeset
  1092
  @  draft 1:ae694b2901bb foo
ca0049946e9a split: avoid strip if split is a no-op (identical to original)
Kyle Lippincott <spectral@google.com>
parents: 46923
diff changeset
  1093
  |
46923
8ee1ac083ee7 split: fix issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46922
diff changeset
  1094
  o  public 0:222799e2f90b r0
46922
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1095
  
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1096
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1097
Now try the same thing but modifying the message so we don't trigger the
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1098
identical changeset failures
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1099
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1100
  $ hg init $TESTTMP/noop2
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1101
  $ cd $TESTTMP/noop2
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1102
  $ echo r0 > r0
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1103
  $ hg ci -qAm r0
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1104
  $ hg phase -p
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1105
  $ echo foo > foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1106
  $ hg ci -qAm foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1107
  $ hg log -G -T'{phase} {rev}:{node|short} {desc}'
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1108
  @  draft 1:ae694b2901bb foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1109
  |
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1110
  o  public 0:222799e2f90b r0
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1111
  
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1112
  $ cat > $TESTTMP/messages <<EOF
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1113
  > message1
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1114
  > EOF
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1115
  $ printf 'd\na\n' | HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py" hg split
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1116
  diff --git a/foo b/foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1117
  new file mode 100644
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1118
  examine changes to 'foo'?
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1119
  (enter ? for help) [Ynesfdaq?] d
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1120
  
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1121
  no changes to record
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1122
  diff --git a/foo b/foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1123
  new file mode 100644
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1124
  examine changes to 'foo'?
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1125
  (enter ? for help) [Ynesfdaq?] a
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1126
  
46923
8ee1ac083ee7 split: fix issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46922
diff changeset
  1127
  EDITOR: HG: Splitting ae694b2901bb. Write commit message for the first split changeset.
46922
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1128
  EDITOR: foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1129
  EDITOR: 
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1130
  EDITOR: 
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1131
  EDITOR: HG: Enter commit message.  Lines beginning with 'HG:' are removed.
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1132
  EDITOR: HG: Leave message empty to abort commit.
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1133
  EDITOR: HG: --
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1134
  EDITOR: HG: user: test
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1135
  EDITOR: HG: branch 'default'
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1136
  EDITOR: HG: added foo
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1137
  created new head
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1138
  saved backup bundle to $TESTTMP/noop2/.hg/strip-backup/ae694b2901bb-28e0b457-split.hg (obsstore-off !)
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1139
  $ hg log -G -T'{phase} {rev}:{node|short} {desc}'
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1140
  @  draft 1:de675559d3f9 message1 (obsstore-off !)
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1141
  @  draft 2:de675559d3f9 message1 (obsstore-on !)
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1142
  |
46923
8ee1ac083ee7 split: fix issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46922
diff changeset
  1143
  o  public 0:222799e2f90b r0
46922
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1144
  
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1145
#if obsstore-on
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1146
  $ hg debugobsolete
46923
8ee1ac083ee7 split: fix issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46922
diff changeset
  1147
  ae694b2901bb8b0f8c4b5e075ddec0d63468d57a de675559d3f93ffc822c6eb7490e5c73033f17c7 0 * (glob)
46922
17368844f786 split: add test demonstrating issue with empty splits adjusting phases
Kyle Lippincott <spectral@google.com>
parents: 46071
diff changeset
  1148
#endif