Mercurial > evolve
annotate tests/test-split.t @ 2776:4dd84054ebbb
test: remove reference to the graphlog extension
The feature is in core for ages.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 24 Jul 2017 04:41:31 +0200 |
parents | 1d16c9dcb825 |
children | ae690d39fc92 |
rev | line source |
---|---|
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 |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
42 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
43 06be89dfe2ae447383f30a2984933352757b6fb4 0 {1334a80b33c3f9873edab728fbbcf500eab61d2e} (*) {'ef1': '0', 'user': 'test'} (glob) |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
44 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
45 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
|
46 $ echo 0 > num |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
47 $ cat > editor.sh << '__EOF__' |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
48 > NUM=$(cat num) |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
49 > NUM=`expr "$NUM" + 1` |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
50 > echo "$NUM" > num |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
51 > echo "split$NUM" > "$1" |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
52 > __EOF__ |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
53 $ export HGEDITOR="\"sh\" \"editor.sh\"" |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
54 $ hg split << EOF |
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 > y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
58 > n |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
59 > N |
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 > y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
62 > EOF |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
63 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
|
64 reverting _a |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
65 adding _d |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
66 diff --git a/_a b/_a |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
67 1 hunks, 1 lines changed |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
68 examine changes to '_a'? [Ynesfdaq?] y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
69 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
70 @@ -1,0 +2,1 @@ |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
71 +change to a |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
72 record change 1/2 to '_a'? [Ynesfdaq?] y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
73 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
74 diff --git a/_d b/_d |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
75 new file mode 100644 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
76 examine changes to '_d'? [Ynesfdaq?] y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
77 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
78 @@ -0,0 +1,1 @@ |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
79 +_d |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
80 record change 2/2 to '_d'? [Ynesfdaq?] n |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
81 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
82 created new head |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
83 Done splitting? [yN] N |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
84 diff --git a/_d b/_d |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
85 new file mode 100644 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
86 examine changes to '_d'? [Ynesfdaq?] y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
87 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
88 @@ -0,0 +1,1 @@ |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
89 +_d |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
90 record this change to '_d'? [Ynesfdaq?] y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
91 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
92 no more change to split |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
93 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
94 $ hg debugobsolete |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
95 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
96 06be89dfe2ae447383f30a2984933352757b6fb4 0 {1334a80b33c3f9873edab728fbbcf500eab61d2e} (*) {'ef1': '0', 'user': 'test'} (glob) |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
97 d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (*) {'ef1': '13', 'user': 'test'} (glob) |
2776
4dd84054ebbb
test: remove reference to the graphlog extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2775
diff
changeset
|
98 $ hg log -G |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
99 @ changeset: 7:033b3f5ae73d |
1482
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
100 | tag: tip |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
101 | user: test |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
102 | 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
|
103 | summary: split2 |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
104 | |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
105 o changeset: 6:2d8abdb827cd |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
106 | parent: 2:52149352b372 |
1482
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
107 | user: test |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
108 | 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
|
109 | summary: split1 |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
110 | |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
111 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
|
112 | user: other-test-user |
1482
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
113 | 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
|
114 | summary: add _c |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
115 | |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
116 o changeset: 1:37445b16603b |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
117 | user: test |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
118 | 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
|
119 | summary: add _b |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
120 | |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
121 o changeset: 0:135f39f4bd78 |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
122 user: test |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
123 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
|
124 summary: add _a |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
125 |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
126 |
1672 | 127 Cannot split a commit with uncommitted changes |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
128 $ hg up "desc(_c)" |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
129 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
|
130 $ 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
|
131 $ hg split |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
132 abort: uncommitted changes |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
133 [255] |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
134 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
135 Split a revision specified with -r |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
136 $ hg up "desc(_c)" -C |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
137 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
138 $ echo "change to b" >> _b |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
139 $ hg amend -m "_cprim" |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
140 2 new unstable changesets |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
141 $ hg evolve --all |
1482
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
142 move:[6] split1 |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
143 atop:[9] _cprim |
1482
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
144 move:[7] split2 |
c7726b19c7a0
split: fix commit message numbering error in the test
Laurent Charignon <lcharignon@fb.com>
parents:
1478
diff
changeset
|
145 atop:[10] split1 |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
146 working directory is now at * (glob) |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
147 $ hg log -r "desc(_cprim)" -v -p |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
148 changeset: 9:b434287e665c |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
149 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
|
150 user: other-test-user |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
151 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
|
152 files: _b _c |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
153 description: |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
154 _cprim |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
155 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
156 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
157 diff --git a/_b b/_b |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
158 --- a/_b |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
159 +++ b/_b |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
160 @@ -1,0 +2,1 @@ |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
161 +change to b |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
162 diff --git a/_c b/_c |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
163 new file mode 100644 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
164 --- /dev/null |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
165 +++ b/_c |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
166 @@ -0,0 +1,1 @@ |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
167 +_c |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
168 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
169 $ hg split -r "desc(_cprim)" <<EOF |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
170 > y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
171 > y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
172 > y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
173 > n |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
174 > y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
175 > EOF |
1484
e3484e9632cd
split: don't update before it is actually needed
Laurent Charignon <lcharignon@fb.com>
parents:
1483
diff
changeset
|
176 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
|
177 reverting _b |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
178 adding _c |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
179 diff --git a/_b b/_b |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
180 1 hunks, 1 lines changed |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
181 examine changes to '_b'? [Ynesfdaq?] y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
182 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
183 @@ -1,0 +2,1 @@ |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
184 +change to b |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
185 record change 1/2 to '_b'? [Ynesfdaq?] y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
186 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
187 diff --git a/_c b/_c |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
188 new file mode 100644 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
189 examine changes to '_c'? [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 @@ -0,0 +1,1 @@ |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
192 +_c |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
193 record change 2/2 to '_c'? [Ynesfdaq?] n |
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 created new head |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
196 Done splitting? [yN] y |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
197 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
198 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
|
199 remaining changes |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
200 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
201 $ hg debugobsolete |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
202 1334a80b33c3f9873edab728fbbcf500eab61d2e d2fe56e71366c2c5376c89960c281395062c0619 0 (*) {'ef1': '8', 'user': 'test'} (glob) |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
203 06be89dfe2ae447383f30a2984933352757b6fb4 0 {1334a80b33c3f9873edab728fbbcf500eab61d2e} (*) {'ef1': '0', 'user': 'test'} (glob) |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
204 d2fe56e71366c2c5376c89960c281395062c0619 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b 033b3f5ae73db67c10de938fb6f26b949aaef172 0 (*) {'ef1': '13', 'user': 'test'} (glob) |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
205 52149352b372d39b19127d5bd2d488b1b63f9f85 b434287e665ce757ee5463a965cb3d119ca9e893 0 (*) {'ef1': '9', 'user': 'test'} (glob) |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
206 7a4fc25a48a5797bb069563854455aecf738d8f2 0 {52149352b372d39b19127d5bd2d488b1b63f9f85} (*) {'ef1': '0', 'user': 'test'} (glob) |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
207 2d8abdb827cdf71ca477ef6985d7ceb257c53c1b e2b4afde39803bd42bb1374b230fca1b1e8cc868 0 (*) {'ef1': '4', 'user': 'test'} (glob) |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
208 033b3f5ae73db67c10de938fb6f26b949aaef172 bb5e4f6020c74e7961a51fda635ea9df9b04dda8 0 (*) {'ef1': '4', 'user': 'test'} (glob) |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
209 b434287e665ce757ee5463a965cb3d119ca9e893 ead2066d1dbf14833fe1069df1b735e4e9468c40 1188c4216eba37f18a1de6558564601d00ff2143 0 (*) {'ef1': '13', 'user': 'test'} (glob) |
1483
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
210 $ hg evolve --all |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
211 move:[10] split1 |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
212 atop:[13] split4 |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
213 move:[11] split2 |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
214 atop:[14] split1 |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
215 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
|
216 $ hg log -G |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
217 @ changeset: 15:d74c6715e706 |
1483
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
218 | tag: tip |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
219 | user: test |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
220 | 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
|
221 | summary: split2 |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
222 | |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
223 o changeset: 14:3f134f739075 |
1483
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
224 | user: test |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
225 | 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
|
226 | summary: split1 |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
227 | |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
228 o changeset: 13:1188c4216eba |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
229 | user: other-test-user |
1483
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
230 | 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
|
231 | summary: split4 |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
232 | |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
233 o changeset: 12:ead2066d1dbf |
1483
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
234 | 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
|
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: split3 |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
238 | |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
239 o changeset: 1:37445b16603b |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
240 | user: test |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
241 | 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
|
242 | summary: add _b |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
243 | |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
244 o changeset: 0:135f39f4bd78 |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
245 user: test |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
246 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
|
247 summary: add _a |
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
248 |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
249 |
1485
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
250 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
|
251 active bookmark as active |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
252 $ hg book bookA |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
253 $ hg book bookB |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
254 $ echo "changetofilea" > _a |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
255 $ hg amend |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
256 $ hg book |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
257 bookA 17:7a6b35779b85 |
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
258 * bookB 17:7a6b35779b85 |
2776
4dd84054ebbb
test: remove reference to the graphlog extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2775
diff
changeset
|
259 $ hg log -G -r "14::" |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
260 @ changeset: 17:7a6b35779b85 |
1485
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
261 | bookmark: bookA |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
262 | bookmark: bookB |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
263 | tag: tip |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
264 | parent: 14:3f134f739075 |
1485
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
265 | user: test |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
266 | 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
|
267 | summary: split2 |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
268 | |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
269 o changeset: 14:3f134f739075 |
1485
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
270 | 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
|
271 ~ 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
|
272 summary: split1 |
27445da063b7
tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1598
diff
changeset
|
273 |
2770
a9ea16a1f4dc
split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2667
diff
changeset
|
274 $ 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
|
275 > y |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
276 > y |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
277 > n |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
278 > y |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
279 > EOF |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
280 (leaving bookmark bookB) |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
281 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
|
282 reverting _a |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
283 adding _d |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
284 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
|
285 1 hunks, 2 lines changed |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
286 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
|
287 |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
288 @@ -1,2 +1,1 @@ |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
289 -_a |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
290 -change to a |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
291 +changetofilea |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
292 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
|
293 |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
294 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
|
295 new file mode 100644 |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
296 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
|
297 |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
298 created new head |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
299 Done splitting? [yN] y |
2776
4dd84054ebbb
test: remove reference to the graphlog extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2775
diff
changeset
|
300 $ hg log -G -r "14::" |
2770
a9ea16a1f4dc
split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2667
diff
changeset
|
301 @ changeset: 19:452a26648478 |
1485
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
302 | bookmark: bookA |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
303 | bookmark: bookB |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
304 | tag: tip |
2770
a9ea16a1f4dc
split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2667
diff
changeset
|
305 | user: victor |
1485
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
306 | 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
|
307 | summary: split6 |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
308 | |
2770
a9ea16a1f4dc
split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2667
diff
changeset
|
309 o changeset: 18:1315679b77dc |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
310 | parent: 14:3f134f739075 |
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: split5 |
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
314 | |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
315 o changeset: 14:3f134f739075 |
1485
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
316 | 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
|
317 ~ 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
|
318 summary: split1 |
27445da063b7
tests: adapt output to the new graphlog style
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1598
diff
changeset
|
319 |
1485
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
320 $ hg book |
2770
a9ea16a1f4dc
split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2667
diff
changeset
|
321 bookA 19:452a26648478 |
a9ea16a1f4dc
split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2667
diff
changeset
|
322 * bookB 19:452a26648478 |
1485
1ba64be11bf8
split: handle bookmarks instead of leaving them on precursor
Laurent Charignon <lcharignon@fb.com>
parents:
1484
diff
changeset
|
323 |
1598
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
324 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
|
325 $ 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
|
326 (leaving bookmark bookB) |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
327 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
|
328 adding _d |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
329 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
|
330 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
|
331 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
|
332 [255] |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
333 |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
334 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
|
335 $ cat >> $HGRCPATH <<EOF |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
336 > [experimental] |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
337 > evolution=createmarkers |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
338 > evolutioncommands=split |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
339 > EOF |
1483
dc1467a629ca
split: add more output to the test
Laurent Charignon <lcharignon@fb.com>
parents:
1482
diff
changeset
|
340 $ hg split -r "desc(split3)" |
2659
166ca0aba0ea
split: preserve author of the original changeset in the successors
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2587
diff
changeset
|
341 abort: cannot split commit: ead2066d1dbf not a head |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
342 [255] |
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
343 |
1598
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
344 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
|
345 $ echo "[experimental]" >> $HGRCPATH |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
346 $ echo "evolution=createmarkers" >> $HGRCPATH |
1478
9603aa1ecdfd
evolve: add a command to split commits
Laurent Charignon <lcharignon@fb.com>
parents:
diff
changeset
|
347 |
1598
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
348 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
|
349 $ hg split << EOF |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
350 > q |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
351 > EOF |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
352 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
|
353 adding _d |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
354 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
|
355 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
|
356 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
|
357 |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
358 abort: user quit |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
359 [255] |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
360 |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
361 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
|
362 $ hg split . << EOF |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
363 > q |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
364 > EOF |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
365 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
|
366 adding _d |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
367 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
|
368 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
|
369 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
|
370 |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
371 abort: user quit |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
372 [255] |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
373 |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
374 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
|
375 $ 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
|
376 > q |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
377 > EOF |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
378 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
|
379 (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
|
380 [255] |
2a08ef812b84
evolve: make split respect rev args passed without --rev or -r
Kostia Balytskyi <ikostia@fb.com>
parents:
1485
diff
changeset
|
381 |
1738
cb5edd4b160c
split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
1672
diff
changeset
|
382 Split empty commit (issue5191) |
cb5edd4b160c
split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
1672
diff
changeset
|
383 $ hg branch new-branch |
cb5edd4b160c
split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
1672
diff
changeset
|
384 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
|
385 (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
|
386 $ hg commit -m "empty" |
cb5edd4b160c
split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
1672
diff
changeset
|
387 $ hg split |
cb5edd4b160c
split: avoid trying to split an empty commit (issue5191)
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
1672
diff
changeset
|
388 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
|
389 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
390 Check that split keeps the right topic |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
391 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
392 $ hg up -r tip |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
393 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
|
394 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
395 Add topic to the hgrc |
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 $ echo "[extensions]" >> $HGRCPATH |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
398 $ 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
|
399 $ hg topic mytopic |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
400 $ echo babar > babar |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
401 $ echo celeste > celeste |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
402 $ 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
|
403 $ hg commit -m "Works on mytopic" babar celeste --user victor |
6044bd16bfb7
split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2770
diff
changeset
|
404 $ hg log -r . |
6044bd16bfb7
split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2770
diff
changeset
|
405 changeset: 21:26f72cfaf036 |
6044bd16bfb7
split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2770
diff
changeset
|
406 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
|
407 tag: tip |
6044bd16bfb7
split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2770
diff
changeset
|
408 topic: mytopic |
6044bd16bfb7
split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2770
diff
changeset
|
409 user: victor |
6044bd16bfb7
split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2770
diff
changeset
|
410 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
|
411 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
|
412 |
2667
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
413 $ hg summary |
2771
6044bd16bfb7
split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2770
diff
changeset
|
414 parent: 21:26f72cfaf036 tip |
2667
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
415 Works on mytopic |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
416 branch: new-branch |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
417 commit: 2 unknown (clean) |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
418 update: (current) |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
419 phases: 9 draft |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
420 topic: mytopic |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
421 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
422 Split it |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
423 |
2771
6044bd16bfb7
split: add support for the -D and -U option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2770
diff
changeset
|
424 $ hg split -U << EOF |
2667
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
425 > Y |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
426 > Y |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
427 > N |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
428 > Y |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
429 > Y |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
430 > Y |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
431 > EOF |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
432 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
|
433 adding babar |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
434 adding celeste |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
435 diff --git a/babar b/babar |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
436 new file mode 100644 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
437 examine changes to 'babar'? [Ynesfdaq?] Y |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
438 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
439 @@ -0,0 +1,1 @@ |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
440 +babar |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
441 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
|
442 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
443 diff --git a/celeste b/celeste |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
444 new file mode 100644 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
445 examine changes to 'celeste'? [Ynesfdaq?] N |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
446 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
447 Done splitting? [yN] Y |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
448 diff --git a/celeste b/celeste |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
449 new file mode 100644 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
450 examine changes to 'celeste'? [Ynesfdaq?] Y |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
451 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
452 @@ -0,0 +1,1 @@ |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
453 +celeste |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
454 record this change to 'celeste'? [Ynesfdaq?] Y |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
455 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
456 no more change to split |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
457 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
458 Check that the topic is still here |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
459 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
460 $ hg log -r "tip~1::" |
2770
a9ea16a1f4dc
split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2667
diff
changeset
|
461 changeset: 22:addcf498f19e |
2667
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
462 branch: new-branch |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
463 topic: mytopic |
2770
a9ea16a1f4dc
split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2667
diff
changeset
|
464 parent: 20:fdb403258632 |
2667
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
465 user: test |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
466 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
|
467 summary: split7 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
468 |
2770
a9ea16a1f4dc
split: fix the --user option
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2667
diff
changeset
|
469 changeset: 23:2532b288af61 |
2667
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
470 branch: new-branch |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
471 tag: tip |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
472 topic: mytopic |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
473 user: test |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
474 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
|
475 summary: split8 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
476 |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
477 $ hg topic |
e7079bba383d
topic: makes split keep the topic
Boris Feld <boris.feld@octobus.net>
parents:
2659
diff
changeset
|
478 * mytopic |