tests/test-split.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 12 Dec 2018 17:22:58 +0100
changeset 4294 8974a05a49fa
parent 4293 d4902d48d095
child 4298 a98fa6c0d4f3
permissions -rw-r--r--
split: rework the prompt to be more standard We dropped the initial capital and moved to a positive question.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     1
test of the split command
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     2
-----------------------
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     3
2775
1d16c9dcb825 test: use common setup for test-split.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2771
diff changeset
     4
  $ . $TESTDIR/testlib/common.sh
1d16c9dcb825 test: use common setup for test-split.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2771
diff changeset
     5
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     6
  $ cat >> $HGRCPATH <<EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     7
  > [defaults]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     8
  > amend=-d "0 0"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
     9
  > fold=-d "0 0"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    10
  > split=-d "0 0"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    11
  > amend=-d "0 0"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    12
  > [web]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    13
  > push_ssl = false
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    14
  > allow_push = *
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    15
  > [phases]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    16
  > publish = False
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    17
  > [diff]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    18
  > git = 1
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    19
  > unified = 0
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    20
  > [ui]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    21
  > interactive = true
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    22
  > [extensions]
2775
1d16c9dcb825 test: use common setup for test-split.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2771
diff changeset
    23
  > evolve =
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    24
  > EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    25
  $ mkcommit() {
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    26
  >    echo "$1" > "$1"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    27
  >    hg add "$1"
2659
166ca0aba0ea split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2587
diff changeset
    28
  >    hg ci -m "add $1" $2 $3
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    29
  > }
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    30
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    31
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    32
Basic case, split a head
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    33
  $ hg init testsplit
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    34
  $ cd testsplit
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    35
  $ mkcommit _a
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    36
  $ mkcommit _b
2659
166ca0aba0ea split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2587
diff changeset
    37
  $ mkcommit _c --user other-test-user
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    38
  $ mkcommit _d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    39
  $ echo "change to a" >> _a
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    40
  $ hg amend
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    41
  $ hg debugobsolete
3015
4b951a9a6895 tests: update test output with commit ecc96506c49d in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
    42
  1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    43
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    44
To create commits with the number of split
1482
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
    45
  $ echo 0 > num
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
    46
  $ cat > editor.sh << '__EOF__'
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
    47
  > NUM=$(cat num)
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
    48
  > NUM=`expr "$NUM" + 1`
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
    49
  > echo "$NUM" > num
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
    50
  > echo "split$NUM" > "$1"
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
    51
  > __EOF__
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
    52
  $ export HGEDITOR="\"sh\" \"editor.sh\""
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    53
  $ hg split << EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    54
  > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    55
  > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    56
  > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    57
  > n
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
    58
  > Y
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    59
  > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    60
  > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    61
  > EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    62
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    63
  reverting _a
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    64
  adding _d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    65
  diff --git a/_a b/_a
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    66
  1 hunks, 1 lines changed
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    67
  examine changes to '_a'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    68
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    69
  @@ -1,0 +2,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    70
  +change to a
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    71
  record change 1/2 to '_a'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    72
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    73
  diff --git a/_d b/_d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    74
  new file mode 100644
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    75
  examine changes to '_d'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    76
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    77
  @@ -0,0 +1,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    78
  +_d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    79
  record change 2/2 to '_d'? [Ynesfdaq?] n
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    80
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    81
  created new head
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
    82
  continue splitting? [Ycdq?] Y
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    83
  diff --git a/_d b/_d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    84
  new file mode 100644
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    85
  examine changes to '_d'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    86
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    87
  @@ -0,0 +1,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    88
  +_d
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    89
  record this change to '_d'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    90
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    91
  no more change to split
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    92
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
    93
  $ hg debugobsolete
3015
4b951a9a6895 tests: update test output with commit ecc96506c49d in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
    94
  1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
3567
5ddea3b8d2a4 split: include "operation" metadata in obsmarkers
Martin von Zweigbergk <martinvonz@google.com>
parents: 3562
diff changeset
    95
  d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'split', 'user': 'test'}
2776
4dd84054ebbb test: remove reference to the graphlog extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2775
diff changeset
    96
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    97
  @  changeset:   6:033b3f5ae73d
