Show More
@@ -1,82 +1,82 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 | $ echo foo > a |
|
2 | $ echo foo > a | |
3 | $ hg add a |
|
3 | $ hg add a | |
4 | $ hg commit -m "1" |
|
4 | $ hg commit -m "1" | |
5 |
|
5 | |||
6 | $ echo bar > b |
|
6 | $ echo bar > b | |
7 | $ hg add b |
|
7 | $ hg add b | |
8 | $ hg remove a |
|
8 | $ hg remove a | |
9 |
|
9 | |||
10 | Should show a removed and b added: |
|
10 | Should show a removed and b added: | |
11 |
|
11 | |||
12 | $ hg status |
|
12 | $ hg status | |
13 | A b |
|
13 | A b | |
14 | R a |
|
14 | R a | |
15 |
|
15 | |||
16 | $ hg revert --all |
|
16 | $ hg revert --all | |
17 | undeleting a |
|
17 | undeleting a | |
18 | forgetting b |
|
18 | forgetting b | |
19 |
|
19 | |||
20 | Should show b unknown and a back to normal: |
|
20 | Should show b unknown and a back to normal: | |
21 |
|
21 | |||
22 | $ hg status |
|
22 | $ hg status | |
23 | ? b |
|
23 | ? b | |
24 |
|
24 | |||
25 | $ rm b |
|
25 | $ rm b | |
26 |
|
26 | |||
27 | $ hg co -C 0 |
|
27 | $ hg co -C 0 | |
28 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
29 | $ echo foo-a > a |
|
29 | $ echo foo-a > a | |
30 | $ hg commit -m "2a" |
|
30 | $ hg commit -m "2a" | |
31 |
|
31 | |||
32 | $ hg co -C 0 |
|
32 | $ hg co -C 0 | |
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
33 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
34 | $ echo foo-b > a |
|
34 | $ echo foo-b > a | |
35 | $ hg commit -m "2b" |
|
35 | $ hg commit -m "2b" | |
36 | created new head |
|
36 | created new head | |
37 |
|
37 | |||
38 | $ HGMERGE=true hg merge 1 |
|
38 | $ HGMERGE=true hg merge 1 | |
39 | merging a |
|
39 | merging a | |
40 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
40 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
41 | (branch merge, don't forget to commit) |
|
41 | (branch merge, don't forget to commit) | |
42 |
|
42 | |||
43 | Should show foo-b: |
|
43 | Should show foo-b: | |
44 |
|
44 | |||
45 | $ cat a |
|
45 | $ cat a | |
46 | foo-b |
|
46 | foo-b | |
47 |
|
47 | |||
48 | $ echo bar > b |
|
48 | $ echo bar > b | |
49 | $ hg add b |
|
49 | $ hg add b | |
50 | $ rm a |
|
50 | $ rm a | |
51 | $ hg remove a |
|
51 | $ hg remove a | |
52 |
|
52 | |||
53 | Should show a removed and b added: |
|
53 | Should show a removed and b added: | |
54 |
|
54 | |||
55 | $ hg status |
|
55 | $ hg status | |
56 | A b |
|
56 | A b | |
57 | R a |
|
57 | R a | |
58 |
|
58 | |||
59 | Revert should fail: |
|
59 | Revert should fail: | |
60 |
|
60 | |||
61 | $ hg revert |
|
61 | $ hg revert | |
62 | abort: uncommitted merge with no revision specified |
|
62 | abort: uncommitted merge with no revision specified | |
63 |
(use |
|
63 | (use 'hg update' or see 'hg help revert') | |
64 | [255] |
|
64 | [255] | |
65 |
|
65 | |||
66 | Revert should be ok now: |
|
66 | Revert should be ok now: | |
67 |
|
67 | |||
68 | $ hg revert -r2 --all |
|
68 | $ hg revert -r2 --all | |
69 | undeleting a |
|
69 | undeleting a | |
70 | forgetting b |
|
70 | forgetting b | |
71 |
|
71 | |||
72 | Should show b unknown and a marked modified (merged): |
|
72 | Should show b unknown and a marked modified (merged): | |
73 |
|
73 | |||
74 | $ hg status |
|
74 | $ hg status | |
75 | M a |
|
75 | M a | |
76 | ? b |
|
76 | ? b | |
77 |
|
77 | |||
78 | Should show foo-b: |
|
78 | Should show foo-b: | |
79 |
|
79 | |||
80 | $ cat a |
|
80 | $ cat a | |
81 | foo-b |
|
81 | foo-b | |
82 |
|
82 |
@@ -1,844 +1,844 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extdiff] |
|
2 | > [extdiff] | |
3 | > # for portability: |
|
3 | > # for portability: | |
4 | > pdiff = sh "$RUNTESTDIR/pdiff" |
|
4 | > pdiff = sh "$RUNTESTDIR/pdiff" | |
5 | > EOF |
|
5 | > EOF | |
6 |
|
6 | |||
7 | Create a repo with some stuff in it: |
|
7 | Create a repo with some stuff in it: | |
8 |
|
8 | |||
9 | $ hg init a |
|
9 | $ hg init a | |
10 | $ cd a |
|
10 | $ cd a | |
11 | $ echo a > a |
|
11 | $ echo a > a | |
12 | $ echo a > d |
|
12 | $ echo a > d | |
13 | $ echo a > e |
|
13 | $ echo a > e | |
14 | $ hg ci -qAm0 |
|
14 | $ hg ci -qAm0 | |
15 | $ echo b > a |
|
15 | $ echo b > a | |
16 | $ hg ci -m1 -u bar |
|
16 | $ hg ci -m1 -u bar | |
17 | $ hg mv a b |
|
17 | $ hg mv a b | |
18 | $ hg ci -m2 |
|
18 | $ hg ci -m2 | |
19 | $ hg cp b c |
|
19 | $ hg cp b c | |
20 | $ hg ci -m3 -u baz |
|
20 | $ hg ci -m3 -u baz | |
21 | $ echo b > d |
|
21 | $ echo b > d | |
22 | $ echo f > e |
|
22 | $ echo f > e | |
23 | $ hg ci -m4 |
|
23 | $ hg ci -m4 | |
24 | $ hg up -q 3 |
|
24 | $ hg up -q 3 | |
25 | $ echo b > e |
|
25 | $ echo b > e | |
26 | $ hg branch -q stable |
|
26 | $ hg branch -q stable | |
27 | $ hg ci -m5 |
|
27 | $ hg ci -m5 | |
28 | $ hg merge -q default --tool internal:local |
|
28 | $ hg merge -q default --tool internal:local | |
29 | $ hg branch -q default |
|
29 | $ hg branch -q default | |
30 | $ hg ci -m6 |
|
30 | $ hg ci -m6 | |
31 | $ hg phase --public 3 |
|
31 | $ hg phase --public 3 | |
32 | $ hg phase --force --secret 6 |
|
32 | $ hg phase --force --secret 6 | |
33 |
|
33 | |||
34 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
34 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' | |
35 | @ test@6.secret: 6 |
|
35 | @ test@6.secret: 6 | |
36 | |\ |
|
36 | |\ | |
37 | | o test@5.draft: 5 |
|
37 | | o test@5.draft: 5 | |
38 | | | |
|
38 | | | | |
39 | o | test@4.draft: 4 |
|
39 | o | test@4.draft: 4 | |
40 | |/ |
|
40 | |/ | |
41 | o baz@3.public: 3 |
|
41 | o baz@3.public: 3 | |
42 | | |
|
42 | | | |
43 | o test@2.public: 2 |
|
43 | o test@2.public: 2 | |
44 | | |
|
44 | | | |
45 | o bar@1.public: 1 |
|
45 | o bar@1.public: 1 | |
46 | | |
|
46 | | | |
47 | o test@0.public: 0 |
|
47 | o test@0.public: 0 | |
48 |
|
48 | |||
49 | Can't continue without starting: |
|
49 | Can't continue without starting: | |
50 |
|
50 | |||
51 | $ hg rm -q e |
|
51 | $ hg rm -q e | |
52 | $ hg graft --continue |
|
52 | $ hg graft --continue | |
53 | abort: no graft in progress |
|
53 | abort: no graft in progress | |
54 | [255] |
|
54 | [255] | |
55 | $ hg revert -r . -q e |
|
55 | $ hg revert -r . -q e | |
56 |
|
56 | |||
57 | Need to specify a rev: |
|
57 | Need to specify a rev: | |
58 |
|
58 | |||
59 | $ hg graft |
|
59 | $ hg graft | |
60 | abort: no revisions specified |
|
60 | abort: no revisions specified | |
61 | [255] |
|
61 | [255] | |
62 |
|
62 | |||
63 | Can't graft ancestor: |
|
63 | Can't graft ancestor: | |
64 |
|
64 | |||
65 | $ hg graft 1 2 |
|
65 | $ hg graft 1 2 | |
66 | skipping ancestor revision 1:5d205f8b35b6 |
|
66 | skipping ancestor revision 1:5d205f8b35b6 | |
67 | skipping ancestor revision 2:5c095ad7e90f |
|
67 | skipping ancestor revision 2:5c095ad7e90f | |
68 | [255] |
|
68 | [255] | |
69 |
|
69 | |||
70 | Specify revisions with -r: |
|
70 | Specify revisions with -r: | |
71 |
|
71 | |||
72 | $ hg graft -r 1 -r 2 |
|
72 | $ hg graft -r 1 -r 2 | |
73 | skipping ancestor revision 1:5d205f8b35b6 |
|
73 | skipping ancestor revision 1:5d205f8b35b6 | |
74 | skipping ancestor revision 2:5c095ad7e90f |
|
74 | skipping ancestor revision 2:5c095ad7e90f | |
75 | [255] |
|
75 | [255] | |
76 |
|
76 | |||
77 | $ hg graft -r 1 2 |
|
77 | $ hg graft -r 1 2 | |
78 | warning: inconsistent use of --rev might give unexpected revision ordering! |
|
78 | warning: inconsistent use of --rev might give unexpected revision ordering! | |
79 | skipping ancestor revision 2:5c095ad7e90f |
|
79 | skipping ancestor revision 2:5c095ad7e90f | |
80 | skipping ancestor revision 1:5d205f8b35b6 |
|
80 | skipping ancestor revision 1:5d205f8b35b6 | |
81 | [255] |
|
81 | [255] | |
82 |
|
82 | |||
83 | Can't graft with dirty wd: |
|
83 | Can't graft with dirty wd: | |
84 |
|
84 | |||
85 | $ hg up -q 0 |
|
85 | $ hg up -q 0 | |
86 | $ echo foo > a |
|
86 | $ echo foo > a | |
87 | $ hg graft 1 |
|
87 | $ hg graft 1 | |
88 | abort: uncommitted changes |
|
88 | abort: uncommitted changes | |
89 | [255] |
|
89 | [255] | |
90 | $ hg revert a |
|
90 | $ hg revert a | |
91 |
|
91 | |||
92 | Graft a rename: |
|
92 | Graft a rename: | |
93 | (this also tests that editor is invoked if '--edit' is specified) |
|
93 | (this also tests that editor is invoked if '--edit' is specified) | |
94 |
|
94 | |||
95 | $ hg status --rev "2^1" --rev 2 |
|
95 | $ hg status --rev "2^1" --rev 2 | |
96 | A b |
|
96 | A b | |
97 | R a |
|
97 | R a | |
98 | $ HGEDITOR=cat hg graft 2 -u foo --edit |
|
98 | $ HGEDITOR=cat hg graft 2 -u foo --edit | |
99 | grafting 2:5c095ad7e90f "2" |
|
99 | grafting 2:5c095ad7e90f "2" | |
100 | merging a and b to b |
|
100 | merging a and b to b | |
101 | 2 |
|
101 | 2 | |
102 |
|
102 | |||
103 |
|
103 | |||
104 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
104 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
105 | HG: Leave message empty to abort commit. |
|
105 | HG: Leave message empty to abort commit. | |
106 | HG: -- |
|
106 | HG: -- | |
107 | HG: user: foo |
|
107 | HG: user: foo | |
108 | HG: branch 'default' |
|
108 | HG: branch 'default' | |
109 | HG: added b |
|
109 | HG: added b | |
110 | HG: removed a |
|
110 | HG: removed a | |
111 | $ hg export tip --git |
|
111 | $ hg export tip --git | |
112 | # HG changeset patch |
|
112 | # HG changeset patch | |
113 | # User foo |
|
113 | # User foo | |
114 | # Date 0 0 |
|
114 | # Date 0 0 | |
115 | # Thu Jan 01 00:00:00 1970 +0000 |
|
115 | # Thu Jan 01 00:00:00 1970 +0000 | |
116 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
116 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
117 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e |
|
117 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e | |
118 | 2 |
|
118 | 2 | |
119 |
|
119 | |||
120 | diff --git a/a b/b |
|
120 | diff --git a/a b/b | |
121 | rename from a |
|
121 | rename from a | |
122 | rename to b |
|
122 | rename to b | |
123 |
|
123 | |||
124 | Look for extra:source |
|
124 | Look for extra:source | |
125 |
|
125 | |||
126 | $ hg log --debug -r tip |
|
126 | $ hg log --debug -r tip | |
127 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
127 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
128 | tag: tip |
|
128 | tag: tip | |
129 | phase: draft |
|
129 | phase: draft | |
130 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e |
|
130 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e | |
131 | parent: -1:0000000000000000000000000000000000000000 |
|
131 | parent: -1:0000000000000000000000000000000000000000 | |
132 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb |
|
132 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb | |
133 | user: foo |
|
133 | user: foo | |
134 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
134 | date: Thu Jan 01 00:00:00 1970 +0000 | |
135 | files+: b |
|
135 | files+: b | |
136 | files-: a |
|
136 | files-: a | |
137 | extra: branch=default |
|
137 | extra: branch=default | |
138 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
138 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
139 | description: |
|
139 | description: | |
140 | 2 |
|
140 | 2 | |
141 |
|
141 | |||
142 |
|
142 | |||
143 |
|
143 | |||
144 | Graft out of order, skipping a merge and a duplicate |
|
144 | Graft out of order, skipping a merge and a duplicate | |
145 | (this also tests that editor is not invoked if '--edit' is not specified) |
|
145 | (this also tests that editor is not invoked if '--edit' is not specified) | |
146 |
|
146 | |||
147 | $ hg graft 1 5 4 3 'merge()' 2 -n |
|
147 | $ hg graft 1 5 4 3 'merge()' 2 -n | |
148 | skipping ungraftable merge revision 6 |
|
148 | skipping ungraftable merge revision 6 | |
149 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
149 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
150 | grafting 1:5d205f8b35b6 "1" |
|
150 | grafting 1:5d205f8b35b6 "1" | |
151 | grafting 5:97f8bfe72746 "5" |
|
151 | grafting 5:97f8bfe72746 "5" | |
152 | grafting 4:9c233e8e184d "4" |
|
152 | grafting 4:9c233e8e184d "4" | |
153 | grafting 3:4c60f11aa304 "3" |
|
153 | grafting 3:4c60f11aa304 "3" | |
154 |
|
154 | |||
155 | $ HGEDITOR=cat hg graft 1 5 'merge()' 2 --debug |
|
155 | $ HGEDITOR=cat hg graft 1 5 'merge()' 2 --debug | |
156 | skipping ungraftable merge revision 6 |
|
156 | skipping ungraftable merge revision 6 | |
157 | scanning for duplicate grafts |
|
157 | scanning for duplicate grafts | |
158 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
158 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
159 | grafting 1:5d205f8b35b6 "1" |
|
159 | grafting 1:5d205f8b35b6 "1" | |
160 | searching for copies back to rev 1 |
|
160 | searching for copies back to rev 1 | |
161 | unmatched files in local: |
|
161 | unmatched files in local: | |
162 | b |
|
162 | b | |
163 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
163 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
164 | src: 'a' -> dst: 'b' * |
|
164 | src: 'a' -> dst: 'b' * | |
165 | checking for directory renames |
|
165 | checking for directory renames | |
166 | resolving manifests |
|
166 | resolving manifests | |
167 | branchmerge: True, force: True, partial: False |
|
167 | branchmerge: True, force: True, partial: False | |
168 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 |
|
168 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 | |
169 | preserving b for resolve of b |
|
169 | preserving b for resolve of b | |
170 | starting 4 threads for background file closing (?) |
|
170 | starting 4 threads for background file closing (?) | |
171 | b: local copied/moved from a -> m (premerge) |
|
171 | b: local copied/moved from a -> m (premerge) | |
172 | picked tool ':merge' for b (binary False symlink False changedelete False) |
|
172 | picked tool ':merge' for b (binary False symlink False changedelete False) | |
173 | merging b and a to b |
|
173 | merging b and a to b | |
174 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 |
|
174 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 | |
175 | premerge successful |
|
175 | premerge successful | |
176 | committing files: |
|
176 | committing files: | |
177 | b |
|
177 | b | |
178 | committing manifest |
|
178 | committing manifest | |
179 | committing changelog |
|
179 | committing changelog | |
180 | grafting 5:97f8bfe72746 "5" |
|
180 | grafting 5:97f8bfe72746 "5" | |
181 | searching for copies back to rev 1 |
|
181 | searching for copies back to rev 1 | |
182 | resolving manifests |
|
182 | resolving manifests | |
183 | branchmerge: True, force: True, partial: False |
|
183 | branchmerge: True, force: True, partial: False | |
184 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 |
|
184 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 | |
185 | e: remote is newer -> g |
|
185 | e: remote is newer -> g | |
186 | getting e |
|
186 | getting e | |
187 | b: remote unchanged -> k |
|
187 | b: remote unchanged -> k | |
188 | committing files: |
|
188 | committing files: | |
189 | e |
|
189 | e | |
190 | committing manifest |
|
190 | committing manifest | |
191 | committing changelog |
|
191 | committing changelog | |
192 | $ HGEDITOR=cat hg graft 4 3 --log --debug |
|
192 | $ HGEDITOR=cat hg graft 4 3 --log --debug | |
193 | scanning for duplicate grafts |
|
193 | scanning for duplicate grafts | |
194 | grafting 4:9c233e8e184d "4" |
|
194 | grafting 4:9c233e8e184d "4" | |
195 | searching for copies back to rev 1 |
|
195 | searching for copies back to rev 1 | |
196 | resolving manifests |
|
196 | resolving manifests | |
197 | branchmerge: True, force: True, partial: False |
|
197 | branchmerge: True, force: True, partial: False | |
198 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d |
|
198 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d | |
199 | preserving e for resolve of e |
|
199 | preserving e for resolve of e | |
200 | d: remote is newer -> g |
|
200 | d: remote is newer -> g | |
201 | getting d |
|
201 | getting d | |
202 | b: remote unchanged -> k |
|
202 | b: remote unchanged -> k | |
203 | e: versions differ -> m (premerge) |
|
203 | e: versions differ -> m (premerge) | |
204 | picked tool ':merge' for e (binary False symlink False changedelete False) |
|
204 | picked tool ':merge' for e (binary False symlink False changedelete False) | |
205 | merging e |
|
205 | merging e | |
206 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 |
|
206 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 | |
207 | e: versions differ -> m (merge) |
|
207 | e: versions differ -> m (merge) | |
208 | picked tool ':merge' for e (binary False symlink False changedelete False) |
|
208 | picked tool ':merge' for e (binary False symlink False changedelete False) | |
209 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 |
|
209 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 | |
210 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
210 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
211 | abort: unresolved conflicts, can't continue |
|
211 | abort: unresolved conflicts, can't continue | |
212 | (use hg resolve and hg graft --continue --log) |
|
212 | (use 'hg resolve' and 'hg graft --continue --log') | |
213 | [255] |
|
213 | [255] | |
214 |
|
214 | |||
215 | Summary should mention graft: |
|
215 | Summary should mention graft: | |
216 |
|
216 | |||
217 | $ hg summary |grep graft |
|
217 | $ hg summary |grep graft | |
218 | commit: 2 modified, 2 unknown, 1 unresolved (graft in progress) |
|
218 | commit: 2 modified, 2 unknown, 1 unresolved (graft in progress) | |
219 |
|
219 | |||
220 | Commit while interrupted should fail: |
|
220 | Commit while interrupted should fail: | |
221 |
|
221 | |||
222 | $ hg ci -m 'commit interrupted graft' |
|
222 | $ hg ci -m 'commit interrupted graft' | |
223 | abort: graft in progress |
|
223 | abort: graft in progress | |
224 | (use 'hg graft --continue' or 'hg update' to abort) |
|
224 | (use 'hg graft --continue' or 'hg update' to abort) | |
225 | [255] |
|
225 | [255] | |
226 |
|
226 | |||
227 | Abort the graft and try committing: |
|
227 | Abort the graft and try committing: | |
228 |
|
228 | |||
229 | $ hg up -C . |
|
229 | $ hg up -C . | |
230 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
230 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
231 | $ echo c >> e |
|
231 | $ echo c >> e | |
232 | $ hg ci -mtest |
|
232 | $ hg ci -mtest | |
233 |
|
233 | |||
234 | $ hg strip . --config extensions.strip= |
|
234 | $ hg strip . --config extensions.strip= | |
235 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
235 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
236 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) |
|
236 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) | |
237 |
|
237 | |||
238 | Graft again: |
|
238 | Graft again: | |
239 |
|
239 | |||
240 | $ hg graft 1 5 4 3 'merge()' 2 |
|
240 | $ hg graft 1 5 4 3 'merge()' 2 | |
241 | skipping ungraftable merge revision 6 |
|
241 | skipping ungraftable merge revision 6 | |
242 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
242 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
243 | skipping revision 1:5d205f8b35b6 (already grafted to 8:6b9e5368ca4e) |
|
243 | skipping revision 1:5d205f8b35b6 (already grafted to 8:6b9e5368ca4e) | |
244 | skipping revision 5:97f8bfe72746 (already grafted to 9:1905859650ec) |
|
244 | skipping revision 5:97f8bfe72746 (already grafted to 9:1905859650ec) | |
245 | grafting 4:9c233e8e184d "4" |
|
245 | grafting 4:9c233e8e184d "4" | |
246 | merging e |
|
246 | merging e | |
247 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
247 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
248 | abort: unresolved conflicts, can't continue |
|
248 | abort: unresolved conflicts, can't continue | |
249 | (use hg resolve and hg graft --continue) |
|
249 | (use 'hg resolve' and 'hg graft --continue') | |
250 | [255] |
|
250 | [255] | |
251 |
|
251 | |||
252 | Continue without resolve should fail: |
|
252 | Continue without resolve should fail: | |
253 |
|
253 | |||
254 | $ hg graft -c |
|
254 | $ hg graft -c | |
255 | grafting 4:9c233e8e184d "4" |
|
255 | grafting 4:9c233e8e184d "4" | |
256 | abort: unresolved merge conflicts (see "hg help resolve") |
|
256 | abort: unresolved merge conflicts (see "hg help resolve") | |
257 | [255] |
|
257 | [255] | |
258 |
|
258 | |||
259 | Fix up: |
|
259 | Fix up: | |
260 |
|
260 | |||
261 | $ echo b > e |
|
261 | $ echo b > e | |
262 | $ hg resolve -m e |
|
262 | $ hg resolve -m e | |
263 | (no more unresolved files) |
|
263 | (no more unresolved files) | |
264 | continue: hg graft --continue |
|
264 | continue: hg graft --continue | |
265 |
|
265 | |||
266 | Continue with a revision should fail: |
|
266 | Continue with a revision should fail: | |
267 |
|
267 | |||
268 | $ hg graft -c 6 |
|
268 | $ hg graft -c 6 | |
269 | abort: can't specify --continue and revisions |
|
269 | abort: can't specify --continue and revisions | |
270 | [255] |
|
270 | [255] | |
271 |
|
271 | |||
272 | $ hg graft -c -r 6 |
|
272 | $ hg graft -c -r 6 | |
273 | abort: can't specify --continue and revisions |
|
273 | abort: can't specify --continue and revisions | |
274 | [255] |
|
274 | [255] | |
275 |
|
275 | |||
276 | Continue for real, clobber usernames |
|
276 | Continue for real, clobber usernames | |
277 |
|
277 | |||
278 | $ hg graft -c -U |
|
278 | $ hg graft -c -U | |
279 | grafting 4:9c233e8e184d "4" |
|
279 | grafting 4:9c233e8e184d "4" | |
280 | grafting 3:4c60f11aa304 "3" |
|
280 | grafting 3:4c60f11aa304 "3" | |
281 |
|
281 | |||
282 | Compare with original: |
|
282 | Compare with original: | |
283 |
|
283 | |||
284 | $ hg diff -r 6 |
|
284 | $ hg diff -r 6 | |
285 | $ hg status --rev 0:. -C |
|
285 | $ hg status --rev 0:. -C | |
286 | M d |
|
286 | M d | |
287 | M e |
|
287 | M e | |
288 | A b |
|
288 | A b | |
289 | a |
|
289 | a | |
290 | A c |
|
290 | A c | |
291 | a |
|
291 | a | |
292 | R a |
|
292 | R a | |
293 |
|
293 | |||
294 | View graph: |
|
294 | View graph: | |
295 |
|
295 | |||
296 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
296 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' | |
297 | @ test@11.draft: 3 |
|
297 | @ test@11.draft: 3 | |
298 | | |
|
298 | | | |
299 | o test@10.draft: 4 |
|
299 | o test@10.draft: 4 | |
300 | | |
|
300 | | | |
301 | o test@9.draft: 5 |
|
301 | o test@9.draft: 5 | |
302 | | |
|
302 | | | |
303 | o bar@8.draft: 1 |
|
303 | o bar@8.draft: 1 | |
304 | | |
|
304 | | | |
305 | o foo@7.draft: 2 |
|
305 | o foo@7.draft: 2 | |
306 | | |
|
306 | | | |
307 | | o test@6.secret: 6 |
|
307 | | o test@6.secret: 6 | |
308 | | |\ |
|
308 | | |\ | |
309 | | | o test@5.draft: 5 |
|
309 | | | o test@5.draft: 5 | |
310 | | | | |
|
310 | | | | | |
311 | | o | test@4.draft: 4 |
|
311 | | o | test@4.draft: 4 | |
312 | | |/ |
|
312 | | |/ | |
313 | | o baz@3.public: 3 |
|
313 | | o baz@3.public: 3 | |
314 | | | |
|
314 | | | | |
315 | | o test@2.public: 2 |
|
315 | | o test@2.public: 2 | |
316 | | | |
|
316 | | | | |
317 | | o bar@1.public: 1 |
|
317 | | o bar@1.public: 1 | |
318 | |/ |
|
318 | |/ | |
319 | o test@0.public: 0 |
|
319 | o test@0.public: 0 | |
320 |
|
320 | |||
321 | Graft again onto another branch should preserve the original source |
|
321 | Graft again onto another branch should preserve the original source | |
322 | $ hg up -q 0 |
|
322 | $ hg up -q 0 | |
323 | $ echo 'g'>g |
|
323 | $ echo 'g'>g | |
324 | $ hg add g |
|
324 | $ hg add g | |
325 | $ hg ci -m 7 |
|
325 | $ hg ci -m 7 | |
326 | created new head |
|
326 | created new head | |
327 | $ hg graft 7 |
|
327 | $ hg graft 7 | |
328 | grafting 7:ef0ef43d49e7 "2" |
|
328 | grafting 7:ef0ef43d49e7 "2" | |
329 |
|
329 | |||
330 | $ hg log -r 7 --template '{rev}:{node}\n' |
|
330 | $ hg log -r 7 --template '{rev}:{node}\n' | |
331 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
331 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
332 | $ hg log -r 2 --template '{rev}:{node}\n' |
|
332 | $ hg log -r 2 --template '{rev}:{node}\n' | |
333 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
333 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
334 |
|
334 | |||
335 | $ hg log --debug -r tip |
|
335 | $ hg log --debug -r tip | |
336 | changeset: 13:7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
336 | changeset: 13:7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
337 | tag: tip |
|
337 | tag: tip | |
338 | phase: draft |
|
338 | phase: draft | |
339 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
339 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
340 | parent: -1:0000000000000000000000000000000000000000 |
|
340 | parent: -1:0000000000000000000000000000000000000000 | |
341 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 |
|
341 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 | |
342 | user: foo |
|
342 | user: foo | |
343 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
343 | date: Thu Jan 01 00:00:00 1970 +0000 | |
344 | files+: b |
|
344 | files+: b | |
345 | files-: a |
|
345 | files-: a | |
346 | extra: branch=default |
|
346 | extra: branch=default | |
347 | extra: intermediate-source=ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
347 | extra: intermediate-source=ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
348 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
348 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
349 | description: |
|
349 | description: | |
350 | 2 |
|
350 | 2 | |
351 |
|
351 | |||
352 |
|
352 | |||
353 | Disallow grafting an already grafted cset onto its original branch |
|
353 | Disallow grafting an already grafted cset onto its original branch | |
354 | $ hg up -q 6 |
|
354 | $ hg up -q 6 | |
355 | $ hg graft 7 |
|
355 | $ hg graft 7 | |
356 | skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f) |
|
356 | skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f) | |
357 | [255] |
|
357 | [255] | |
358 |
|
358 | |||
359 | $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 |
|
359 | $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 | |
360 | --- */hg-5c095ad7e90f.patch * (glob) |
|
360 | --- */hg-5c095ad7e90f.patch * (glob) | |
361 | +++ */hg-7a4785234d87.patch * (glob) |
|
361 | +++ */hg-7a4785234d87.patch * (glob) | |
362 | @@ -1,18 +1,18 @@ |
|
362 | @@ -1,18 +1,18 @@ | |
363 | # HG changeset patch |
|
363 | # HG changeset patch | |
364 | -# User test |
|
364 | -# User test | |
365 | +# User foo |
|
365 | +# User foo | |
366 | # Date 0 0 |
|
366 | # Date 0 0 | |
367 | # Thu Jan 01 00:00:00 1970 +0000 |
|
367 | # Thu Jan 01 00:00:00 1970 +0000 | |
368 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
368 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
369 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 |
|
369 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 | |
370 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
370 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
371 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
371 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
372 | 2 |
|
372 | 2 | |
373 |
|
373 | |||
374 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f a |
|
374 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f a | |
375 | +diff -r b592ea63bb0c -r 7a4785234d87 a |
|
375 | +diff -r b592ea63bb0c -r 7a4785234d87 a | |
376 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
376 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
377 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
377 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
378 | @@ -1,1 +0,0 @@ |
|
378 | @@ -1,1 +0,0 @@ | |
379 | --b |
|
379 | --b | |
380 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f b |
|
380 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f b | |
381 | +-a |
|
381 | +-a | |
382 | +diff -r b592ea63bb0c -r 7a4785234d87 b |
|
382 | +diff -r b592ea63bb0c -r 7a4785234d87 b | |
383 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
383 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
384 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
384 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
385 | @@ -0,0 +1,1 @@ |
|
385 | @@ -0,0 +1,1 @@ | |
386 | -+b |
|
386 | -+b | |
387 | ++a |
|
387 | ++a | |
388 | [1] |
|
388 | [1] | |
389 |
|
389 | |||
390 | $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 -X . |
|
390 | $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 -X . | |
391 | --- */hg-5c095ad7e90f.patch * (glob) |
|
391 | --- */hg-5c095ad7e90f.patch * (glob) | |
392 | +++ */hg-7a4785234d87.patch * (glob) |
|
392 | +++ */hg-7a4785234d87.patch * (glob) | |
393 | @@ -1,8 +1,8 @@ |
|
393 | @@ -1,8 +1,8 @@ | |
394 | # HG changeset patch |
|
394 | # HG changeset patch | |
395 | -# User test |
|
395 | -# User test | |
396 | +# User foo |
|
396 | +# User foo | |
397 | # Date 0 0 |
|
397 | # Date 0 0 | |
398 | # Thu Jan 01 00:00:00 1970 +0000 |
|
398 | # Thu Jan 01 00:00:00 1970 +0000 | |
399 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
399 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
400 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 |
|
400 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 | |
401 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
401 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
402 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
402 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
403 | 2 |
|
403 | 2 | |
404 |
|
404 | |||
405 | [1] |
|
405 | [1] | |
406 |
|
406 | |||
407 | Disallow grafting already grafted csets with the same origin onto each other |
|
407 | Disallow grafting already grafted csets with the same origin onto each other | |
408 | $ hg up -q 13 |
|
408 | $ hg up -q 13 | |
409 | $ hg graft 2 |
|
409 | $ hg graft 2 | |
410 | skipping revision 2:5c095ad7e90f (already grafted to 13:7a4785234d87) |
|
410 | skipping revision 2:5c095ad7e90f (already grafted to 13:7a4785234d87) | |
411 | [255] |
|
411 | [255] | |
412 | $ hg graft 7 |
|
412 | $ hg graft 7 | |
413 | skipping already grafted revision 7:ef0ef43d49e7 (13:7a4785234d87 also has origin 2:5c095ad7e90f) |
|
413 | skipping already grafted revision 7:ef0ef43d49e7 (13:7a4785234d87 also has origin 2:5c095ad7e90f) | |
414 | [255] |
|
414 | [255] | |
415 |
|
415 | |||
416 | $ hg up -q 7 |
|
416 | $ hg up -q 7 | |
417 | $ hg graft 2 |
|
417 | $ hg graft 2 | |
418 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
418 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
419 | [255] |
|
419 | [255] | |
420 | $ hg graft tip |
|
420 | $ hg graft tip | |
421 | skipping already grafted revision 13:7a4785234d87 (7:ef0ef43d49e7 also has origin 2:5c095ad7e90f) |
|
421 | skipping already grafted revision 13:7a4785234d87 (7:ef0ef43d49e7 also has origin 2:5c095ad7e90f) | |
422 | [255] |
|
422 | [255] | |
423 |
|
423 | |||
424 | Graft with --log |
|
424 | Graft with --log | |
425 |
|
425 | |||
426 | $ hg up -Cq 1 |
|
426 | $ hg up -Cq 1 | |
427 | $ hg graft 3 --log -u foo |
|
427 | $ hg graft 3 --log -u foo | |
428 | grafting 3:4c60f11aa304 "3" |
|
428 | grafting 3:4c60f11aa304 "3" | |
429 | warning: can't find ancestor for 'c' copied from 'b'! |
|
429 | warning: can't find ancestor for 'c' copied from 'b'! | |
430 | $ hg log --template '{rev} {parents} {desc}\n' -r tip |
|
430 | $ hg log --template '{rev} {parents} {desc}\n' -r tip | |
431 | 14 1:5d205f8b35b6 3 |
|
431 | 14 1:5d205f8b35b6 3 | |
432 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) |
|
432 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) | |
433 |
|
433 | |||
434 | Resolve conflicted graft |
|
434 | Resolve conflicted graft | |
435 | $ hg up -q 0 |
|
435 | $ hg up -q 0 | |
436 | $ echo b > a |
|
436 | $ echo b > a | |
437 | $ hg ci -m 8 |
|
437 | $ hg ci -m 8 | |
438 | created new head |
|
438 | created new head | |
439 | $ echo c > a |
|
439 | $ echo c > a | |
440 | $ hg ci -m 9 |
|
440 | $ hg ci -m 9 | |
441 | $ hg graft 1 --tool internal:fail |
|
441 | $ hg graft 1 --tool internal:fail | |
442 | grafting 1:5d205f8b35b6 "1" |
|
442 | grafting 1:5d205f8b35b6 "1" | |
443 | abort: unresolved conflicts, can't continue |
|
443 | abort: unresolved conflicts, can't continue | |
444 | (use hg resolve and hg graft --continue) |
|
444 | (use 'hg resolve' and 'hg graft --continue') | |
445 | [255] |
|
445 | [255] | |
446 | $ hg resolve --all |
|
446 | $ hg resolve --all | |
447 | merging a |
|
447 | merging a | |
448 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
448 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
449 | [1] |
|
449 | [1] | |
450 | $ cat a |
|
450 | $ cat a | |
451 | <<<<<<< local: aaa4406d4f0a - test: 9 |
|
451 | <<<<<<< local: aaa4406d4f0a - test: 9 | |
452 | c |
|
452 | c | |
453 | ======= |
|
453 | ======= | |
454 | b |
|
454 | b | |
455 | >>>>>>> graft: 5d205f8b35b6 - bar: 1 |
|
455 | >>>>>>> graft: 5d205f8b35b6 - bar: 1 | |
456 | $ echo b > a |
|
456 | $ echo b > a | |
457 | $ hg resolve -m a |
|
457 | $ hg resolve -m a | |
458 | (no more unresolved files) |
|
458 | (no more unresolved files) | |
459 | continue: hg graft --continue |
|
459 | continue: hg graft --continue | |
460 | $ hg graft -c |
|
460 | $ hg graft -c | |
461 | grafting 1:5d205f8b35b6 "1" |
|
461 | grafting 1:5d205f8b35b6 "1" | |
462 | $ hg export tip --git |
|
462 | $ hg export tip --git | |
463 | # HG changeset patch |
|
463 | # HG changeset patch | |
464 | # User bar |
|
464 | # User bar | |
465 | # Date 0 0 |
|
465 | # Date 0 0 | |
466 | # Thu Jan 01 00:00:00 1970 +0000 |
|
466 | # Thu Jan 01 00:00:00 1970 +0000 | |
467 | # Node ID f67661df0c4804d301f064f332b57e7d5ddaf2be |
|
467 | # Node ID f67661df0c4804d301f064f332b57e7d5ddaf2be | |
468 | # Parent aaa4406d4f0ae9befd6e58c82ec63706460cbca6 |
|
468 | # Parent aaa4406d4f0ae9befd6e58c82ec63706460cbca6 | |
469 | 1 |
|
469 | 1 | |
470 |
|
470 | |||
471 | diff --git a/a b/a |
|
471 | diff --git a/a b/a | |
472 | --- a/a |
|
472 | --- a/a | |
473 | +++ b/a |
|
473 | +++ b/a | |
474 | @@ -1,1 +1,1 @@ |
|
474 | @@ -1,1 +1,1 @@ | |
475 | -c |
|
475 | -c | |
476 | +b |
|
476 | +b | |
477 |
|
477 | |||
478 | Resolve conflicted graft with rename |
|
478 | Resolve conflicted graft with rename | |
479 | $ echo c > a |
|
479 | $ echo c > a | |
480 | $ hg ci -m 10 |
|
480 | $ hg ci -m 10 | |
481 | $ hg graft 2 --tool internal:fail |
|
481 | $ hg graft 2 --tool internal:fail | |
482 | grafting 2:5c095ad7e90f "2" |
|
482 | grafting 2:5c095ad7e90f "2" | |
483 | abort: unresolved conflicts, can't continue |
|
483 | abort: unresolved conflicts, can't continue | |
484 | (use hg resolve and hg graft --continue) |
|
484 | (use 'hg resolve' and 'hg graft --continue') | |
485 | [255] |
|
485 | [255] | |
486 | $ hg resolve --all |
|
486 | $ hg resolve --all | |
487 | merging a and b to b |
|
487 | merging a and b to b | |
488 | (no more unresolved files) |
|
488 | (no more unresolved files) | |
489 | continue: hg graft --continue |
|
489 | continue: hg graft --continue | |
490 | $ hg graft -c |
|
490 | $ hg graft -c | |
491 | grafting 2:5c095ad7e90f "2" |
|
491 | grafting 2:5c095ad7e90f "2" | |
492 | $ hg export tip --git |
|
492 | $ hg export tip --git | |
493 | # HG changeset patch |
|
493 | # HG changeset patch | |
494 | # User test |
|
494 | # User test | |
495 | # Date 0 0 |
|
495 | # Date 0 0 | |
496 | # Thu Jan 01 00:00:00 1970 +0000 |
|
496 | # Thu Jan 01 00:00:00 1970 +0000 | |
497 | # Node ID 9627f653b421c61fc1ea4c4e366745070fa3d2bc |
|
497 | # Node ID 9627f653b421c61fc1ea4c4e366745070fa3d2bc | |
498 | # Parent ee295f490a40b97f3d18dd4c4f1c8936c233b612 |
|
498 | # Parent ee295f490a40b97f3d18dd4c4f1c8936c233b612 | |
499 | 2 |
|
499 | 2 | |
500 |
|
500 | |||
501 | diff --git a/a b/b |
|
501 | diff --git a/a b/b | |
502 | rename from a |
|
502 | rename from a | |
503 | rename to b |
|
503 | rename to b | |
504 |
|
504 | |||
505 | Test simple origin(), with and without args |
|
505 | Test simple origin(), with and without args | |
506 | $ hg log -r 'origin()' |
|
506 | $ hg log -r 'origin()' | |
507 | changeset: 1:5d205f8b35b6 |
|
507 | changeset: 1:5d205f8b35b6 | |
508 | user: bar |
|
508 | user: bar | |
509 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
509 | date: Thu Jan 01 00:00:00 1970 +0000 | |
510 | summary: 1 |
|
510 | summary: 1 | |
511 |
|
511 | |||
512 | changeset: 2:5c095ad7e90f |
|
512 | changeset: 2:5c095ad7e90f | |
513 | user: test |
|
513 | user: test | |
514 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
514 | date: Thu Jan 01 00:00:00 1970 +0000 | |
515 | summary: 2 |
|
515 | summary: 2 | |
516 |
|
516 | |||
517 | changeset: 3:4c60f11aa304 |
|
517 | changeset: 3:4c60f11aa304 | |
518 | user: baz |
|
518 | user: baz | |
519 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
519 | date: Thu Jan 01 00:00:00 1970 +0000 | |
520 | summary: 3 |
|
520 | summary: 3 | |
521 |
|
521 | |||
522 | changeset: 4:9c233e8e184d |
|
522 | changeset: 4:9c233e8e184d | |
523 | user: test |
|
523 | user: test | |
524 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
524 | date: Thu Jan 01 00:00:00 1970 +0000 | |
525 | summary: 4 |
|
525 | summary: 4 | |
526 |
|
526 | |||
527 | changeset: 5:97f8bfe72746 |
|
527 | changeset: 5:97f8bfe72746 | |
528 | branch: stable |
|
528 | branch: stable | |
529 | parent: 3:4c60f11aa304 |
|
529 | parent: 3:4c60f11aa304 | |
530 | user: test |
|
530 | user: test | |
531 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
531 | date: Thu Jan 01 00:00:00 1970 +0000 | |
532 | summary: 5 |
|
532 | summary: 5 | |
533 |
|
533 | |||
534 | $ hg log -r 'origin(7)' |
|
534 | $ hg log -r 'origin(7)' | |
535 | changeset: 2:5c095ad7e90f |
|
535 | changeset: 2:5c095ad7e90f | |
536 | user: test |
|
536 | user: test | |
537 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
537 | date: Thu Jan 01 00:00:00 1970 +0000 | |
538 | summary: 2 |
|
538 | summary: 2 | |
539 |
|
539 | |||
540 | Now transplant a graft to test following through copies |
|
540 | Now transplant a graft to test following through copies | |
541 | $ hg up -q 0 |
|
541 | $ hg up -q 0 | |
542 | $ hg branch -q dev |
|
542 | $ hg branch -q dev | |
543 | $ hg ci -qm "dev branch" |
|
543 | $ hg ci -qm "dev branch" | |
544 | $ hg --config extensions.transplant= transplant -q 7 |
|
544 | $ hg --config extensions.transplant= transplant -q 7 | |
545 | $ hg log -r 'origin(.)' |
|
545 | $ hg log -r 'origin(.)' | |
546 | changeset: 2:5c095ad7e90f |
|
546 | changeset: 2:5c095ad7e90f | |
547 | user: test |
|
547 | user: test | |
548 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
548 | date: Thu Jan 01 00:00:00 1970 +0000 | |
549 | summary: 2 |
|
549 | summary: 2 | |
550 |
|
550 | |||
551 | Test that the graft and transplant markers in extra are converted, allowing |
|
551 | Test that the graft and transplant markers in extra are converted, allowing | |
552 | origin() to still work. Note that these recheck the immediately preceeding two |
|
552 | origin() to still work. Note that these recheck the immediately preceeding two | |
553 | tests. |
|
553 | tests. | |
554 | $ hg --quiet --config extensions.convert= --config convert.hg.saverev=True convert . ../converted |
|
554 | $ hg --quiet --config extensions.convert= --config convert.hg.saverev=True convert . ../converted | |
555 |
|
555 | |||
556 | The graft case |
|
556 | The graft case | |
557 | $ hg -R ../converted log -r 7 --template "{rev}: {node}\n{join(extras, '\n')}\n" |
|
557 | $ hg -R ../converted log -r 7 --template "{rev}: {node}\n{join(extras, '\n')}\n" | |
558 | 7: 7ae846e9111fc8f57745634250c7b9ac0a60689b |
|
558 | 7: 7ae846e9111fc8f57745634250c7b9ac0a60689b | |
559 | branch=default |
|
559 | branch=default | |
560 | convert_revision=ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
560 | convert_revision=ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
561 | source=e0213322b2c1a5d5d236c74e79666441bee67a7d |
|
561 | source=e0213322b2c1a5d5d236c74e79666441bee67a7d | |
562 | $ hg -R ../converted log -r 'origin(7)' |
|
562 | $ hg -R ../converted log -r 'origin(7)' | |
563 | changeset: 2:e0213322b2c1 |
|
563 | changeset: 2:e0213322b2c1 | |
564 | user: test |
|
564 | user: test | |
565 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
565 | date: Thu Jan 01 00:00:00 1970 +0000 | |
566 | summary: 2 |
|
566 | summary: 2 | |
567 |
|
567 | |||
568 | Test that template correctly expands more than one 'extra' (issue4362), and that |
|
568 | Test that template correctly expands more than one 'extra' (issue4362), and that | |
569 | 'intermediate-source' is converted. |
|
569 | 'intermediate-source' is converted. | |
570 | $ hg -R ../converted log -r 13 --template "{extras % ' Extra: {extra}\n'}" |
|
570 | $ hg -R ../converted log -r 13 --template "{extras % ' Extra: {extra}\n'}" | |
571 | Extra: branch=default |
|
571 | Extra: branch=default | |
572 | Extra: convert_revision=7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
572 | Extra: convert_revision=7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
573 | Extra: intermediate-source=7ae846e9111fc8f57745634250c7b9ac0a60689b |
|
573 | Extra: intermediate-source=7ae846e9111fc8f57745634250c7b9ac0a60689b | |
574 | Extra: source=e0213322b2c1a5d5d236c74e79666441bee67a7d |
|
574 | Extra: source=e0213322b2c1a5d5d236c74e79666441bee67a7d | |
575 |
|
575 | |||
576 | The transplant case |
|
576 | The transplant case | |
577 | $ hg -R ../converted log -r tip --template "{rev}: {node}\n{join(extras, '\n')}\n" |
|
577 | $ hg -R ../converted log -r tip --template "{rev}: {node}\n{join(extras, '\n')}\n" | |
578 | 21: fbb6c5cc81002f2b4b49c9d731404688bcae5ade |
|
578 | 21: fbb6c5cc81002f2b4b49c9d731404688bcae5ade | |
579 | branch=dev |
|
579 | branch=dev | |
580 | convert_revision=7e61b508e709a11d28194a5359bc3532d910af21 |
|
580 | convert_revision=7e61b508e709a11d28194a5359bc3532d910af21 | |
581 | transplant_source=z\xe8F\xe9\x11\x1f\xc8\xf5wEcBP\xc7\xb9\xac (esc) |
|
581 | transplant_source=z\xe8F\xe9\x11\x1f\xc8\xf5wEcBP\xc7\xb9\xac (esc) | |
582 | `h\x9b (esc) |
|
582 | `h\x9b (esc) | |
583 | $ hg -R ../converted log -r 'origin(tip)' |
|
583 | $ hg -R ../converted log -r 'origin(tip)' | |
584 | changeset: 2:e0213322b2c1 |
|
584 | changeset: 2:e0213322b2c1 | |
585 | user: test |
|
585 | user: test | |
586 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
586 | date: Thu Jan 01 00:00:00 1970 +0000 | |
587 | summary: 2 |
|
587 | summary: 2 | |
588 |
|
588 | |||
589 |
|
589 | |||
590 | Test simple destination |
|
590 | Test simple destination | |
591 | $ hg log -r 'destination()' |
|
591 | $ hg log -r 'destination()' | |
592 | changeset: 7:ef0ef43d49e7 |
|
592 | changeset: 7:ef0ef43d49e7 | |
593 | parent: 0:68795b066622 |
|
593 | parent: 0:68795b066622 | |
594 | user: foo |
|
594 | user: foo | |
595 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
595 | date: Thu Jan 01 00:00:00 1970 +0000 | |
596 | summary: 2 |
|
596 | summary: 2 | |
597 |
|
597 | |||
598 | changeset: 8:6b9e5368ca4e |
|
598 | changeset: 8:6b9e5368ca4e | |
599 | user: bar |
|
599 | user: bar | |
600 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
600 | date: Thu Jan 01 00:00:00 1970 +0000 | |
601 | summary: 1 |
|
601 | summary: 1 | |
602 |
|
602 | |||
603 | changeset: 9:1905859650ec |
|
603 | changeset: 9:1905859650ec | |
604 | user: test |
|
604 | user: test | |
605 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
605 | date: Thu Jan 01 00:00:00 1970 +0000 | |
606 | summary: 5 |
|
606 | summary: 5 | |
607 |
|
607 | |||
608 | changeset: 10:52dc0b4c6907 |
|
608 | changeset: 10:52dc0b4c6907 | |
609 | user: test |
|
609 | user: test | |
610 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
610 | date: Thu Jan 01 00:00:00 1970 +0000 | |
611 | summary: 4 |
|
611 | summary: 4 | |
612 |
|
612 | |||
613 | changeset: 11:882b35362a6b |
|
613 | changeset: 11:882b35362a6b | |
614 | user: test |
|
614 | user: test | |
615 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
615 | date: Thu Jan 01 00:00:00 1970 +0000 | |
616 | summary: 3 |
|
616 | summary: 3 | |
617 |
|
617 | |||
618 | changeset: 13:7a4785234d87 |
|
618 | changeset: 13:7a4785234d87 | |
619 | user: foo |
|
619 | user: foo | |
620 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
620 | date: Thu Jan 01 00:00:00 1970 +0000 | |
621 | summary: 2 |
|
621 | summary: 2 | |
622 |
|
622 | |||
623 | changeset: 14:f64defefacee |
|
623 | changeset: 14:f64defefacee | |
624 | parent: 1:5d205f8b35b6 |
|
624 | parent: 1:5d205f8b35b6 | |
625 | user: foo |
|
625 | user: foo | |
626 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
626 | date: Thu Jan 01 00:00:00 1970 +0000 | |
627 | summary: 3 |
|
627 | summary: 3 | |
628 |
|
628 | |||
629 | changeset: 17:f67661df0c48 |
|
629 | changeset: 17:f67661df0c48 | |
630 | user: bar |
|
630 | user: bar | |
631 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
631 | date: Thu Jan 01 00:00:00 1970 +0000 | |
632 | summary: 1 |
|
632 | summary: 1 | |
633 |
|
633 | |||
634 | changeset: 19:9627f653b421 |
|
634 | changeset: 19:9627f653b421 | |
635 | user: test |
|
635 | user: test | |
636 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
636 | date: Thu Jan 01 00:00:00 1970 +0000 | |
637 | summary: 2 |
|
637 | summary: 2 | |
638 |
|
638 | |||
639 | changeset: 21:7e61b508e709 |
|
639 | changeset: 21:7e61b508e709 | |
640 | branch: dev |
|
640 | branch: dev | |
641 | tag: tip |
|
641 | tag: tip | |
642 | user: foo |
|
642 | user: foo | |
643 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
643 | date: Thu Jan 01 00:00:00 1970 +0000 | |
644 | summary: 2 |
|
644 | summary: 2 | |
645 |
|
645 | |||
646 | $ hg log -r 'destination(2)' |
|
646 | $ hg log -r 'destination(2)' | |
647 | changeset: 7:ef0ef43d49e7 |
|
647 | changeset: 7:ef0ef43d49e7 | |
648 | parent: 0:68795b066622 |
|
648 | parent: 0:68795b066622 | |
649 | user: foo |
|
649 | user: foo | |
650 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
650 | date: Thu Jan 01 00:00:00 1970 +0000 | |
651 | summary: 2 |
|
651 | summary: 2 | |
652 |
|
652 | |||
653 | changeset: 13:7a4785234d87 |
|
653 | changeset: 13:7a4785234d87 | |
654 | user: foo |
|
654 | user: foo | |
655 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
655 | date: Thu Jan 01 00:00:00 1970 +0000 | |
656 | summary: 2 |
|
656 | summary: 2 | |
657 |
|
657 | |||
658 | changeset: 19:9627f653b421 |
|
658 | changeset: 19:9627f653b421 | |
659 | user: test |
|
659 | user: test | |
660 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
660 | date: Thu Jan 01 00:00:00 1970 +0000 | |
661 | summary: 2 |
|
661 | summary: 2 | |
662 |
|
662 | |||
663 | changeset: 21:7e61b508e709 |
|
663 | changeset: 21:7e61b508e709 | |
664 | branch: dev |
|
664 | branch: dev | |
665 | tag: tip |
|
665 | tag: tip | |
666 | user: foo |
|
666 | user: foo | |
667 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
667 | date: Thu Jan 01 00:00:00 1970 +0000 | |
668 | summary: 2 |
|
668 | summary: 2 | |
669 |
|
669 | |||
670 | Transplants of grafts can find a destination... |
|
670 | Transplants of grafts can find a destination... | |
671 | $ hg log -r 'destination(7)' |
|
671 | $ hg log -r 'destination(7)' | |
672 | changeset: 21:7e61b508e709 |
|
672 | changeset: 21:7e61b508e709 | |
673 | branch: dev |
|
673 | branch: dev | |
674 | tag: tip |
|
674 | tag: tip | |
675 | user: foo |
|
675 | user: foo | |
676 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
676 | date: Thu Jan 01 00:00:00 1970 +0000 | |
677 | summary: 2 |
|
677 | summary: 2 | |
678 |
|
678 | |||
679 | ... grafts of grafts unfortunately can't |
|
679 | ... grafts of grafts unfortunately can't | |
680 | $ hg graft -q 13 |
|
680 | $ hg graft -q 13 | |
681 | warning: can't find ancestor for 'b' copied from 'a'! |
|
681 | warning: can't find ancestor for 'b' copied from 'a'! | |
682 | $ hg log -r 'destination(13)' |
|
682 | $ hg log -r 'destination(13)' | |
683 | All copies of a cset |
|
683 | All copies of a cset | |
684 | $ hg log -r 'origin(13) or destination(origin(13))' |
|
684 | $ hg log -r 'origin(13) or destination(origin(13))' | |
685 | changeset: 2:5c095ad7e90f |
|
685 | changeset: 2:5c095ad7e90f | |
686 | user: test |
|
686 | user: test | |
687 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
687 | date: Thu Jan 01 00:00:00 1970 +0000 | |
688 | summary: 2 |
|
688 | summary: 2 | |
689 |
|
689 | |||
690 | changeset: 7:ef0ef43d49e7 |
|
690 | changeset: 7:ef0ef43d49e7 | |
691 | parent: 0:68795b066622 |
|
691 | parent: 0:68795b066622 | |
692 | user: foo |
|
692 | user: foo | |
693 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
693 | date: Thu Jan 01 00:00:00 1970 +0000 | |
694 | summary: 2 |
|
694 | summary: 2 | |
695 |
|
695 | |||
696 | changeset: 13:7a4785234d87 |
|
696 | changeset: 13:7a4785234d87 | |
697 | user: foo |
|
697 | user: foo | |
698 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
698 | date: Thu Jan 01 00:00:00 1970 +0000 | |
699 | summary: 2 |
|
699 | summary: 2 | |
700 |
|
700 | |||
701 | changeset: 19:9627f653b421 |
|
701 | changeset: 19:9627f653b421 | |
702 | user: test |
|
702 | user: test | |
703 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
703 | date: Thu Jan 01 00:00:00 1970 +0000 | |
704 | summary: 2 |
|
704 | summary: 2 | |
705 |
|
705 | |||
706 | changeset: 21:7e61b508e709 |
|
706 | changeset: 21:7e61b508e709 | |
707 | branch: dev |
|
707 | branch: dev | |
708 | user: foo |
|
708 | user: foo | |
709 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
709 | date: Thu Jan 01 00:00:00 1970 +0000 | |
710 | summary: 2 |
|
710 | summary: 2 | |
711 |
|
711 | |||
712 | changeset: 22:d1cb6591fa4b |
|
712 | changeset: 22:d1cb6591fa4b | |
713 | branch: dev |
|
713 | branch: dev | |
714 | tag: tip |
|
714 | tag: tip | |
715 | user: foo |
|
715 | user: foo | |
716 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
716 | date: Thu Jan 01 00:00:00 1970 +0000 | |
717 | summary: 2 |
|
717 | summary: 2 | |
718 |
|
718 | |||
719 |
|
719 | |||
720 | graft works on complex revset |
|
720 | graft works on complex revset | |
721 |
|
721 | |||
722 | $ hg graft 'origin(13) or destination(origin(13))' |
|
722 | $ hg graft 'origin(13) or destination(origin(13))' | |
723 | skipping ancestor revision 21:7e61b508e709 |
|
723 | skipping ancestor revision 21:7e61b508e709 | |
724 | skipping ancestor revision 22:d1cb6591fa4b |
|
724 | skipping ancestor revision 22:d1cb6591fa4b | |
725 | skipping revision 2:5c095ad7e90f (already grafted to 22:d1cb6591fa4b) |
|
725 | skipping revision 2:5c095ad7e90f (already grafted to 22:d1cb6591fa4b) | |
726 | grafting 7:ef0ef43d49e7 "2" |
|
726 | grafting 7:ef0ef43d49e7 "2" | |
727 | warning: can't find ancestor for 'b' copied from 'a'! |
|
727 | warning: can't find ancestor for 'b' copied from 'a'! | |
728 | grafting 13:7a4785234d87 "2" |
|
728 | grafting 13:7a4785234d87 "2" | |
729 | warning: can't find ancestor for 'b' copied from 'a'! |
|
729 | warning: can't find ancestor for 'b' copied from 'a'! | |
730 | grafting 19:9627f653b421 "2" |
|
730 | grafting 19:9627f653b421 "2" | |
731 | merging b |
|
731 | merging b | |
732 | warning: can't find ancestor for 'b' copied from 'a'! |
|
732 | warning: can't find ancestor for 'b' copied from 'a'! | |
733 |
|
733 | |||
734 | graft with --force (still doesn't graft merges) |
|
734 | graft with --force (still doesn't graft merges) | |
735 |
|
735 | |||
736 | $ hg graft 19 0 6 |
|
736 | $ hg graft 19 0 6 | |
737 | skipping ungraftable merge revision 6 |
|
737 | skipping ungraftable merge revision 6 | |
738 | skipping ancestor revision 0:68795b066622 |
|
738 | skipping ancestor revision 0:68795b066622 | |
739 | skipping already grafted revision 19:9627f653b421 (22:d1cb6591fa4b also has origin 2:5c095ad7e90f) |
|
739 | skipping already grafted revision 19:9627f653b421 (22:d1cb6591fa4b also has origin 2:5c095ad7e90f) | |
740 | [255] |
|
740 | [255] | |
741 | $ hg graft 19 0 6 --force |
|
741 | $ hg graft 19 0 6 --force | |
742 | skipping ungraftable merge revision 6 |
|
742 | skipping ungraftable merge revision 6 | |
743 | grafting 19:9627f653b421 "2" |
|
743 | grafting 19:9627f653b421 "2" | |
744 | merging b |
|
744 | merging b | |
745 | warning: can't find ancestor for 'b' copied from 'a'! |
|
745 | warning: can't find ancestor for 'b' copied from 'a'! | |
746 | grafting 0:68795b066622 "0" |
|
746 | grafting 0:68795b066622 "0" | |
747 |
|
747 | |||
748 | graft --force after backout |
|
748 | graft --force after backout | |
749 |
|
749 | |||
750 | $ echo abc > a |
|
750 | $ echo abc > a | |
751 | $ hg ci -m 28 |
|
751 | $ hg ci -m 28 | |
752 | $ hg backout 28 |
|
752 | $ hg backout 28 | |
753 | reverting a |
|
753 | reverting a | |
754 | changeset 29:53177ba928f6 backs out changeset 28:50a516bb8b57 |
|
754 | changeset 29:53177ba928f6 backs out changeset 28:50a516bb8b57 | |
755 | $ hg graft 28 |
|
755 | $ hg graft 28 | |
756 | skipping ancestor revision 28:50a516bb8b57 |
|
756 | skipping ancestor revision 28:50a516bb8b57 | |
757 | [255] |
|
757 | [255] | |
758 | $ hg graft 28 --force |
|
758 | $ hg graft 28 --force | |
759 | grafting 28:50a516bb8b57 "28" |
|
759 | grafting 28:50a516bb8b57 "28" | |
760 | merging a |
|
760 | merging a | |
761 | $ cat a |
|
761 | $ cat a | |
762 | abc |
|
762 | abc | |
763 |
|
763 | |||
764 | graft --continue after --force |
|
764 | graft --continue after --force | |
765 |
|
765 | |||
766 | $ echo def > a |
|
766 | $ echo def > a | |
767 | $ hg ci -m 31 |
|
767 | $ hg ci -m 31 | |
768 | $ hg graft 28 --force --tool internal:fail |
|
768 | $ hg graft 28 --force --tool internal:fail | |
769 | grafting 28:50a516bb8b57 "28" |
|
769 | grafting 28:50a516bb8b57 "28" | |
770 | abort: unresolved conflicts, can't continue |
|
770 | abort: unresolved conflicts, can't continue | |
771 | (use hg resolve and hg graft --continue) |
|
771 | (use 'hg resolve' and 'hg graft --continue') | |
772 | [255] |
|
772 | [255] | |
773 | $ hg resolve --all |
|
773 | $ hg resolve --all | |
774 | merging a |
|
774 | merging a | |
775 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
775 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
776 | [1] |
|
776 | [1] | |
777 | $ echo abc > a |
|
777 | $ echo abc > a | |
778 | $ hg resolve -m a |
|
778 | $ hg resolve -m a | |
779 | (no more unresolved files) |
|
779 | (no more unresolved files) | |
780 | continue: hg graft --continue |
|
780 | continue: hg graft --continue | |
781 | $ hg graft -c |
|
781 | $ hg graft -c | |
782 | grafting 28:50a516bb8b57 "28" |
|
782 | grafting 28:50a516bb8b57 "28" | |
783 | $ cat a |
|
783 | $ cat a | |
784 | abc |
|
784 | abc | |
785 |
|
785 | |||
786 | Continue testing same origin policy, using revision numbers from test above |
|
786 | Continue testing same origin policy, using revision numbers from test above | |
787 | but do some destructive editing of the repo: |
|
787 | but do some destructive editing of the repo: | |
788 |
|
788 | |||
789 | $ hg up -qC 7 |
|
789 | $ hg up -qC 7 | |
790 | $ hg tag -l -r 13 tmp |
|
790 | $ hg tag -l -r 13 tmp | |
791 | $ hg --config extensions.strip= strip 2 |
|
791 | $ hg --config extensions.strip= strip 2 | |
792 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-d323a1e4-backup.hg (glob) |
|
792 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-d323a1e4-backup.hg (glob) | |
793 | $ hg graft tmp |
|
793 | $ hg graft tmp | |
794 | skipping already grafted revision 8:7a4785234d87 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f) |
|
794 | skipping already grafted revision 8:7a4785234d87 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f) | |
795 | [255] |
|
795 | [255] | |
796 |
|
796 | |||
797 | Empty graft |
|
797 | Empty graft | |
798 |
|
798 | |||
799 | $ hg up -qr 26 |
|
799 | $ hg up -qr 26 | |
800 | $ hg tag -f something |
|
800 | $ hg tag -f something | |
801 | $ hg graft -qr 27 |
|
801 | $ hg graft -qr 27 | |
802 | $ hg graft -f 27 |
|
802 | $ hg graft -f 27 | |
803 | grafting 27:ed6c7e54e319 "28" |
|
803 | grafting 27:ed6c7e54e319 "28" | |
804 | note: graft of 27:ed6c7e54e319 created no changes to commit |
|
804 | note: graft of 27:ed6c7e54e319 created no changes to commit | |
805 |
|
805 | |||
806 | $ cd .. |
|
806 | $ cd .. | |
807 |
|
807 | |||
808 | Graft to duplicate a commit |
|
808 | Graft to duplicate a commit | |
809 |
|
809 | |||
810 | $ hg init graftsibling |
|
810 | $ hg init graftsibling | |
811 | $ cd graftsibling |
|
811 | $ cd graftsibling | |
812 | $ touch a |
|
812 | $ touch a | |
813 | $ hg commit -qAm a |
|
813 | $ hg commit -qAm a | |
814 | $ touch b |
|
814 | $ touch b | |
815 | $ hg commit -qAm b |
|
815 | $ hg commit -qAm b | |
816 | $ hg log -G -T '{rev}\n' |
|
816 | $ hg log -G -T '{rev}\n' | |
817 | @ 1 |
|
817 | @ 1 | |
818 | | |
|
818 | | | |
819 | o 0 |
|
819 | o 0 | |
820 |
|
820 | |||
821 | $ hg up -q 0 |
|
821 | $ hg up -q 0 | |
822 | $ hg graft -r 1 |
|
822 | $ hg graft -r 1 | |
823 | grafting 1:0e067c57feba "b" (tip) |
|
823 | grafting 1:0e067c57feba "b" (tip) | |
824 | $ hg log -G -T '{rev}\n' |
|
824 | $ hg log -G -T '{rev}\n' | |
825 | @ 2 |
|
825 | @ 2 | |
826 | | |
|
826 | | | |
827 | | o 1 |
|
827 | | o 1 | |
828 | |/ |
|
828 | |/ | |
829 | o 0 |
|
829 | o 0 | |
830 |
|
830 | |||
831 | Graft to duplicate a commit twice |
|
831 | Graft to duplicate a commit twice | |
832 |
|
832 | |||
833 | $ hg up -q 0 |
|
833 | $ hg up -q 0 | |
834 | $ hg graft -r 2 |
|
834 | $ hg graft -r 2 | |
835 | grafting 2:044ec77f6389 "b" (tip) |
|
835 | grafting 2:044ec77f6389 "b" (tip) | |
836 | $ hg log -G -T '{rev}\n' |
|
836 | $ hg log -G -T '{rev}\n' | |
837 | @ 3 |
|
837 | @ 3 | |
838 | | |
|
838 | | | |
839 | | o 2 |
|
839 | | o 2 | |
840 | |/ |
|
840 | |/ | |
841 | | o 1 |
|
841 | | o 1 | |
842 | |/ |
|
842 | |/ | |
843 | o 0 |
|
843 | o 0 | |
844 |
|
844 |
@@ -1,96 +1,96 b'' | |||||
1 | https://bz.mercurial-scm.org/1175 |
|
1 | https://bz.mercurial-scm.org/1175 | |
2 |
|
2 | |||
3 | $ hg init |
|
3 | $ hg init | |
4 | $ touch a |
|
4 | $ touch a | |
5 | $ hg ci -Am0 |
|
5 | $ hg ci -Am0 | |
6 | adding a |
|
6 | adding a | |
7 |
|
7 | |||
8 | $ hg mv a a1 |
|
8 | $ hg mv a a1 | |
9 | $ hg ci -m1 |
|
9 | $ hg ci -m1 | |
10 |
|
10 | |||
11 | $ hg co 0 |
|
11 | $ hg co 0 | |
12 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
12 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
13 |
|
13 | |||
14 | $ hg mv a a2 |
|
14 | $ hg mv a a2 | |
15 | $ hg up |
|
15 | $ hg up | |
16 | note: possible conflict - a was renamed multiple times to: |
|
16 | note: possible conflict - a was renamed multiple times to: | |
17 | a2 |
|
17 | a2 | |
18 | a1 |
|
18 | a1 | |
19 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
19 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
20 |
|
20 | |||
21 | $ hg ci -m2 |
|
21 | $ hg ci -m2 | |
22 |
|
22 | |||
23 | $ touch a |
|
23 | $ touch a | |
24 | $ hg ci -Am3 |
|
24 | $ hg ci -Am3 | |
25 | adding a |
|
25 | adding a | |
26 |
|
26 | |||
27 | $ hg mv a b |
|
27 | $ hg mv a b | |
28 | $ hg ci -Am4 a |
|
28 | $ hg ci -Am4 a | |
29 |
|
29 | |||
30 | $ hg ci --debug --traceback -Am5 b |
|
30 | $ hg ci --debug --traceback -Am5 b | |
31 | committing files: |
|
31 | committing files: | |
32 | b |
|
32 | b | |
33 | warning: can't find ancestor for 'b' copied from 'a'! |
|
33 | warning: can't find ancestor for 'b' copied from 'a'! | |
34 | committing manifest |
|
34 | committing manifest | |
35 | committing changelog |
|
35 | committing changelog | |
36 | committed changeset 5:83a687e8a97c80992ba385bbfd766be181bfb1d1 |
|
36 | committed changeset 5:83a687e8a97c80992ba385bbfd766be181bfb1d1 | |
37 |
|
37 | |||
38 | $ hg verify |
|
38 | $ hg verify | |
39 | checking changesets |
|
39 | checking changesets | |
40 | checking manifests |
|
40 | checking manifests | |
41 | crosschecking files in changesets and manifests |
|
41 | crosschecking files in changesets and manifests | |
42 | checking files |
|
42 | checking files | |
43 | 4 files, 6 changesets, 4 total revisions |
|
43 | 4 files, 6 changesets, 4 total revisions | |
44 |
|
44 | |||
45 | $ hg export --git tip |
|
45 | $ hg export --git tip | |
46 | # HG changeset patch |
|
46 | # HG changeset patch | |
47 | # User test |
|
47 | # User test | |
48 | # Date 0 0 |
|
48 | # Date 0 0 | |
49 | # Thu Jan 01 00:00:00 1970 +0000 |
|
49 | # Thu Jan 01 00:00:00 1970 +0000 | |
50 | # Node ID 83a687e8a97c80992ba385bbfd766be181bfb1d1 |
|
50 | # Node ID 83a687e8a97c80992ba385bbfd766be181bfb1d1 | |
51 | # Parent 1d1625283f71954f21d14c3d44d0ad3c019c597f |
|
51 | # Parent 1d1625283f71954f21d14c3d44d0ad3c019c597f | |
52 | 5 |
|
52 | 5 | |
53 |
|
53 | |||
54 | diff --git a/b b/b |
|
54 | diff --git a/b b/b | |
55 | new file mode 100644 |
|
55 | new file mode 100644 | |
56 |
|
56 | |||
57 | http://bz.selenic.com/show_bug.cgi?id=4476 |
|
57 | http://bz.selenic.com/show_bug.cgi?id=4476 | |
58 |
|
58 | |||
59 | $ hg init foo |
|
59 | $ hg init foo | |
60 | $ cd foo |
|
60 | $ cd foo | |
61 | $ touch a && hg ci -Aqm a |
|
61 | $ touch a && hg ci -Aqm a | |
62 | $ hg mv a b |
|
62 | $ hg mv a b | |
63 | $ echo b1 >> b |
|
63 | $ echo b1 >> b | |
64 | $ hg ci -Aqm b1 |
|
64 | $ hg ci -Aqm b1 | |
65 | $ hg up 0 |
|
65 | $ hg up 0 | |
66 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
66 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
67 | $ hg mv a b |
|
67 | $ hg mv a b | |
68 | $ echo b2 >> b |
|
68 | $ echo b2 >> b | |
69 | $ hg ci -Aqm b2 |
|
69 | $ hg ci -Aqm b2 | |
70 | $ hg graft 1 |
|
70 | $ hg graft 1 | |
71 | grafting 1:5974126fad84 "b1" |
|
71 | grafting 1:5974126fad84 "b1" | |
72 | merging b |
|
72 | merging b | |
73 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') |
|
73 | warning: conflicts while merging b! (edit, then use 'hg resolve --mark') | |
74 | abort: unresolved conflicts, can't continue |
|
74 | abort: unresolved conflicts, can't continue | |
75 | (use hg resolve and hg graft --continue) |
|
75 | (use 'hg resolve' and 'hg graft --continue') | |
76 | [255] |
|
76 | [255] | |
77 | $ echo a > b |
|
77 | $ echo a > b | |
78 | $ echo b3 >> b |
|
78 | $ echo b3 >> b | |
79 | $ hg resolve --mark b |
|
79 | $ hg resolve --mark b | |
80 | (no more unresolved files) |
|
80 | (no more unresolved files) | |
81 | continue: hg graft --continue |
|
81 | continue: hg graft --continue | |
82 | $ hg graft --continue |
|
82 | $ hg graft --continue | |
83 | grafting 1:5974126fad84 "b1" |
|
83 | grafting 1:5974126fad84 "b1" | |
84 | warning: can't find ancestor for 'b' copied from 'a'! |
|
84 | warning: can't find ancestor for 'b' copied from 'a'! | |
85 | $ hg log -f b -T 'changeset: {rev}:{node|short}\nsummary: {desc}\n\n' |
|
85 | $ hg log -f b -T 'changeset: {rev}:{node|short}\nsummary: {desc}\n\n' | |
86 | changeset: 3:376d30ccffc0 |
|
86 | changeset: 3:376d30ccffc0 | |
87 | summary: b1 |
|
87 | summary: b1 | |
88 |
|
88 | |||
89 | changeset: 2:416baaa2e5e4 |
|
89 | changeset: 2:416baaa2e5e4 | |
90 | summary: b2 |
|
90 | summary: b2 | |
91 |
|
91 | |||
92 | changeset: 0:3903775176ed |
|
92 | changeset: 0:3903775176ed | |
93 | summary: a |
|
93 | summary: a | |
94 |
|
94 | |||
95 |
|
95 | |||
96 |
|
96 |
General Comments 0
You need to be logged in to leave comments.
Login now