annotate tests/test-graft.t @ 15907:51fc43253a52

changeset_printer: display changeset phase on debug level Backward compatibility make it hard to display it on higher level
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 17 Jan 2012 20:23:23 +0100
parents 12309c09d19a
children 4f9853e7f690
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
1 Create a repo with some stuff in it:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
3 $ hg init a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
4 $ cd a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
5 $ echo a > a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
6 $ echo a > d
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
7 $ echo a > e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
8 $ hg ci -qAm0
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
9 $ echo b > a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
10 $ hg ci -m1 -u bar
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
11 $ hg mv a b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
12 $ hg ci -m2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
13 $ hg cp b c
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
14 $ hg ci -m3 -u baz
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
15 $ echo b > d
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
16 $ echo f > e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
17 $ hg ci -m4
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
18 $ hg up -q 3
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
19 $ echo b > e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
20 $ hg branch -q stable
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
21 $ hg ci -m5
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
22 $ hg merge -q default --tool internal:local
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
23 $ hg branch -q default
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
24 $ hg ci -m6
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
25
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
26 Need to specify a rev:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
27
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
28 $ hg graft
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
29 abort: no revisions specified
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
30 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
31
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
32 Can't graft ancestor:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
33
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
34 $ hg graft 1 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
35 skipping ancestor revision 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
36 skipping ancestor revision 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
37 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
38
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
39 Can't graft with dirty wd:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
40
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
41 $ hg up -q 0
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
42 $ echo foo > a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
43 $ hg graft 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
44 abort: outstanding uncommitted changes
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
45 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
46 $ hg revert a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
47
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
48 Graft a rename:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
49
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
50 $ hg graft 2 -u foo
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
51 grafting revision 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
52 merging a and b to b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
53 $ hg export tip --git
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
54 # HG changeset patch
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
55 # User foo
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
56 # Date 0 0
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
57 # Node ID d2e44c99fd3f31c176ea4efb9eca9f6306c81756
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
58 # Parent 68795b066622ca79a25816a662041d8f78f3cd9e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
59 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
60
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
61 diff --git a/a b/b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
62 rename from a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
63 rename to b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
64 --- a/a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
65 +++ b/b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
66 @@ -1,1 +1,1 @@
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
67 -a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
68 +b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
69
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
70 Look for extra:source
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
71
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
72 $ hg log --debug -r tip
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
73 changeset: 7:d2e44c99fd3f31c176ea4efb9eca9f6306c81756
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
74 tag: tip
15907
51fc43253a52 changeset_printer: display changeset phase on debug level
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15777
diff changeset
75 phase: draft
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
76 parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
77 parent: -1:0000000000000000000000000000000000000000
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
78 manifest: 7:5d59766436fd8fbcd38e7bebef0f6eaf3eebe637
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
79 user: foo
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
80 date: Thu Jan 01 00:00:00 1970 +0000
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
81 files+: b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
82 files-: a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
83 extra: branch=default
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
84 extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
85 description:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
86 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
87
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
88
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
89
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
90 Graft out of order, skipping a merge and a duplicate
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
91
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
92 $ hg graft 1 5 4 3 'merge()' 2 --debug
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
93 skipping ungraftable merge revision 6
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
94 scanning for duplicate grafts
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
95 skipping already grafted revision 2
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
96 grafting revision 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
97 searching for copies back to rev 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
98 unmatched files in local:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
99 a.orig
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
100 b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
101 all copies found (* = to merge, ! = divergent):
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
102 b -> a *
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
103 checking for directory renames
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
104 resolving manifests
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15513
diff changeset
105 overwrite: False, partial: False
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15513
diff changeset
106 ancestor: 68795b066622, local: d2e44c99fd3f+, remote: 5d205f8b35b6
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
107 b: local copied/moved to a -> m
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
108 preserving b for resolve of b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
109 updating: b 1/1 files (100.00%)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
110 b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
111 b: searching for copy revision for a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
112 b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
113 grafting revision 5
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
114 searching for copies back to rev 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
115 unmatched files in local:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
116 a.orig
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
117 resolving manifests
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15513
diff changeset
118 overwrite: False, partial: False
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15513
diff changeset
119 ancestor: 4c60f11aa304, local: 6f5ea6ac8b70+, remote: 97f8bfe72746
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
120 e: remote is newer -> g
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
121 updating: e 1/1 files (100.00%)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
122 getting e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
123 e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
124 grafting revision 4
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
125 searching for copies back to rev 1
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
126 unmatched files in local:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
127 a.orig
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
128 resolving manifests
15625
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15513
diff changeset
129 overwrite: False, partial: False
efdcce3fd2d5 merge: make debug output easier to read
Martin Geisler <mg@aragost.com>
parents: 15513
diff changeset
130 ancestor: 4c60f11aa304, local: 77eb504366ab+, remote: 9c233e8e184d
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
131 e: versions differ -> m
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
132 d: remote is newer -> g
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
133 preserving e for resolve of e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
134 updating: d 1/2 files (50.00%)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
135 getting d
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
136 updating: e 2/2 files (100.00%)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
137 picked tool 'internal:merge' for e (binary False symlink False)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
138 merging e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
139 my e@77eb504366ab+ other e@9c233e8e184d ancestor e@68795b066622
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
140 warning: conflicts during merge.
15501
2371f4aea665 merge: give a special message for internal:merge failure (issue3105)
Matt Mackall <mpm@selenic.com>
parents: 15361
diff changeset
141 merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
142 abort: unresolved conflicts, can't continue
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
143 (use hg resolve and hg graft --continue)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
144 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
145
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
146 Continue without resolve should fail:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
147
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
148 $ hg graft -c
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
149 grafting revision 4
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
150 abort: unresolved merge conflicts (see hg help resolve)
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
151 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
152
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
153 Fix up:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
154
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
155 $ echo b > e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
156 $ hg resolve -m e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
157
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
158 Continue with a revision should fail:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
159
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
160 $ hg graft -c 6
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
161 abort: can't specify --continue and revisions
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
162 [255]
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
163
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
164 Continue for real, clobber usernames
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
165
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
166 $ hg graft -c -U
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
167 grafting revision 4
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
168 grafting revision 3
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
169
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
170 Compare with original:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
171
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
172 $ hg diff -r 6
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
173 $ hg status --rev 0:. -C
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
174 M d
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
175 M e
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
176 A b
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
177 a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
178 A c
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
179 a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
180 R a
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
181
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
182 View graph:
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
183
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
184 $ hg --config extensions.graphlog= log -G --template '{author}@{rev}: {desc}\n'
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
185 @ test@11: 3
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
186 |
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
187 o test@10: 4
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
188 |
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
189 o test@9: 5
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
190 |
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
191 o bar@8: 1
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
192 |
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
193 o foo@7: 2
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
194 |
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
195 | o test@6: 6
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
196 | |\
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
197 | | o test@5: 5
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
198 | | |
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
199 | o | test@4: 4
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
200 | |/
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
201 | o baz@3: 3
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
202 | |
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
203 | o test@2: 2
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
204 | |
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
205 | o bar@1: 1
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
206 |/
15507
7186b54b07c6 graft: use revs to make tests more readable
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15506
diff changeset
207 o test@0: 0
15361
c1930992e111 graft: add a test
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
208
15506
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
209 Graft again onto another branch should preserve the original source
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
210 $ hg up -q 0
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
211 $ echo 'g'>g
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
212 $ hg add g
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
213 $ hg ci -m 7
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
214 created new head
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
215 $ hg graft 7
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
216 grafting revision 7
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
217
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
218 $ hg log -r 7 --template '{rev}:{node}\n'
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
219 7:d2e44c99fd3f31c176ea4efb9eca9f6306c81756
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
220 $ hg log -r 2 --template '{rev}:{node}\n'
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
221 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
222
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
223 $ hg log --debug -r tip
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
224 changeset: 13:39bb1d13572759bd1e6fc874fed1b12ece047a18
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
225 tag: tip
15907
51fc43253a52 changeset_printer: display changeset phase on debug level
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 15777
diff changeset
226 phase: draft
15506
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
227 parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
228 parent: -1:0000000000000000000000000000000000000000
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
229 manifest: 13:0780e055d8f4cd12eadd5a2719481648f336f7a9
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
230 user: foo
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
231 date: Thu Jan 01 00:00:00 1970 +0000
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
232 files+: b
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
233 files-: a
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
234 extra: branch=default
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
235 extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
236 description:
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
237 2
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
238
dc9fb7015d7f graft: preserve original source in subsequent grafts
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15361
diff changeset
239
15508
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
240 Disallow grafting an already grafted cset onto its original branch
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
241 $ hg up -q 6
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
242 $ hg graft 7
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
243 skipping already grafted revision 7 (was grafted from 2)
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
244 [255]
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
245
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
246 Disallow grafting already grafted csets with the same origin onto each other
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
247 $ hg up -q 13
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
248 $ hg graft 2
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
249 skipping already grafted revision 2
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
250 [255]
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
251 $ hg graft 7
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
252 skipping already grafted revision 7 (same origin 2)
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
253 [255]
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
254
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
255 $ hg up -q 7
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
256 $ hg graft 2
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
257 skipping already grafted revision 2
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
258 [255]
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
259 $ hg graft tip
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
260 skipping already grafted revision 13 (same origin 2)
00276525e2b7 graft: disallow grafting grafted csets in specific situations (issue3091)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 15507
diff changeset
261 [255]