1482
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
    98
  |  tag:         tip
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
    99
  |  user:        test
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   100
  |  date:        Thu Jan 01 00:00:00 1970 +0000
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   101
  |  summary:     split2
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   102
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   103
  o  changeset:   5:2d8abdb827cd
2659
166ca0aba0ea split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2587
diff changeset
   104
  |  parent:      2:52149352b372
1482
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   105
  |  user:        test
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   106
  |  date:        Thu Jan 01 00:00:00 1970 +0000
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   107
  |  summary:     split1
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   108
  |
2659
166ca0aba0ea split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2587
diff changeset
   109
  o  changeset:   2:52149352b372
166ca0aba0ea split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2587
diff changeset
   110
  |  user:        other-test-user
1482
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   111
  |  date:        Thu Jan 01 00:00:00 1970 +0000
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   112
  |  summary:     add _c
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   113
  |
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   114
  o  changeset:   1:37445b16603b
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   115
  |  user:        test
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   116
  |  date:        Thu Jan 01 00:00:00 1970 +0000
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   117
  |  summary:     add _b
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   118
  |
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   119
  o  changeset:   0:135f39f4bd78
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   120
     user:        test
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   121
     date:        Thu Jan 01 00:00:00 1970 +0000
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   122
     summary:     add _a
c7726b19c7a0 split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents: 1478
diff changeset
   123
  
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   124
1672
1b2efccfa4f3 Spelling: committed
timeless@gmail.com
parents: 1641
diff changeset
   125
Cannot split a commit with uncommitted changes
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   126
  $ hg up "desc(_c)"
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   127
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   128
  $ echo "_cd" > _c
2576
bfc563aaac2a effectflag: activate effect flag on test-split.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
   129
  $ hg split
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   130
  abort: uncommitted changes
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   131
  [255]
2786
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   132
  $ hg up "desc(_c)" -C
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   133
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   134
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   135
Cannot split public changeset
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   136
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   137
  $ hg phase --rev 'desc("_a")'
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   138
  0: draft
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   139
  $ hg phase --rev 'desc("_a")' --public
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   140
  $ hg split --rev 'desc("_a")'
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   141
  abort: cannot split public changesets: 135f39f4bd78
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   142
  (see 'hg help phases' for details)
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   143
  [255]
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   144
  $ hg phase --rev 'desc("_a")' --draft --force
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   145
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   146
Split a revision specified with -r
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   147
  $ echo "change to b" >> _b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   148
  $ hg amend -m "_cprim"
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   149
  2 new orphan changesets
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   150
  $ hg evolve --all
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   151
  move:[5] split1
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   152
  atop:[7] _cprim
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   153
  move:[6] split2
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   154
  working directory is now at * (glob)
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   155
  $ hg log -r "desc(_cprim)" -v -p
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   156
  changeset:   7:b434287e665c
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   157
  parent:      1:37445b16603b
2659
166ca0aba0ea split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2587
diff changeset
   158
  user:        other-test-user
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   159
  date:        Thu Jan 01 00:00:00 1970 +0000
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   160
  files:       _b _c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   161
  description:
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   162
  _cprim
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   163
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   164
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   165
  diff --git a/_b b/_b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   166
  --- a/_b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   167
  +++ b/_b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   168
  @@ -1,0 +2,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   169
  +change to b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   170
  diff --git a/_c b/_c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   171
  new file mode 100644
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   172
  --- /dev/null
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   173
  +++ b/_c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   174
  @@ -0,0 +1,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   175
  +_c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   176
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   177
  $ hg split -r "desc(_cprim)" <<EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   178
  > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   179
  > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   180
  > y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   181
  > n
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   182
  > c
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   183
  > EOF
1484
e3484e9632cd split: don't update before it is actually needed
Laurent Charignon <lcharignon@fb.com>
parents: 1483
diff changeset
   184
  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   185
  reverting _b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   186
  adding _c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   187
  diff --git a/_b b/_b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   188
  1 hunks, 1 lines changed
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   189
  examine changes to '_b'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   190
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   191
  @@ -1,0 +2,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   192
  +change to b
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   193
  record change 1/2 to '_b'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   194
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   195
  diff --git a/_c b/_c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   196
  new file mode 100644
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   197
  examine changes to '_c'? [Ynesfdaq?] y
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   198
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   199
  @@ -0,0 +1,1 @@
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   200
  +_c
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   201
  record change 2/2 to '_c'? [Ynesfdaq?] n
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   202
  
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   203
  created new head
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   204
  continue splitting? [Ycdq?] c
3431
2e703ed1c713 evolve: update output for wider reporting of troubled changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 3270
diff changeset
   205
  2 new orphan changesets
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   206
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   207
Stop before splitting the commit completely creates a commit with all the
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   208
remaining changes
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   209
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   210
  $ hg debugobsolete
3015
4b951a9a6895 tests: update test output with commit ecc96506c49d in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   211
  1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'}
3567
5ddea3b8d2a4 split: include "operation" metadata in obsmarkers
Martin von Zweigbergk <martinvonz@google.com>
parents: 3562
diff changeset
   212
  d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'split', 'user': 'test'}
3015
4b951a9a6895 tests: update test output with commit ecc96506c49d in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   213
  52149352b372d39b19127d5bd2d488b1b63f9f85 b434287e665ce757ee5463a965cb3d119ca9e893 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '9', 'operation': 'amend', 'user': 'test'}
3562
fe16284cd95a evolve: include "operation" metadata in obsmarkers
Martin von Zweigbergk <martinvonz@google.com>
parents: 3559
diff changeset
   214
  2d8abdb827cdf71ca477ef6985d7ceb257c53c1b e2b4afde39803bd42bb1374b230fca1b1e8cc868 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
fe16284cd95a evolve: include "operation" metadata in obsmarkers
Martin von Zweigbergk <martinvonz@google.com>
parents: 3559
diff changeset
   215
  033b3f5ae73db67c10de938fb6f26b949aaef172 bb5e4f6020c74e7961a51fda635ea9df9b04dda8 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'evolve', 'user': 'test'}
3567
5ddea3b8d2a4 split: include "operation" metadata in obsmarkers
Martin von Zweigbergk <martinvonz@google.com>
parents: 3562
diff changeset
   216
  b434287e665ce757ee5463a965cb3d119ca9e893 ead2066d1dbf14833fe1069df1b735e4e9468c40 1188c4216eba37f18a1de6558564601d00ff2143 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '13', 'operation': 'split', 'user': 'test'}
1483
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   217
  $ hg evolve --all
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   218
  move:[8] split1
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   219
  atop:[11] split4
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   220
  move:[9] split2
2659
166ca0aba0ea split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2587
diff changeset
   221
  working directory is now at d74c6715e706
2776
4dd84054ebbb test: remove reference to the graphlog extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2775
diff changeset
   222
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   223
  @  changeset:   13:d74c6715e706
1483
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   224
  |  tag:         tip
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   225
  |  user:        test
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   226
  |  date:        Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   227
  |  summary:     split2
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   228
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   229
  o  changeset:   12:3f134f739075
1483
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   230
  |  user:        test
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   231
  |  date:        Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   232
  |  summary:     split1
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   233
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   234
  o  changeset:   11:1188c4216eba
2659
166ca0aba0ea split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2587
diff changeset
   235
  |  user:        other-test-user
1483
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   236
  |  date:        Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   237
  |  summary:     split4
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   238
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   239
  o  changeset:   10:ead2066d1dbf
1483
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   240
  |  parent:      1:37445b16603b
2659
166ca0aba0ea split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2587
diff changeset
   241
  |  user:        other-test-user
1483
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   242
  |  date:        Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   243
  |  summary:     split3
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   244
  |
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   245
  o  changeset:   1:37445b16603b
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   246
  |  user:        test
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   247
  |  date:        Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   248
  |  summary:     add _b
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   249
  |
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   250
  o  changeset:   0:135f39f4bd78
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   251
     user:        test
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   252
     date:        Thu Jan 01 00:00:00 1970 +0000
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   253
     summary:     add _a
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   254
  
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   255
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   256
Split should move bookmarks on the last split successor and preserve the
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   257
active bookmark as active
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   258
  $ hg book bookA
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   259
  $ hg book bookB
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   260
  $ echo "changetofilea" > _a
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   261
  $ hg amend
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   262
  $ hg book
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   263
     bookA                     14:7a6b35779b85
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   264
   * bookB                     14:7a6b35779b85
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   265
  $ hg log -G -r "3f134f739075::"
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   266
  @  changeset:   14:7a6b35779b85
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   267
  |  bookmark:    bookA
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   268
  |  bookmark:    bookB
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   269
  |  tag:         tip
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   270
  |  parent:      12:3f134f739075
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   271
  |  user:        test
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   272
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   273
  |  summary:     split2
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   274
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   275
  o  changeset:   12:3f134f739075
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   276
  |  user:        test
1641
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
   277
  ~  date:        Thu Jan 01 00:00:00 1970 +0000
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
   278
     summary:     split1
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
   279
  
2770
a9ea16a1f4dc split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2667
diff changeset
   280
  $ hg split --user victor <<EOF
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   281
  > y
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   282
  > y
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   283
  > n
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   284
  > c
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   285
  > EOF
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   286
  (leaving bookmark bookB)
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   287
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   288
  reverting _a
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   289
  adding _d
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   290
  diff --git a/_a b/_a
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   291
  1 hunks, 2 lines changed
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   292
  examine changes to '_a'? [Ynesfdaq?] y
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   293
  
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   294
  @@ -1,2 +1,1 @@
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   295
  -_a
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   296
  -change to a
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   297
  +changetofilea
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   298
  record change 1/2 to '_a'? [Ynesfdaq?] y
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   299
  
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   300
  diff --git a/_d b/_d
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   301
  new file mode 100644
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   302
  examine changes to '_d'? [Ynesfdaq?] n
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   303
  
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   304
  created new head
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   305
  continue splitting? [Ycdq?] c
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   306
  $ hg log -G -r "3f134f739075::"
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   307
  @  changeset:   16:452a26648478
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   308
  |  bookmark:    bookA
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   309
  |  bookmark:    bookB
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   310
  |  tag:         tip
2770
a9ea16a1f4dc split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2667
diff changeset
   311
  |  user:        victor
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   312
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   313
  |  summary:     split6
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   314
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   315
  o  changeset:   15:1315679b77dc
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   316
  |  parent:      12:3f134f739075
2770
a9ea16a1f4dc split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2667
diff changeset
   317
  |  user:        victor
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   318
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   319
  |  summary:     split5
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   320
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   321
  o  changeset:   12:3f134f739075
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   322
  |  user:        test
1641
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
   323
  ~  date:        Thu Jan 01 00:00:00 1970 +0000
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
   324
     summary:     split1
27445da063b7 tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1598
diff changeset
   325
  
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   326
  $ hg book
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   327
     bookA                     16:452a26648478
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   328
   * bookB                     16:452a26648478
1485
1ba64be11bf8 split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents: 1484
diff changeset
   329
 
1598
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   330
Lastest revision is selected if multiple are given to -r
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   331
  $ hg split -r "desc(_a)::"
1598
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   332
  (leaving bookmark bookB)
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   333
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   334
  adding _d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   335
  diff --git a/_d b/_d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   336
  new file mode 100644
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   337
  examine changes to '_d'? [Ynesfdaq?] abort: response expected
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   338
  [255]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   339
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   340
Cannot split a commit that is not a head if instability is not allowed
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   341
  $ cat >> $HGRCPATH <<EOF
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   342
  > [experimental]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   343
  > evolution=createmarkers
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   344
  > evolutioncommands=split
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   345
  > EOF
1483
dc1467a629ca split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents: 1482
diff changeset
   346
  $ hg split -r "desc(split3)"
2786
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   347
  abort: split will orphan 4 descendants
ae690d39fc92 split: use precheck to validate revision
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2776
diff changeset
   348
  (see 'hg help evolution.instability')
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   349
  [255]
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   350
1598
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   351
Changing evolution level to createmarkers
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   352
  $ echo "[experimental]" >> $HGRCPATH
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   353
  $ echo "evolution=createmarkers" >> $HGRCPATH
1478
9603aa1ecdfd evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff changeset
   354
1598
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   355
Running split without any revision operates on the parent of the working copy
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   356
  $ hg split << EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   357
  > q
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   358
  > EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   359
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   360
  adding _d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   361
  diff --git a/_d b/_d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   362
  new file mode 100644
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   363
  examine changes to '_d'? [Ynesfdaq?] q
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   364
  
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   365
  abort: user quit
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   366
  [255]
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   367
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   368
Running split with tip revision, specified as unnamed argument
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   369
  $ hg split . << EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   370
  > q
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   371
  > EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   372
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   373
  adding _d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   374
  diff --git a/_d b/_d
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   375
  new file mode 100644
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   376
  examine changes to '_d'? [Ynesfdaq?] q
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   377
  
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   378
  abort: user quit
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   379
  [255]
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   380
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   381
Running split with both unnamed and named revision arguments shows an error msg
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   382
  $ hg split . --rev .^ << EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   383
  > q
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   384
  > EOF
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   385
  abort: more than one revset is given
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   386
  (use either `hg split <rs>` or `hg split --rev <rs>`, not both)
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   387
  [255]
2a08ef812b84 evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents: 1485
diff changeset
   388
1738
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
   389
Split empty commit (issue5191)
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
   390
  $ hg branch new-branch
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
   391
  marked working directory as branch new-branch
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
   392
  (branches are permanent and global, did you want a bookmark?)
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
   393
  $ hg commit -m "empty"
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
   394
  $ hg split
cb5edd4b160c split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents: 1672
diff changeset
   395
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2667
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   396
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   397
Check that split keeps the right topic
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   398
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   399
  $ hg up -r tip
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   400
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   401
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   402
Add topic to the hgrc
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   403
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   404
  $ echo "[extensions]" >> $HGRCPATH
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   405
  $ echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/" >> $HGRCPATH
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   406
  $ hg topic mytopic
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2929
diff changeset
   407
  marked working directory as topic: mytopic
2667
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   408
  $ echo babar > babar
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   409
  $ echo celeste > celeste
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   410
  $ hg add babar celeste
2771
6044bd16bfb7 split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2770
diff changeset
   411
  $ hg commit -m "Works on mytopic" babar celeste --user victor
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2985
diff changeset
   412
  active topic 'mytopic' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3567
diff changeset
   413
  (see 'hg help topics' for more information)
2771
6044bd16bfb7 split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2770
diff changeset
   414
  $ hg log -r . 
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   415
  changeset:   18:26f72cfaf036
2771
6044bd16bfb7 split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2770
diff changeset
   416
  branch:      new-branch
6044bd16bfb7 split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2770
diff changeset
   417
  tag:         tip
6044bd16bfb7 split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2770
diff changeset
   418
  topic:       mytopic
6044bd16bfb7 split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2770
diff changeset
   419
  user:        victor
6044bd16bfb7 split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2770
diff changeset
   420
  date:        Thu Jan 01 00:00:00 1970 +0000
6044bd16bfb7 split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2770
diff changeset
   421
  summary:     Works on mytopic
6044bd16bfb7 split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2770
diff changeset
   422
  
2667
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   423
  $ hg summary
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   424
  parent: 18:26f72cfaf036 tip
2667
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   425
   Works on mytopic
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   426
  branch: new-branch
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   427
  commit: 2 unknown (clean)
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   428
  update: (current)
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   429
  phases: 9 draft
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   430
  topic:  mytopic
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   431
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   432
Split it
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   433
2771
6044bd16bfb7 split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2770
diff changeset
   434
  $ hg split -U << EOF
2667
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   435
  > Y
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   436
  > Y
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   437
  > N
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   438
  > c
2667
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   439
  > Y
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   440
  > Y
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   441
  > EOF
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   442
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   443
  adding babar
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   444
  adding celeste
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   445
  diff --git a/babar b/babar
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   446
  new file mode 100644
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   447
  examine changes to 'babar'? [Ynesfdaq?] Y
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   448
  
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   449
  @@ -0,0 +1,1 @@
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   450
  +babar
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   451
  record change 1/2 to 'babar'? [Ynesfdaq?] Y
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   452
  
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   453
  diff --git a/celeste b/celeste
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   454
  new file mode 100644
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   455
  examine changes to 'celeste'? [Ynesfdaq?] N
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   456
  
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   457
  continue splitting? [Ycdq?] c
2667
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   458
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   459
Check that the topic is still here
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   460
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   461
  $ hg log -r "tip~1::"
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   462
  changeset:   19:addcf498f19e
2667
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   463
  branch:      new-branch
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   464
  topic:       mytopic
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   465
  parent:      17:fdb403258632
2667
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   466
  user:        test
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   467
  date:        Thu Jan 01 00:00:00 1970 +0000
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   468
  summary:     split7
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   469
  
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   470
  changeset:   20:2532b288af61
2667
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   471
  branch:      new-branch
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   472
  tag:         tip
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   473
  topic:       mytopic
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   474
  user:        test
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   475
  date:        Thu Jan 01 00:00:00 1970 +0000
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   476
  summary:     split8
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   477
  
e7079bba383d topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents: 2659
diff changeset
   478
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3015
diff changeset
   479
   * mytopic (2 changesets)
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   480
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   481
Test split the first commit on a branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   482
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   483
  $ touch SPLIT1 SPLIT2
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   484
  $ hg add SPLIT1 SPLIT2
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   485
  $ hg branch another-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   486
  marked working directory as branch another-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   487
  $ hg commit -m "To be splitted"
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   488
  $ hg log -G -l 3
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   489
  @  changeset:   21:8dad923bdb9b
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   490
  |  branch:      another-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   491
  |  tag:         tip
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   492
  |  topic:       mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   493
  |  user:        test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   494
  |  date:        Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   495
  |  summary:     To be splitted
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   496
  |
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   497
  o  changeset:   20:2532b288af61
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   498
  |  branch:      new-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   499
  |  topic:       mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   500
  |  user:        test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   501
  |  date:        Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   502
  |  summary:     split8
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   503
  |
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   504
  o  changeset:   19:addcf498f19e
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   505
  |  branch:      new-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   506
  ~  topic:       mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   507
     parent:      17:fdb403258632
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   508
     user:        test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   509
     date:        Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   510
     summary:     split7
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   511
  
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   512
  $ hg export .
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   513
  # HG changeset patch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   514
  # User test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   515
  # Date 0 0
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   516
  #      Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   517
  # Branch another-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   518
  # Node ID 8dad923bdb9bb3b99291caa5baeb03bbc30dfd33
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   519
  # Parent  2532b288af61bd19239a95ae2a3ecb9b0ad4b8e1
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   520
  # EXP-Topic mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   521
  To be splitted
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   522
  
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   523
  diff --git a/SPLIT1 b/SPLIT1
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   524
  new file mode 100644
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   525
  diff --git a/SPLIT2 b/SPLIT2
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   526
  new file mode 100644
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   527
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   528
  $ hg split -r . << EOF
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   529
  > Y
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   530
  > N
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   531
  > Y
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   532
  > Y
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   533
  > EOF
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   534
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   535
  adding SPLIT1
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   536
  adding SPLIT2
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   537
  diff --git a/SPLIT1 b/SPLIT1
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   538
  new file mode 100644
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   539
  examine changes to 'SPLIT1'? [Ynesfdaq?] Y
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   540
  
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   541
  diff --git a/SPLIT2 b/SPLIT2
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   542
  new file mode 100644
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   543
  examine changes to 'SPLIT2'? [Ynesfdaq?] N
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   544
  
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   545
  continue splitting? [Ycdq?] Y
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   546
  diff --git a/SPLIT2 b/SPLIT2
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   547
  new file mode 100644
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   548
  examine changes to 'SPLIT2'? [Ynesfdaq?] Y
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   549
  
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   550
  no more change to split
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   551
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   552
The splitted changesets should be on the 'another-branch'
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   553
  $ hg log -G -l 3
3270
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   554
  @  changeset:   23:56a59faa8af7
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   555
  |  branch:      another-branch
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   556
  |  tag:         tip
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   557
  |  topic:       mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   558
  |  user:        test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   559
  |  date:        Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   560
  |  summary:     split10
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   561
  |
3270
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   562
  o  changeset:   22:75695e3e2300
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   563
  |  branch:      another-branch
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   564
  |  topic:       mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   565
  |  parent:      20:2532b288af61
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   566
  |  user:        test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   567
  |  date:        Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   568
  |  summary:     split9
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   569
  |
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   570
  o  changeset:   20:2532b288af61
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   571
  |  branch:      new-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   572
  ~  topic:       mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   573
     user:        test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   574
     date:        Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   575
     summary:     split8
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   576
  
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   577
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   578
Try splitting the first changeset of a branch then cancel
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   579
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   580
  $ hg branch yet-another-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   581
  marked working directory as branch yet-another-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   582
  $ touch SPLIT3 SPLIT4
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   583
  $ hg add SPLIT3 SPLIT4
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   584
  $ hg commit -m "To be splitted again"
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   585
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   586
  $ hg up "tip~1"
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   587
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   588
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   589
  $ hg log -G -l 2
3270
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   590
  o  changeset:   24:b1020d17c364
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   591
  |  branch:      yet-another-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   592
  |  tag:         tip
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   593
  |  topic:       mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   594
  |  user:        test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   595
  |  date:        Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   596
  |  summary:     To be splitted again
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   597
  |
3270
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   598
  @  changeset:   23:56a59faa8af7
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   599
  |  branch:      another-branch
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   600
  ~  topic:       mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   601
     user:        test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   602
     date:        Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   603
     summary:     split10
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   604
  
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   605
  $ hg branch
3270
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   606
  another-branch
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   607
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   608
  $ hg split -r tip << EOF
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   609
  > Y
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   610
  > q
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   611
  > EOF
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   612
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   613
  adding SPLIT3
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   614
  adding SPLIT4
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   615
  diff --git a/SPLIT3 b/SPLIT3
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   616
  new file mode 100644
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   617
  examine changes to 'SPLIT3'? [Ynesfdaq?] Y
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   618
  
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   619
  diff --git a/SPLIT4 b/SPLIT4
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   620
  new file mode 100644
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   621
  examine changes to 'SPLIT4'? [Ynesfdaq?] q
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   622
  
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   623
  abort: user quit
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   624
  [255]
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   625
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   626
  $ hg branch
3270
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   627
  another-branch
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   628
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   629
  $ hg log -G -l 2
3270
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   630
  o  changeset:   24:b1020d17c364
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   631
  |  branch:      yet-another-branch
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   632
  |  tag:         tip
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   633
  |  topic:       mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   634
  |  user:        test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   635
  |  date:        Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   636
  |  summary:     To be splitted again
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   637
  |
3270
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   638
  @  changeset:   23:56a59faa8af7
e6150b9b88d9 split: force the branch to fix the split bug
Boris Feld <boris.feld@octobus.net>
parents: 3269
diff changeset
   639
  |  branch:      another-branch
3269
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   640
  ~  topic:       mytopic
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   641
     user:        test
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   642
     date:        Thu Jan 01 00:00:00 1970 +0000
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   643
     summary:     split10
e6b980687311 split: add a test demonstrating that split doesn't take the right branch
Boris Feld <boris.feld@octobus.net>
parents: 3060
diff changeset
   644
  
4291
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   645
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   646
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   647
Check prompt options
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   648
--------------------
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   649
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   650
Look at the help (both record and split helps)
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   651
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   652
  $ hg split -r tip << EOF
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   653
  > Y
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   654
  > ?
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   655
  > d
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   656
  > ?
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   657
  > q
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   658
  > EOF
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   659
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   660
  adding SPLIT3
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   661
  adding SPLIT4
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   662
  diff --git a/SPLIT3 b/SPLIT3
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   663
  new file mode 100644
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   664
  examine changes to 'SPLIT3'? [Ynesfdaq?] Y
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   665
  
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   666
  diff --git a/SPLIT4 b/SPLIT4
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   667
  new file mode 100644
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   668
  examine changes to 'SPLIT4'? [Ynesfdaq?] ?
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   669
  
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   670
  y - yes, record this change
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   671
  n - no, skip this change
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   672
  e - edit this change manually
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   673
  s - skip remaining changes to this file
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   674
  f - record remaining changes to this file
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   675
  d - done, skip remaining changes and files
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   676
  a - record all changes to all remaining files
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   677
  q - quit, recording no changes
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   678
  ? - ? (display help)
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   679
  examine changes to 'SPLIT4'? [Ynesfdaq?] d
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   680
  
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   681
  continue splitting? [Ycdq?] ?
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   682
  y - yes, continue selection
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   683
  c - commit, select all remaining changes
4293
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   684
  d - discard, discard remaining changes
4292
caaa89adf3eb split: add a way to abort a split from the prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4291
diff changeset
   685
  q - quit, abort the split
4291
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   686
  ? - ?, display help
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   687
  continue splitting? [Ycdq?] q
4291
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   688
  transaction abort!
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   689
  rollback completed
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   690
  abort: user quit
8f54ab5dd4e2 split: add a help entry to the final prompt
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4122
diff changeset
   691
  [255]
4293
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   692
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   693
discard some of changeset during split
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   694
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   695
  $ cat >> $HGRCPATH <<EOF
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   696
  > [experimental]
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   697
  > evolution=all
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   698
  > evolutioncommands=
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   699
  > EOF
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   700
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   701
  $ hg export
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   702
  # HG changeset patch
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   703
  # User test
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   704
  # Date 0 0
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   705
  #      Thu Jan 01 00:00:00 1970 +0000
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   706
  # Branch another-branch
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   707
  # Node ID 56a59faa8af70dc104faa905231731ffece5f18a
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   708
  # Parent  75695e3e2300d316cc515c4c25bab8b825ef1433
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   709
  # EXP-Topic mytopic
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   710
  split10
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   711
  
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   712
  diff --git a/SPLIT2 b/SPLIT2
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   713
  new file mode 100644
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   714
  $ hg add SPLIT3
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   715
  $ hg amend
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   716
  1 new orphan changesets
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   717
  $ hg export
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   718
  # HG changeset patch
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   719
  # User test
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   720
  # Date 0 0
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   721
  #      Thu Jan 01 00:00:00 1970 +0000
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   722
  # Branch another-branch
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   723
  # Node ID 3acb634dc68ddb4dea75a9cee982955bc1f3e8cd
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   724
  # Parent  75695e3e2300d316cc515c4c25bab8b825ef1433
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   725
  # EXP-Topic mytopic
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   726
  split10
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   727
  
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   728
  diff --git a/SPLIT2 b/SPLIT2
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   729
  new file mode 100644
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   730
  diff --git a/SPLIT3 b/SPLIT3
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   731
  new file mode 100644
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   732
  $ hg split << EOF
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   733
  > Y
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   734
  > d
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   735
  > d
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   736
  > EOF
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   737
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   738
  adding SPLIT2
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   739
  adding SPLIT3
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   740
  diff --git a/SPLIT2 b/SPLIT2
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   741
  new file mode 100644
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   742
  examine changes to 'SPLIT2'? [Ynesfdaq?] Y
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   743
  
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   744
  diff --git a/SPLIT3 b/SPLIT3
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   745
  new file mode 100644
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   746
  examine changes to 'SPLIT3'? [Ynesfdaq?] d
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   747
  
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   748
  continue splitting? [Ycdq?] d
4293
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   749
  discarding remaining changes
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   750
  forgetting SPLIT3
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   751
  $ hg export
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   752
  # HG changeset patch
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   753
  # User test
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   754
  # Date 0 0
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   755
  #      Thu Jan 01 00:00:00 1970 +0000
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   756
  # Branch another-branch
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   757
  # Node ID db690d5566962489d65945c90b468b44e0b1507a
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   758
  # Parent  75695e3e2300d316cc515c4c25bab8b825ef1433
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   759
  # EXP-Topic mytopic
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   760
  split12
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   761
  
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   762
  diff --git a/SPLIT2 b/SPLIT2
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   763
  new file mode 100644
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   764
  $ hg status
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   765
  ? SPLIT3
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   766
  ? SPLIT4
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   767
  ? editor.sh
d4902d48d095 split: add a option to discard remaining change during split
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4292
diff changeset
   768
  ? num