Show More
@@ -1,764 +1,767 b'' | |||||
1 | # configitems.py - centralized declaration of configuration option |
|
1 | # configitems.py - centralized declaration of configuration option | |
2 | # |
|
2 | # | |
3 | # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net> |
|
3 | # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import functools |
|
10 | import functools | |
11 |
|
11 | |||
12 | from . import ( |
|
12 | from . import ( | |
13 | encoding, |
|
13 | encoding, | |
14 | error, |
|
14 | error, | |
15 | ) |
|
15 | ) | |
16 |
|
16 | |||
17 | def loadconfigtable(ui, extname, configtable): |
|
17 | def loadconfigtable(ui, extname, configtable): | |
18 | """update config item known to the ui with the extension ones""" |
|
18 | """update config item known to the ui with the extension ones""" | |
19 | for section, items in configtable.items(): |
|
19 | for section, items in configtable.items(): | |
20 | knownitems = ui._knownconfig.setdefault(section, {}) |
|
20 | knownitems = ui._knownconfig.setdefault(section, {}) | |
21 | knownkeys = set(knownitems) |
|
21 | knownkeys = set(knownitems) | |
22 | newkeys = set(items) |
|
22 | newkeys = set(items) | |
23 | for key in sorted(knownkeys & newkeys): |
|
23 | for key in sorted(knownkeys & newkeys): | |
24 | msg = "extension '%s' overwrite config item '%s.%s'" |
|
24 | msg = "extension '%s' overwrite config item '%s.%s'" | |
25 | msg %= (extname, section, key) |
|
25 | msg %= (extname, section, key) | |
26 | ui.develwarn(msg, config='warn-config') |
|
26 | ui.develwarn(msg, config='warn-config') | |
27 |
|
27 | |||
28 | knownitems.update(items) |
|
28 | knownitems.update(items) | |
29 |
|
29 | |||
30 | class configitem(object): |
|
30 | class configitem(object): | |
31 | """represent a known config item |
|
31 | """represent a known config item | |
32 |
|
32 | |||
33 | :section: the official config section where to find this item, |
|
33 | :section: the official config section where to find this item, | |
34 | :name: the official name within the section, |
|
34 | :name: the official name within the section, | |
35 | :default: default value for this item, |
|
35 | :default: default value for this item, | |
36 | :alias: optional list of tuples as alternatives. |
|
36 | :alias: optional list of tuples as alternatives. | |
37 | """ |
|
37 | """ | |
38 |
|
38 | |||
39 | def __init__(self, section, name, default=None, alias=()): |
|
39 | def __init__(self, section, name, default=None, alias=()): | |
40 | self.section = section |
|
40 | self.section = section | |
41 | self.name = name |
|
41 | self.name = name | |
42 | self.default = default |
|
42 | self.default = default | |
43 | self.alias = list(alias) |
|
43 | self.alias = list(alias) | |
44 |
|
44 | |||
45 | coreitems = {} |
|
45 | coreitems = {} | |
46 |
|
46 | |||
47 | def _register(configtable, *args, **kwargs): |
|
47 | def _register(configtable, *args, **kwargs): | |
48 | item = configitem(*args, **kwargs) |
|
48 | item = configitem(*args, **kwargs) | |
49 | section = configtable.setdefault(item.section, {}) |
|
49 | section = configtable.setdefault(item.section, {}) | |
50 | if item.name in section: |
|
50 | if item.name in section: | |
51 | msg = "duplicated config item registration for '%s.%s'" |
|
51 | msg = "duplicated config item registration for '%s.%s'" | |
52 | raise error.ProgrammingError(msg % (item.section, item.name)) |
|
52 | raise error.ProgrammingError(msg % (item.section, item.name)) | |
53 | section[item.name] = item |
|
53 | section[item.name] = item | |
54 |
|
54 | |||
55 | # special value for case where the default is derived from other values |
|
55 | # special value for case where the default is derived from other values | |
56 | dynamicdefault = object() |
|
56 | dynamicdefault = object() | |
57 |
|
57 | |||
58 | # Registering actual config items |
|
58 | # Registering actual config items | |
59 |
|
59 | |||
60 | def getitemregister(configtable): |
|
60 | def getitemregister(configtable): | |
61 | return functools.partial(_register, configtable) |
|
61 | return functools.partial(_register, configtable) | |
62 |
|
62 | |||
63 | coreconfigitem = getitemregister(coreitems) |
|
63 | coreconfigitem = getitemregister(coreitems) | |
64 |
|
64 | |||
65 | coreconfigitem('auth', 'cookiefile', |
|
65 | coreconfigitem('auth', 'cookiefile', | |
66 | default=None, |
|
66 | default=None, | |
67 | ) |
|
67 | ) | |
68 | # bookmarks.pushing: internal hack for discovery |
|
68 | # bookmarks.pushing: internal hack for discovery | |
69 | coreconfigitem('bookmarks', 'pushing', |
|
69 | coreconfigitem('bookmarks', 'pushing', | |
70 | default=list, |
|
70 | default=list, | |
71 | ) |
|
71 | ) | |
72 | # bundle.mainreporoot: internal hack for bundlerepo |
|
72 | # bundle.mainreporoot: internal hack for bundlerepo | |
73 | coreconfigitem('bundle', 'mainreporoot', |
|
73 | coreconfigitem('bundle', 'mainreporoot', | |
74 | default='', |
|
74 | default='', | |
75 | ) |
|
75 | ) | |
76 | # bundle.reorder: experimental config |
|
76 | # bundle.reorder: experimental config | |
77 | coreconfigitem('bundle', 'reorder', |
|
77 | coreconfigitem('bundle', 'reorder', | |
78 | default='auto', |
|
78 | default='auto', | |
79 | ) |
|
79 | ) | |
80 | coreconfigitem('censor', 'policy', |
|
80 | coreconfigitem('censor', 'policy', | |
81 | default='abort', |
|
81 | default='abort', | |
82 | ) |
|
82 | ) | |
83 | coreconfigitem('chgserver', 'idletimeout', |
|
83 | coreconfigitem('chgserver', 'idletimeout', | |
84 | default=3600, |
|
84 | default=3600, | |
85 | ) |
|
85 | ) | |
86 | coreconfigitem('chgserver', 'skiphash', |
|
86 | coreconfigitem('chgserver', 'skiphash', | |
87 | default=False, |
|
87 | default=False, | |
88 | ) |
|
88 | ) | |
89 | coreconfigitem('cmdserver', 'log', |
|
89 | coreconfigitem('cmdserver', 'log', | |
90 | default=None, |
|
90 | default=None, | |
91 | ) |
|
91 | ) | |
92 | coreconfigitem('color', 'mode', |
|
92 | coreconfigitem('color', 'mode', | |
93 | default='auto', |
|
93 | default='auto', | |
94 | ) |
|
94 | ) | |
95 | coreconfigitem('color', 'pagermode', |
|
95 | coreconfigitem('color', 'pagermode', | |
96 | default=dynamicdefault, |
|
96 | default=dynamicdefault, | |
97 | ) |
|
97 | ) | |
98 | coreconfigitem('commands', 'status.relative', |
|
98 | coreconfigitem('commands', 'status.relative', | |
99 | default=False, |
|
99 | default=False, | |
100 | ) |
|
100 | ) | |
101 | coreconfigitem('commands', 'status.skipstates', |
|
101 | coreconfigitem('commands', 'status.skipstates', | |
102 | default=[], |
|
102 | default=[], | |
103 | ) |
|
103 | ) | |
104 | coreconfigitem('commands', 'status.verbose', |
|
104 | coreconfigitem('commands', 'status.verbose', | |
105 | default=False, |
|
105 | default=False, | |
106 | ) |
|
106 | ) | |
107 | coreconfigitem('commands', 'update.requiredest', |
|
107 | coreconfigitem('commands', 'update.requiredest', | |
108 | default=False, |
|
108 | default=False, | |
109 | ) |
|
109 | ) | |
110 | coreconfigitem('debug', 'dirstate.delaywrite', |
|
110 | coreconfigitem('debug', 'dirstate.delaywrite', | |
111 | default=0, |
|
111 | default=0, | |
112 | ) |
|
112 | ) | |
113 | coreconfigitem('devel', 'all-warnings', |
|
113 | coreconfigitem('devel', 'all-warnings', | |
114 | default=False, |
|
114 | default=False, | |
115 | ) |
|
115 | ) | |
116 | coreconfigitem('devel', 'bundle2.debug', |
|
116 | coreconfigitem('devel', 'bundle2.debug', | |
117 | default=False, |
|
117 | default=False, | |
118 | ) |
|
118 | ) | |
119 | coreconfigitem('devel', 'cache-vfs', |
|
119 | coreconfigitem('devel', 'cache-vfs', | |
120 | default=None, |
|
120 | default=None, | |
121 | ) |
|
121 | ) | |
122 | coreconfigitem('devel', 'check-locks', |
|
122 | coreconfigitem('devel', 'check-locks', | |
123 | default=False, |
|
123 | default=False, | |
124 | ) |
|
124 | ) | |
125 | coreconfigitem('devel', 'check-relroot', |
|
125 | coreconfigitem('devel', 'check-relroot', | |
126 | default=False, |
|
126 | default=False, | |
127 | ) |
|
127 | ) | |
128 | coreconfigitem('devel', 'default-date', |
|
128 | coreconfigitem('devel', 'default-date', | |
129 | default=None, |
|
129 | default=None, | |
130 | ) |
|
130 | ) | |
131 | coreconfigitem('devel', 'deprec-warn', |
|
131 | coreconfigitem('devel', 'deprec-warn', | |
132 | default=False, |
|
132 | default=False, | |
133 | ) |
|
133 | ) | |
134 | coreconfigitem('devel', 'disableloaddefaultcerts', |
|
134 | coreconfigitem('devel', 'disableloaddefaultcerts', | |
135 | default=False, |
|
135 | default=False, | |
136 | ) |
|
136 | ) | |
137 | coreconfigitem('devel', 'empty-changegroup', |
|
137 | coreconfigitem('devel', 'empty-changegroup', | |
138 | default=False, |
|
138 | default=False, | |
139 | ) |
|
139 | ) | |
140 | coreconfigitem('devel', 'legacy.exchange', |
|
140 | coreconfigitem('devel', 'legacy.exchange', | |
141 | default=list, |
|
141 | default=list, | |
142 | ) |
|
142 | ) | |
143 | coreconfigitem('devel', 'servercafile', |
|
143 | coreconfigitem('devel', 'servercafile', | |
144 | default='', |
|
144 | default='', | |
145 | ) |
|
145 | ) | |
146 | coreconfigitem('devel', 'serverexactprotocol', |
|
146 | coreconfigitem('devel', 'serverexactprotocol', | |
147 | default='', |
|
147 | default='', | |
148 | ) |
|
148 | ) | |
149 | coreconfigitem('devel', 'serverrequirecert', |
|
149 | coreconfigitem('devel', 'serverrequirecert', | |
150 | default=False, |
|
150 | default=False, | |
151 | ) |
|
151 | ) | |
152 | coreconfigitem('devel', 'strip-obsmarkers', |
|
152 | coreconfigitem('devel', 'strip-obsmarkers', | |
153 | default=True, |
|
153 | default=True, | |
154 | ) |
|
154 | ) | |
155 | coreconfigitem('devel', 'warn-config', |
|
155 | coreconfigitem('devel', 'warn-config', | |
156 | default=None, |
|
156 | default=None, | |
157 | ) |
|
157 | ) | |
158 | coreconfigitem('devel', 'warn-config-default', |
|
158 | coreconfigitem('devel', 'warn-config-default', | |
159 | default=None, |
|
159 | default=None, | |
160 | ) |
|
160 | ) | |
|
161 | coreconfigitem('devel', 'user.obsmarker', | |||
|
162 | default=None, | |||
|
163 | ) | |||
161 | coreconfigitem('diff', 'nodates', |
|
164 | coreconfigitem('diff', 'nodates', | |
162 | default=None, |
|
165 | default=None, | |
163 | ) |
|
166 | ) | |
164 | coreconfigitem('diff', 'showfunc', |
|
167 | coreconfigitem('diff', 'showfunc', | |
165 | default=None, |
|
168 | default=None, | |
166 | ) |
|
169 | ) | |
167 | coreconfigitem('diff', 'unified', |
|
170 | coreconfigitem('diff', 'unified', | |
168 | default=None, |
|
171 | default=None, | |
169 | ) |
|
172 | ) | |
170 | coreconfigitem('diff', 'git', |
|
173 | coreconfigitem('diff', 'git', | |
171 | default=None, |
|
174 | default=None, | |
172 | ) |
|
175 | ) | |
173 | coreconfigitem('diff', 'ignorews', |
|
176 | coreconfigitem('diff', 'ignorews', | |
174 | default=None, |
|
177 | default=None, | |
175 | ) |
|
178 | ) | |
176 | coreconfigitem('diff', 'ignorewsamount', |
|
179 | coreconfigitem('diff', 'ignorewsamount', | |
177 | default=None, |
|
180 | default=None, | |
178 | ) |
|
181 | ) | |
179 | coreconfigitem('diff', 'ignoreblanklines', |
|
182 | coreconfigitem('diff', 'ignoreblanklines', | |
180 | default=None, |
|
183 | default=None, | |
181 | ) |
|
184 | ) | |
182 | coreconfigitem('diff', 'ignorewseol', |
|
185 | coreconfigitem('diff', 'ignorewseol', | |
183 | default=None, |
|
186 | default=None, | |
184 | ) |
|
187 | ) | |
185 | coreconfigitem('diff', 'nobinary', |
|
188 | coreconfigitem('diff', 'nobinary', | |
186 | default=None, |
|
189 | default=None, | |
187 | ) |
|
190 | ) | |
188 | coreconfigitem('diff', 'noprefix', |
|
191 | coreconfigitem('diff', 'noprefix', | |
189 | default=None, |
|
192 | default=None, | |
190 | ) |
|
193 | ) | |
191 | coreconfigitem('email', 'charsets', |
|
194 | coreconfigitem('email', 'charsets', | |
192 | default=list, |
|
195 | default=list, | |
193 | ) |
|
196 | ) | |
194 | coreconfigitem('email', 'from', |
|
197 | coreconfigitem('email', 'from', | |
195 | default=None, |
|
198 | default=None, | |
196 | ) |
|
199 | ) | |
197 | coreconfigitem('email', 'method', |
|
200 | coreconfigitem('email', 'method', | |
198 | default='smtp', |
|
201 | default='smtp', | |
199 | ) |
|
202 | ) | |
200 | coreconfigitem('experimental', 'allowdivergence', |
|
203 | coreconfigitem('experimental', 'allowdivergence', | |
201 | default=False, |
|
204 | default=False, | |
202 | ) |
|
205 | ) | |
203 | coreconfigitem('experimental', 'bundle-phases', |
|
206 | coreconfigitem('experimental', 'bundle-phases', | |
204 | default=False, |
|
207 | default=False, | |
205 | ) |
|
208 | ) | |
206 | coreconfigitem('experimental', 'bundle2-advertise', |
|
209 | coreconfigitem('experimental', 'bundle2-advertise', | |
207 | default=True, |
|
210 | default=True, | |
208 | ) |
|
211 | ) | |
209 | coreconfigitem('experimental', 'bundle2-output-capture', |
|
212 | coreconfigitem('experimental', 'bundle2-output-capture', | |
210 | default=False, |
|
213 | default=False, | |
211 | ) |
|
214 | ) | |
212 | coreconfigitem('experimental', 'bundle2.pushback', |
|
215 | coreconfigitem('experimental', 'bundle2.pushback', | |
213 | default=False, |
|
216 | default=False, | |
214 | ) |
|
217 | ) | |
215 | coreconfigitem('experimental', 'bundle2lazylocking', |
|
218 | coreconfigitem('experimental', 'bundle2lazylocking', | |
216 | default=False, |
|
219 | default=False, | |
217 | ) |
|
220 | ) | |
218 | coreconfigitem('experimental', 'bundlecomplevel', |
|
221 | coreconfigitem('experimental', 'bundlecomplevel', | |
219 | default=None, |
|
222 | default=None, | |
220 | ) |
|
223 | ) | |
221 | coreconfigitem('experimental', 'changegroup3', |
|
224 | coreconfigitem('experimental', 'changegroup3', | |
222 | default=False, |
|
225 | default=False, | |
223 | ) |
|
226 | ) | |
224 | coreconfigitem('experimental', 'clientcompressionengines', |
|
227 | coreconfigitem('experimental', 'clientcompressionengines', | |
225 | default=list, |
|
228 | default=list, | |
226 | ) |
|
229 | ) | |
227 | coreconfigitem('experimental', 'copytrace', |
|
230 | coreconfigitem('experimental', 'copytrace', | |
228 | default='on', |
|
231 | default='on', | |
229 | ) |
|
232 | ) | |
230 | coreconfigitem('experimental', 'copytrace.sourcecommitlimit', |
|
233 | coreconfigitem('experimental', 'copytrace.sourcecommitlimit', | |
231 | default=100, |
|
234 | default=100, | |
232 | ) |
|
235 | ) | |
233 | coreconfigitem('experimental', 'crecordtest', |
|
236 | coreconfigitem('experimental', 'crecordtest', | |
234 | default=None, |
|
237 | default=None, | |
235 | ) |
|
238 | ) | |
236 | coreconfigitem('experimental', 'editortmpinhg', |
|
239 | coreconfigitem('experimental', 'editortmpinhg', | |
237 | default=False, |
|
240 | default=False, | |
238 | ) |
|
241 | ) | |
239 | coreconfigitem('experimental', 'maxdeltachainspan', |
|
242 | coreconfigitem('experimental', 'maxdeltachainspan', | |
240 | default=-1, |
|
243 | default=-1, | |
241 | ) |
|
244 | ) | |
242 | coreconfigitem('experimental', 'mmapindexthreshold', |
|
245 | coreconfigitem('experimental', 'mmapindexthreshold', | |
243 | default=None, |
|
246 | default=None, | |
244 | ) |
|
247 | ) | |
245 | coreconfigitem('experimental', 'nonnormalparanoidcheck', |
|
248 | coreconfigitem('experimental', 'nonnormalparanoidcheck', | |
246 | default=False, |
|
249 | default=False, | |
247 | ) |
|
250 | ) | |
248 | coreconfigitem('experimental', 'stabilization', |
|
251 | coreconfigitem('experimental', 'stabilization', | |
249 | default=list, |
|
252 | default=list, | |
250 | alias=[('experimental', 'evolution')], |
|
253 | alias=[('experimental', 'evolution')], | |
251 | ) |
|
254 | ) | |
252 | coreconfigitem('experimental', 'stabilization.bundle-obsmarker', |
|
255 | coreconfigitem('experimental', 'stabilization.bundle-obsmarker', | |
253 | default=False, |
|
256 | default=False, | |
254 | alias=[('experimental', 'evolution.bundle-obsmarker')], |
|
257 | alias=[('experimental', 'evolution.bundle-obsmarker')], | |
255 | ) |
|
258 | ) | |
256 | coreconfigitem('experimental', 'stabilization.track-operation', |
|
259 | coreconfigitem('experimental', 'stabilization.track-operation', | |
257 | default=True, |
|
260 | default=True, | |
258 | alias=[('experimental', 'evolution.track-operation')] |
|
261 | alias=[('experimental', 'evolution.track-operation')] | |
259 | ) |
|
262 | ) | |
260 | coreconfigitem('experimental', 'exportableenviron', |
|
263 | coreconfigitem('experimental', 'exportableenviron', | |
261 | default=list, |
|
264 | default=list, | |
262 | ) |
|
265 | ) | |
263 | coreconfigitem('experimental', 'extendedheader.index', |
|
266 | coreconfigitem('experimental', 'extendedheader.index', | |
264 | default=None, |
|
267 | default=None, | |
265 | ) |
|
268 | ) | |
266 | coreconfigitem('experimental', 'extendedheader.similarity', |
|
269 | coreconfigitem('experimental', 'extendedheader.similarity', | |
267 | default=False, |
|
270 | default=False, | |
268 | ) |
|
271 | ) | |
269 | coreconfigitem('experimental', 'format.compression', |
|
272 | coreconfigitem('experimental', 'format.compression', | |
270 | default='zlib', |
|
273 | default='zlib', | |
271 | ) |
|
274 | ) | |
272 | coreconfigitem('experimental', 'graphshorten', |
|
275 | coreconfigitem('experimental', 'graphshorten', | |
273 | default=False, |
|
276 | default=False, | |
274 | ) |
|
277 | ) | |
275 | coreconfigitem('experimental', 'graphstyle.parent', |
|
278 | coreconfigitem('experimental', 'graphstyle.parent', | |
276 | default=dynamicdefault, |
|
279 | default=dynamicdefault, | |
277 | ) |
|
280 | ) | |
278 | coreconfigitem('experimental', 'graphstyle.missing', |
|
281 | coreconfigitem('experimental', 'graphstyle.missing', | |
279 | default=dynamicdefault, |
|
282 | default=dynamicdefault, | |
280 | ) |
|
283 | ) | |
281 | coreconfigitem('experimental', 'graphstyle.grandparent', |
|
284 | coreconfigitem('experimental', 'graphstyle.grandparent', | |
282 | default=dynamicdefault, |
|
285 | default=dynamicdefault, | |
283 | ) |
|
286 | ) | |
284 | coreconfigitem('experimental', 'hook-track-tags', |
|
287 | coreconfigitem('experimental', 'hook-track-tags', | |
285 | default=False, |
|
288 | default=False, | |
286 | ) |
|
289 | ) | |
287 | coreconfigitem('experimental', 'httppostargs', |
|
290 | coreconfigitem('experimental', 'httppostargs', | |
288 | default=False, |
|
291 | default=False, | |
289 | ) |
|
292 | ) | |
290 | coreconfigitem('experimental', 'manifestv2', |
|
293 | coreconfigitem('experimental', 'manifestv2', | |
291 | default=False, |
|
294 | default=False, | |
292 | ) |
|
295 | ) | |
293 | coreconfigitem('experimental', 'mergedriver', |
|
296 | coreconfigitem('experimental', 'mergedriver', | |
294 | default=None, |
|
297 | default=None, | |
295 | ) |
|
298 | ) | |
296 | coreconfigitem('experimental', 'obsmarkers-exchange-debug', |
|
299 | coreconfigitem('experimental', 'obsmarkers-exchange-debug', | |
297 | default=False, |
|
300 | default=False, | |
298 | ) |
|
301 | ) | |
299 | coreconfigitem('experimental', 'rebase.multidest', |
|
302 | coreconfigitem('experimental', 'rebase.multidest', | |
300 | default=False, |
|
303 | default=False, | |
301 | ) |
|
304 | ) | |
302 | coreconfigitem('experimental', 'revertalternateinteractivemode', |
|
305 | coreconfigitem('experimental', 'revertalternateinteractivemode', | |
303 | default=True, |
|
306 | default=True, | |
304 | ) |
|
307 | ) | |
305 | coreconfigitem('experimental', 'revlogv2', |
|
308 | coreconfigitem('experimental', 'revlogv2', | |
306 | default=None, |
|
309 | default=None, | |
307 | ) |
|
310 | ) | |
308 | coreconfigitem('experimental', 'spacemovesdown', |
|
311 | coreconfigitem('experimental', 'spacemovesdown', | |
309 | default=False, |
|
312 | default=False, | |
310 | ) |
|
313 | ) | |
311 | coreconfigitem('experimental', 'treemanifest', |
|
314 | coreconfigitem('experimental', 'treemanifest', | |
312 | default=False, |
|
315 | default=False, | |
313 | ) |
|
316 | ) | |
314 | coreconfigitem('experimental', 'updatecheck', |
|
317 | coreconfigitem('experimental', 'updatecheck', | |
315 | default=None, |
|
318 | default=None, | |
316 | ) |
|
319 | ) | |
317 | coreconfigitem('format', 'aggressivemergedeltas', |
|
320 | coreconfigitem('format', 'aggressivemergedeltas', | |
318 | default=False, |
|
321 | default=False, | |
319 | ) |
|
322 | ) | |
320 | coreconfigitem('format', 'chunkcachesize', |
|
323 | coreconfigitem('format', 'chunkcachesize', | |
321 | default=None, |
|
324 | default=None, | |
322 | ) |
|
325 | ) | |
323 | coreconfigitem('format', 'dotencode', |
|
326 | coreconfigitem('format', 'dotencode', | |
324 | default=True, |
|
327 | default=True, | |
325 | ) |
|
328 | ) | |
326 | coreconfigitem('format', 'generaldelta', |
|
329 | coreconfigitem('format', 'generaldelta', | |
327 | default=False, |
|
330 | default=False, | |
328 | ) |
|
331 | ) | |
329 | coreconfigitem('format', 'manifestcachesize', |
|
332 | coreconfigitem('format', 'manifestcachesize', | |
330 | default=None, |
|
333 | default=None, | |
331 | ) |
|
334 | ) | |
332 | coreconfigitem('format', 'maxchainlen', |
|
335 | coreconfigitem('format', 'maxchainlen', | |
333 | default=None, |
|
336 | default=None, | |
334 | ) |
|
337 | ) | |
335 | coreconfigitem('format', 'obsstore-version', |
|
338 | coreconfigitem('format', 'obsstore-version', | |
336 | default=None, |
|
339 | default=None, | |
337 | ) |
|
340 | ) | |
338 | coreconfigitem('format', 'usefncache', |
|
341 | coreconfigitem('format', 'usefncache', | |
339 | default=True, |
|
342 | default=True, | |
340 | ) |
|
343 | ) | |
341 | coreconfigitem('format', 'usegeneraldelta', |
|
344 | coreconfigitem('format', 'usegeneraldelta', | |
342 | default=True, |
|
345 | default=True, | |
343 | ) |
|
346 | ) | |
344 | coreconfigitem('format', 'usestore', |
|
347 | coreconfigitem('format', 'usestore', | |
345 | default=True, |
|
348 | default=True, | |
346 | ) |
|
349 | ) | |
347 | coreconfigitem('hostsecurity', 'ciphers', |
|
350 | coreconfigitem('hostsecurity', 'ciphers', | |
348 | default=None, |
|
351 | default=None, | |
349 | ) |
|
352 | ) | |
350 | coreconfigitem('hostsecurity', 'disabletls10warning', |
|
353 | coreconfigitem('hostsecurity', 'disabletls10warning', | |
351 | default=False, |
|
354 | default=False, | |
352 | ) |
|
355 | ) | |
353 | coreconfigitem('http_proxy', 'always', |
|
356 | coreconfigitem('http_proxy', 'always', | |
354 | default=False, |
|
357 | default=False, | |
355 | ) |
|
358 | ) | |
356 | coreconfigitem('http_proxy', 'host', |
|
359 | coreconfigitem('http_proxy', 'host', | |
357 | default=None, |
|
360 | default=None, | |
358 | ) |
|
361 | ) | |
359 | coreconfigitem('http_proxy', 'no', |
|
362 | coreconfigitem('http_proxy', 'no', | |
360 | default=list, |
|
363 | default=list, | |
361 | ) |
|
364 | ) | |
362 | coreconfigitem('http_proxy', 'passwd', |
|
365 | coreconfigitem('http_proxy', 'passwd', | |
363 | default=None, |
|
366 | default=None, | |
364 | ) |
|
367 | ) | |
365 | coreconfigitem('http_proxy', 'user', |
|
368 | coreconfigitem('http_proxy', 'user', | |
366 | default=None, |
|
369 | default=None, | |
367 | ) |
|
370 | ) | |
368 | coreconfigitem('merge', 'checkunknown', |
|
371 | coreconfigitem('merge', 'checkunknown', | |
369 | default='abort', |
|
372 | default='abort', | |
370 | ) |
|
373 | ) | |
371 | coreconfigitem('merge', 'checkignored', |
|
374 | coreconfigitem('merge', 'checkignored', | |
372 | default='abort', |
|
375 | default='abort', | |
373 | ) |
|
376 | ) | |
374 | coreconfigitem('merge', 'followcopies', |
|
377 | coreconfigitem('merge', 'followcopies', | |
375 | default=True, |
|
378 | default=True, | |
376 | ) |
|
379 | ) | |
377 | coreconfigitem('merge', 'preferancestor', |
|
380 | coreconfigitem('merge', 'preferancestor', | |
378 | default=lambda: ['*'], |
|
381 | default=lambda: ['*'], | |
379 | ) |
|
382 | ) | |
380 | coreconfigitem('pager', 'ignore', |
|
383 | coreconfigitem('pager', 'ignore', | |
381 | default=list, |
|
384 | default=list, | |
382 | ) |
|
385 | ) | |
383 | coreconfigitem('patch', 'eol', |
|
386 | coreconfigitem('patch', 'eol', | |
384 | default='strict', |
|
387 | default='strict', | |
385 | ) |
|
388 | ) | |
386 | coreconfigitem('patch', 'fuzz', |
|
389 | coreconfigitem('patch', 'fuzz', | |
387 | default=2, |
|
390 | default=2, | |
388 | ) |
|
391 | ) | |
389 | coreconfigitem('paths', 'default', |
|
392 | coreconfigitem('paths', 'default', | |
390 | default=None, |
|
393 | default=None, | |
391 | ) |
|
394 | ) | |
392 | coreconfigitem('paths', 'default-push', |
|
395 | coreconfigitem('paths', 'default-push', | |
393 | default=None, |
|
396 | default=None, | |
394 | ) |
|
397 | ) | |
395 | coreconfigitem('phases', 'checksubrepos', |
|
398 | coreconfigitem('phases', 'checksubrepos', | |
396 | default='follow', |
|
399 | default='follow', | |
397 | ) |
|
400 | ) | |
398 | coreconfigitem('phases', 'new-commit', |
|
401 | coreconfigitem('phases', 'new-commit', | |
399 | default='draft', |
|
402 | default='draft', | |
400 | ) |
|
403 | ) | |
401 | coreconfigitem('phases', 'publish', |
|
404 | coreconfigitem('phases', 'publish', | |
402 | default=True, |
|
405 | default=True, | |
403 | ) |
|
406 | ) | |
404 | coreconfigitem('profiling', 'enabled', |
|
407 | coreconfigitem('profiling', 'enabled', | |
405 | default=False, |
|
408 | default=False, | |
406 | ) |
|
409 | ) | |
407 | coreconfigitem('profiling', 'format', |
|
410 | coreconfigitem('profiling', 'format', | |
408 | default='text', |
|
411 | default='text', | |
409 | ) |
|
412 | ) | |
410 | coreconfigitem('profiling', 'freq', |
|
413 | coreconfigitem('profiling', 'freq', | |
411 | default=1000, |
|
414 | default=1000, | |
412 | ) |
|
415 | ) | |
413 | coreconfigitem('profiling', 'limit', |
|
416 | coreconfigitem('profiling', 'limit', | |
414 | default=30, |
|
417 | default=30, | |
415 | ) |
|
418 | ) | |
416 | coreconfigitem('profiling', 'nested', |
|
419 | coreconfigitem('profiling', 'nested', | |
417 | default=0, |
|
420 | default=0, | |
418 | ) |
|
421 | ) | |
419 | coreconfigitem('profiling', 'output', |
|
422 | coreconfigitem('profiling', 'output', | |
420 | default=None, |
|
423 | default=None, | |
421 | ) |
|
424 | ) | |
422 | coreconfigitem('profiling', 'showmax', |
|
425 | coreconfigitem('profiling', 'showmax', | |
423 | default=0.999, |
|
426 | default=0.999, | |
424 | ) |
|
427 | ) | |
425 | coreconfigitem('profiling', 'showmin', |
|
428 | coreconfigitem('profiling', 'showmin', | |
426 | default=dynamicdefault, |
|
429 | default=dynamicdefault, | |
427 | ) |
|
430 | ) | |
428 | coreconfigitem('profiling', 'sort', |
|
431 | coreconfigitem('profiling', 'sort', | |
429 | default='inlinetime', |
|
432 | default='inlinetime', | |
430 | ) |
|
433 | ) | |
431 | coreconfigitem('profiling', 'statformat', |
|
434 | coreconfigitem('profiling', 'statformat', | |
432 | default='hotpath', |
|
435 | default='hotpath', | |
433 | ) |
|
436 | ) | |
434 | coreconfigitem('profiling', 'type', |
|
437 | coreconfigitem('profiling', 'type', | |
435 | default='stat', |
|
438 | default='stat', | |
436 | ) |
|
439 | ) | |
437 | coreconfigitem('progress', 'assume-tty', |
|
440 | coreconfigitem('progress', 'assume-tty', | |
438 | default=False, |
|
441 | default=False, | |
439 | ) |
|
442 | ) | |
440 | coreconfigitem('progress', 'changedelay', |
|
443 | coreconfigitem('progress', 'changedelay', | |
441 | default=1, |
|
444 | default=1, | |
442 | ) |
|
445 | ) | |
443 | coreconfigitem('progress', 'clear-complete', |
|
446 | coreconfigitem('progress', 'clear-complete', | |
444 | default=True, |
|
447 | default=True, | |
445 | ) |
|
448 | ) | |
446 | coreconfigitem('progress', 'debug', |
|
449 | coreconfigitem('progress', 'debug', | |
447 | default=False, |
|
450 | default=False, | |
448 | ) |
|
451 | ) | |
449 | coreconfigitem('progress', 'delay', |
|
452 | coreconfigitem('progress', 'delay', | |
450 | default=3, |
|
453 | default=3, | |
451 | ) |
|
454 | ) | |
452 | coreconfigitem('progress', 'disable', |
|
455 | coreconfigitem('progress', 'disable', | |
453 | default=False, |
|
456 | default=False, | |
454 | ) |
|
457 | ) | |
455 | coreconfigitem('progress', 'estimateinterval', |
|
458 | coreconfigitem('progress', 'estimateinterval', | |
456 | default=60.0, |
|
459 | default=60.0, | |
457 | ) |
|
460 | ) | |
458 | coreconfigitem('progress', 'refresh', |
|
461 | coreconfigitem('progress', 'refresh', | |
459 | default=0.1, |
|
462 | default=0.1, | |
460 | ) |
|
463 | ) | |
461 | coreconfigitem('progress', 'width', |
|
464 | coreconfigitem('progress', 'width', | |
462 | default=dynamicdefault, |
|
465 | default=dynamicdefault, | |
463 | ) |
|
466 | ) | |
464 | coreconfigitem('push', 'pushvars.server', |
|
467 | coreconfigitem('push', 'pushvars.server', | |
465 | default=False, |
|
468 | default=False, | |
466 | ) |
|
469 | ) | |
467 | coreconfigitem('server', 'bundle1', |
|
470 | coreconfigitem('server', 'bundle1', | |
468 | default=True, |
|
471 | default=True, | |
469 | ) |
|
472 | ) | |
470 | coreconfigitem('server', 'bundle1gd', |
|
473 | coreconfigitem('server', 'bundle1gd', | |
471 | default=None, |
|
474 | default=None, | |
472 | ) |
|
475 | ) | |
473 | coreconfigitem('server', 'compressionengines', |
|
476 | coreconfigitem('server', 'compressionengines', | |
474 | default=list, |
|
477 | default=list, | |
475 | ) |
|
478 | ) | |
476 | coreconfigitem('server', 'concurrent-push-mode', |
|
479 | coreconfigitem('server', 'concurrent-push-mode', | |
477 | default='strict', |
|
480 | default='strict', | |
478 | ) |
|
481 | ) | |
479 | coreconfigitem('server', 'disablefullbundle', |
|
482 | coreconfigitem('server', 'disablefullbundle', | |
480 | default=False, |
|
483 | default=False, | |
481 | ) |
|
484 | ) | |
482 | coreconfigitem('server', 'maxhttpheaderlen', |
|
485 | coreconfigitem('server', 'maxhttpheaderlen', | |
483 | default=1024, |
|
486 | default=1024, | |
484 | ) |
|
487 | ) | |
485 | coreconfigitem('server', 'preferuncompressed', |
|
488 | coreconfigitem('server', 'preferuncompressed', | |
486 | default=False, |
|
489 | default=False, | |
487 | ) |
|
490 | ) | |
488 | coreconfigitem('server', 'uncompressed', |
|
491 | coreconfigitem('server', 'uncompressed', | |
489 | default=True, |
|
492 | default=True, | |
490 | ) |
|
493 | ) | |
491 | coreconfigitem('server', 'uncompressedallowsecret', |
|
494 | coreconfigitem('server', 'uncompressedallowsecret', | |
492 | default=False, |
|
495 | default=False, | |
493 | ) |
|
496 | ) | |
494 | coreconfigitem('server', 'validate', |
|
497 | coreconfigitem('server', 'validate', | |
495 | default=False, |
|
498 | default=False, | |
496 | ) |
|
499 | ) | |
497 | coreconfigitem('server', 'zliblevel', |
|
500 | coreconfigitem('server', 'zliblevel', | |
498 | default=-1, |
|
501 | default=-1, | |
499 | ) |
|
502 | ) | |
500 | coreconfigitem('smtp', 'host', |
|
503 | coreconfigitem('smtp', 'host', | |
501 | default=None, |
|
504 | default=None, | |
502 | ) |
|
505 | ) | |
503 | coreconfigitem('smtp', 'local_hostname', |
|
506 | coreconfigitem('smtp', 'local_hostname', | |
504 | default=None, |
|
507 | default=None, | |
505 | ) |
|
508 | ) | |
506 | coreconfigitem('smtp', 'password', |
|
509 | coreconfigitem('smtp', 'password', | |
507 | default=None, |
|
510 | default=None, | |
508 | ) |
|
511 | ) | |
509 | coreconfigitem('smtp', 'port', |
|
512 | coreconfigitem('smtp', 'port', | |
510 | default=dynamicdefault, |
|
513 | default=dynamicdefault, | |
511 | ) |
|
514 | ) | |
512 | coreconfigitem('smtp', 'tls', |
|
515 | coreconfigitem('smtp', 'tls', | |
513 | default='none', |
|
516 | default='none', | |
514 | ) |
|
517 | ) | |
515 | coreconfigitem('smtp', 'username', |
|
518 | coreconfigitem('smtp', 'username', | |
516 | default=None, |
|
519 | default=None, | |
517 | ) |
|
520 | ) | |
518 | coreconfigitem('sparse', 'missingwarning', |
|
521 | coreconfigitem('sparse', 'missingwarning', | |
519 | default=True, |
|
522 | default=True, | |
520 | ) |
|
523 | ) | |
521 | coreconfigitem('trusted', 'groups', |
|
524 | coreconfigitem('trusted', 'groups', | |
522 | default=list, |
|
525 | default=list, | |
523 | ) |
|
526 | ) | |
524 | coreconfigitem('trusted', 'users', |
|
527 | coreconfigitem('trusted', 'users', | |
525 | default=list, |
|
528 | default=list, | |
526 | ) |
|
529 | ) | |
527 | coreconfigitem('ui', '_usedassubrepo', |
|
530 | coreconfigitem('ui', '_usedassubrepo', | |
528 | default=False, |
|
531 | default=False, | |
529 | ) |
|
532 | ) | |
530 | coreconfigitem('ui', 'allowemptycommit', |
|
533 | coreconfigitem('ui', 'allowemptycommit', | |
531 | default=False, |
|
534 | default=False, | |
532 | ) |
|
535 | ) | |
533 | coreconfigitem('ui', 'archivemeta', |
|
536 | coreconfigitem('ui', 'archivemeta', | |
534 | default=True, |
|
537 | default=True, | |
535 | ) |
|
538 | ) | |
536 | coreconfigitem('ui', 'askusername', |
|
539 | coreconfigitem('ui', 'askusername', | |
537 | default=False, |
|
540 | default=False, | |
538 | ) |
|
541 | ) | |
539 | coreconfigitem('ui', 'clonebundlefallback', |
|
542 | coreconfigitem('ui', 'clonebundlefallback', | |
540 | default=False, |
|
543 | default=False, | |
541 | ) |
|
544 | ) | |
542 | coreconfigitem('ui', 'clonebundleprefers', |
|
545 | coreconfigitem('ui', 'clonebundleprefers', | |
543 | default=list, |
|
546 | default=list, | |
544 | ) |
|
547 | ) | |
545 | coreconfigitem('ui', 'clonebundles', |
|
548 | coreconfigitem('ui', 'clonebundles', | |
546 | default=True, |
|
549 | default=True, | |
547 | ) |
|
550 | ) | |
548 | coreconfigitem('ui', 'color', |
|
551 | coreconfigitem('ui', 'color', | |
549 | default='auto', |
|
552 | default='auto', | |
550 | ) |
|
553 | ) | |
551 | coreconfigitem('ui', 'commitsubrepos', |
|
554 | coreconfigitem('ui', 'commitsubrepos', | |
552 | default=False, |
|
555 | default=False, | |
553 | ) |
|
556 | ) | |
554 | coreconfigitem('ui', 'debug', |
|
557 | coreconfigitem('ui', 'debug', | |
555 | default=False, |
|
558 | default=False, | |
556 | ) |
|
559 | ) | |
557 | coreconfigitem('ui', 'debugger', |
|
560 | coreconfigitem('ui', 'debugger', | |
558 | default=None, |
|
561 | default=None, | |
559 | ) |
|
562 | ) | |
560 | coreconfigitem('ui', 'fallbackencoding', |
|
563 | coreconfigitem('ui', 'fallbackencoding', | |
561 | default=None, |
|
564 | default=None, | |
562 | ) |
|
565 | ) | |
563 | coreconfigitem('ui', 'forcecwd', |
|
566 | coreconfigitem('ui', 'forcecwd', | |
564 | default=None, |
|
567 | default=None, | |
565 | ) |
|
568 | ) | |
566 | coreconfigitem('ui', 'forcemerge', |
|
569 | coreconfigitem('ui', 'forcemerge', | |
567 | default=None, |
|
570 | default=None, | |
568 | ) |
|
571 | ) | |
569 | coreconfigitem('ui', 'formatdebug', |
|
572 | coreconfigitem('ui', 'formatdebug', | |
570 | default=False, |
|
573 | default=False, | |
571 | ) |
|
574 | ) | |
572 | coreconfigitem('ui', 'formatjson', |
|
575 | coreconfigitem('ui', 'formatjson', | |
573 | default=False, |
|
576 | default=False, | |
574 | ) |
|
577 | ) | |
575 | coreconfigitem('ui', 'formatted', |
|
578 | coreconfigitem('ui', 'formatted', | |
576 | default=None, |
|
579 | default=None, | |
577 | ) |
|
580 | ) | |
578 | coreconfigitem('ui', 'graphnodetemplate', |
|
581 | coreconfigitem('ui', 'graphnodetemplate', | |
579 | default=None, |
|
582 | default=None, | |
580 | ) |
|
583 | ) | |
581 | coreconfigitem('ui', 'http2debuglevel', |
|
584 | coreconfigitem('ui', 'http2debuglevel', | |
582 | default=None, |
|
585 | default=None, | |
583 | ) |
|
586 | ) | |
584 | coreconfigitem('ui', 'interactive', |
|
587 | coreconfigitem('ui', 'interactive', | |
585 | default=None, |
|
588 | default=None, | |
586 | ) |
|
589 | ) | |
587 | coreconfigitem('ui', 'interface', |
|
590 | coreconfigitem('ui', 'interface', | |
588 | default=None, |
|
591 | default=None, | |
589 | ) |
|
592 | ) | |
590 | coreconfigitem('ui', 'logblockedtimes', |
|
593 | coreconfigitem('ui', 'logblockedtimes', | |
591 | default=False, |
|
594 | default=False, | |
592 | ) |
|
595 | ) | |
593 | coreconfigitem('ui', 'logtemplate', |
|
596 | coreconfigitem('ui', 'logtemplate', | |
594 | default=None, |
|
597 | default=None, | |
595 | ) |
|
598 | ) | |
596 | coreconfigitem('ui', 'merge', |
|
599 | coreconfigitem('ui', 'merge', | |
597 | default=None, |
|
600 | default=None, | |
598 | ) |
|
601 | ) | |
599 | coreconfigitem('ui', 'mergemarkers', |
|
602 | coreconfigitem('ui', 'mergemarkers', | |
600 | default='basic', |
|
603 | default='basic', | |
601 | ) |
|
604 | ) | |
602 | coreconfigitem('ui', 'mergemarkertemplate', |
|
605 | coreconfigitem('ui', 'mergemarkertemplate', | |
603 | default=('{node|short} ' |
|
606 | default=('{node|short} ' | |
604 | '{ifeq(tags, "tip", "", ' |
|
607 | '{ifeq(tags, "tip", "", ' | |
605 | 'ifeq(tags, "", "", "{tags} "))}' |
|
608 | 'ifeq(tags, "", "", "{tags} "))}' | |
606 | '{if(bookmarks, "{bookmarks} ")}' |
|
609 | '{if(bookmarks, "{bookmarks} ")}' | |
607 | '{ifeq(branch, "default", "", "{branch} ")}' |
|
610 | '{ifeq(branch, "default", "", "{branch} ")}' | |
608 | '- {author|user}: {desc|firstline}') |
|
611 | '- {author|user}: {desc|firstline}') | |
609 | ) |
|
612 | ) | |
610 | coreconfigitem('ui', 'nontty', |
|
613 | coreconfigitem('ui', 'nontty', | |
611 | default=False, |
|
614 | default=False, | |
612 | ) |
|
615 | ) | |
613 | coreconfigitem('ui', 'origbackuppath', |
|
616 | coreconfigitem('ui', 'origbackuppath', | |
614 | default=None, |
|
617 | default=None, | |
615 | ) |
|
618 | ) | |
616 | coreconfigitem('ui', 'paginate', |
|
619 | coreconfigitem('ui', 'paginate', | |
617 | default=True, |
|
620 | default=True, | |
618 | ) |
|
621 | ) | |
619 | coreconfigitem('ui', 'patch', |
|
622 | coreconfigitem('ui', 'patch', | |
620 | default=None, |
|
623 | default=None, | |
621 | ) |
|
624 | ) | |
622 | coreconfigitem('ui', 'portablefilenames', |
|
625 | coreconfigitem('ui', 'portablefilenames', | |
623 | default='warn', |
|
626 | default='warn', | |
624 | ) |
|
627 | ) | |
625 | coreconfigitem('ui', 'promptecho', |
|
628 | coreconfigitem('ui', 'promptecho', | |
626 | default=False, |
|
629 | default=False, | |
627 | ) |
|
630 | ) | |
628 | coreconfigitem('ui', 'quiet', |
|
631 | coreconfigitem('ui', 'quiet', | |
629 | default=False, |
|
632 | default=False, | |
630 | ) |
|
633 | ) | |
631 | coreconfigitem('ui', 'quietbookmarkmove', |
|
634 | coreconfigitem('ui', 'quietbookmarkmove', | |
632 | default=False, |
|
635 | default=False, | |
633 | ) |
|
636 | ) | |
634 | coreconfigitem('ui', 'remotecmd', |
|
637 | coreconfigitem('ui', 'remotecmd', | |
635 | default='hg', |
|
638 | default='hg', | |
636 | ) |
|
639 | ) | |
637 | coreconfigitem('ui', 'report_untrusted', |
|
640 | coreconfigitem('ui', 'report_untrusted', | |
638 | default=True, |
|
641 | default=True, | |
639 | ) |
|
642 | ) | |
640 | coreconfigitem('ui', 'rollback', |
|
643 | coreconfigitem('ui', 'rollback', | |
641 | default=True, |
|
644 | default=True, | |
642 | ) |
|
645 | ) | |
643 | coreconfigitem('ui', 'slash', |
|
646 | coreconfigitem('ui', 'slash', | |
644 | default=False, |
|
647 | default=False, | |
645 | ) |
|
648 | ) | |
646 | coreconfigitem('ui', 'ssh', |
|
649 | coreconfigitem('ui', 'ssh', | |
647 | default='ssh', |
|
650 | default='ssh', | |
648 | ) |
|
651 | ) | |
649 | coreconfigitem('ui', 'statuscopies', |
|
652 | coreconfigitem('ui', 'statuscopies', | |
650 | default=False, |
|
653 | default=False, | |
651 | ) |
|
654 | ) | |
652 | coreconfigitem('ui', 'strict', |
|
655 | coreconfigitem('ui', 'strict', | |
653 | default=False, |
|
656 | default=False, | |
654 | ) |
|
657 | ) | |
655 | coreconfigitem('ui', 'style', |
|
658 | coreconfigitem('ui', 'style', | |
656 | default='', |
|
659 | default='', | |
657 | ) |
|
660 | ) | |
658 | coreconfigitem('ui', 'supportcontact', |
|
661 | coreconfigitem('ui', 'supportcontact', | |
659 | default=None, |
|
662 | default=None, | |
660 | ) |
|
663 | ) | |
661 | coreconfigitem('ui', 'textwidth', |
|
664 | coreconfigitem('ui', 'textwidth', | |
662 | default=78, |
|
665 | default=78, | |
663 | ) |
|
666 | ) | |
664 | coreconfigitem('ui', 'timeout', |
|
667 | coreconfigitem('ui', 'timeout', | |
665 | default='600', |
|
668 | default='600', | |
666 | ) |
|
669 | ) | |
667 | coreconfigitem('ui', 'traceback', |
|
670 | coreconfigitem('ui', 'traceback', | |
668 | default=False, |
|
671 | default=False, | |
669 | ) |
|
672 | ) | |
670 | coreconfigitem('ui', 'tweakdefaults', |
|
673 | coreconfigitem('ui', 'tweakdefaults', | |
671 | default=False, |
|
674 | default=False, | |
672 | ) |
|
675 | ) | |
673 | coreconfigitem('ui', 'usehttp2', |
|
676 | coreconfigitem('ui', 'usehttp2', | |
674 | default=False, |
|
677 | default=False, | |
675 | ) |
|
678 | ) | |
676 | coreconfigitem('ui', 'username', |
|
679 | coreconfigitem('ui', 'username', | |
677 | alias=[('ui', 'user')] |
|
680 | alias=[('ui', 'user')] | |
678 | ) |
|
681 | ) | |
679 | coreconfigitem('ui', 'verbose', |
|
682 | coreconfigitem('ui', 'verbose', | |
680 | default=False, |
|
683 | default=False, | |
681 | ) |
|
684 | ) | |
682 | coreconfigitem('verify', 'skipflags', |
|
685 | coreconfigitem('verify', 'skipflags', | |
683 | default=None, |
|
686 | default=None, | |
684 | ) |
|
687 | ) | |
685 | coreconfigitem('web', 'accesslog', |
|
688 | coreconfigitem('web', 'accesslog', | |
686 | default='-', |
|
689 | default='-', | |
687 | ) |
|
690 | ) | |
688 | coreconfigitem('web', 'address', |
|
691 | coreconfigitem('web', 'address', | |
689 | default='', |
|
692 | default='', | |
690 | ) |
|
693 | ) | |
691 | coreconfigitem('web', 'allow_archive', |
|
694 | coreconfigitem('web', 'allow_archive', | |
692 | default=list, |
|
695 | default=list, | |
693 | ) |
|
696 | ) | |
694 | coreconfigitem('web', 'allow_read', |
|
697 | coreconfigitem('web', 'allow_read', | |
695 | default=list, |
|
698 | default=list, | |
696 | ) |
|
699 | ) | |
697 | coreconfigitem('web', 'baseurl', |
|
700 | coreconfigitem('web', 'baseurl', | |
698 | default=None, |
|
701 | default=None, | |
699 | ) |
|
702 | ) | |
700 | coreconfigitem('web', 'cacerts', |
|
703 | coreconfigitem('web', 'cacerts', | |
701 | default=None, |
|
704 | default=None, | |
702 | ) |
|
705 | ) | |
703 | coreconfigitem('web', 'certificate', |
|
706 | coreconfigitem('web', 'certificate', | |
704 | default=None, |
|
707 | default=None, | |
705 | ) |
|
708 | ) | |
706 | coreconfigitem('web', 'collapse', |
|
709 | coreconfigitem('web', 'collapse', | |
707 | default=False, |
|
710 | default=False, | |
708 | ) |
|
711 | ) | |
709 | coreconfigitem('web', 'csp', |
|
712 | coreconfigitem('web', 'csp', | |
710 | default=None, |
|
713 | default=None, | |
711 | ) |
|
714 | ) | |
712 | coreconfigitem('web', 'deny_read', |
|
715 | coreconfigitem('web', 'deny_read', | |
713 | default=list, |
|
716 | default=list, | |
714 | ) |
|
717 | ) | |
715 | coreconfigitem('web', 'descend', |
|
718 | coreconfigitem('web', 'descend', | |
716 | default=True, |
|
719 | default=True, | |
717 | ) |
|
720 | ) | |
718 | coreconfigitem('web', 'description', |
|
721 | coreconfigitem('web', 'description', | |
719 | default="", |
|
722 | default="", | |
720 | ) |
|
723 | ) | |
721 | coreconfigitem('web', 'encoding', |
|
724 | coreconfigitem('web', 'encoding', | |
722 | default=lambda: encoding.encoding, |
|
725 | default=lambda: encoding.encoding, | |
723 | ) |
|
726 | ) | |
724 | coreconfigitem('web', 'errorlog', |
|
727 | coreconfigitem('web', 'errorlog', | |
725 | default='-', |
|
728 | default='-', | |
726 | ) |
|
729 | ) | |
727 | coreconfigitem('web', 'ipv6', |
|
730 | coreconfigitem('web', 'ipv6', | |
728 | default=False, |
|
731 | default=False, | |
729 | ) |
|
732 | ) | |
730 | coreconfigitem('web', 'port', |
|
733 | coreconfigitem('web', 'port', | |
731 | default=8000, |
|
734 | default=8000, | |
732 | ) |
|
735 | ) | |
733 | coreconfigitem('web', 'prefix', |
|
736 | coreconfigitem('web', 'prefix', | |
734 | default='', |
|
737 | default='', | |
735 | ) |
|
738 | ) | |
736 | coreconfigitem('web', 'refreshinterval', |
|
739 | coreconfigitem('web', 'refreshinterval', | |
737 | default=20, |
|
740 | default=20, | |
738 | ) |
|
741 | ) | |
739 | coreconfigitem('web', 'stripes', |
|
742 | coreconfigitem('web', 'stripes', | |
740 | default=1, |
|
743 | default=1, | |
741 | ) |
|
744 | ) | |
742 | coreconfigitem('web', 'style', |
|
745 | coreconfigitem('web', 'style', | |
743 | default='paper', |
|
746 | default='paper', | |
744 | ) |
|
747 | ) | |
745 | coreconfigitem('web', 'templates', |
|
748 | coreconfigitem('web', 'templates', | |
746 | default=None, |
|
749 | default=None, | |
747 | ) |
|
750 | ) | |
748 | coreconfigitem('worker', 'backgroundclose', |
|
751 | coreconfigitem('worker', 'backgroundclose', | |
749 | default=dynamicdefault, |
|
752 | default=dynamicdefault, | |
750 | ) |
|
753 | ) | |
751 | # Windows defaults to a limit of 512 open files. A buffer of 128 |
|
754 | # Windows defaults to a limit of 512 open files. A buffer of 128 | |
752 | # should give us enough headway. |
|
755 | # should give us enough headway. | |
753 | coreconfigitem('worker', 'backgroundclosemaxqueue', |
|
756 | coreconfigitem('worker', 'backgroundclosemaxqueue', | |
754 | default=384, |
|
757 | default=384, | |
755 | ) |
|
758 | ) | |
756 | coreconfigitem('worker', 'backgroundcloseminfilecount', |
|
759 | coreconfigitem('worker', 'backgroundcloseminfilecount', | |
757 | default=2048, |
|
760 | default=2048, | |
758 | ) |
|
761 | ) | |
759 | coreconfigitem('worker', 'backgroundclosethreadcount', |
|
762 | coreconfigitem('worker', 'backgroundclosethreadcount', | |
760 | default=4, |
|
763 | default=4, | |
761 | ) |
|
764 | ) | |
762 | coreconfigitem('worker', 'numcpus', |
|
765 | coreconfigitem('worker', 'numcpus', | |
763 | default=None, |
|
766 | default=None, | |
764 | ) |
|
767 | ) |
@@ -1,1095 +1,1099 b'' | |||||
1 | # obsolete.py - obsolete markers handling |
|
1 | # obsolete.py - obsolete markers handling | |
2 | # |
|
2 | # | |
3 | # Copyright 2012 Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
|
3 | # Copyright 2012 Pierre-Yves David <pierre-yves.david@ens-lyon.org> | |
4 | # Logilab SA <contact@logilab.fr> |
|
4 | # Logilab SA <contact@logilab.fr> | |
5 | # |
|
5 | # | |
6 | # This software may be used and distributed according to the terms of the |
|
6 | # This software may be used and distributed according to the terms of the | |
7 | # GNU General Public License version 2 or any later version. |
|
7 | # GNU General Public License version 2 or any later version. | |
8 |
|
8 | |||
9 | """Obsolete marker handling |
|
9 | """Obsolete marker handling | |
10 |
|
10 | |||
11 | An obsolete marker maps an old changeset to a list of new |
|
11 | An obsolete marker maps an old changeset to a list of new | |
12 | changesets. If the list of new changesets is empty, the old changeset |
|
12 | changesets. If the list of new changesets is empty, the old changeset | |
13 | is said to be "killed". Otherwise, the old changeset is being |
|
13 | is said to be "killed". Otherwise, the old changeset is being | |
14 | "replaced" by the new changesets. |
|
14 | "replaced" by the new changesets. | |
15 |
|
15 | |||
16 | Obsolete markers can be used to record and distribute changeset graph |
|
16 | Obsolete markers can be used to record and distribute changeset graph | |
17 | transformations performed by history rewrite operations, and help |
|
17 | transformations performed by history rewrite operations, and help | |
18 | building new tools to reconcile conflicting rewrite actions. To |
|
18 | building new tools to reconcile conflicting rewrite actions. To | |
19 | facilitate conflict resolution, markers include various annotations |
|
19 | facilitate conflict resolution, markers include various annotations | |
20 | besides old and news changeset identifiers, such as creation date or |
|
20 | besides old and news changeset identifiers, such as creation date or | |
21 | author name. |
|
21 | author name. | |
22 |
|
22 | |||
23 | The old obsoleted changeset is called a "predecessor" and possible |
|
23 | The old obsoleted changeset is called a "predecessor" and possible | |
24 | replacements are called "successors". Markers that used changeset X as |
|
24 | replacements are called "successors". Markers that used changeset X as | |
25 | a predecessor are called "successor markers of X" because they hold |
|
25 | a predecessor are called "successor markers of X" because they hold | |
26 | information about the successors of X. Markers that use changeset Y as |
|
26 | information about the successors of X. Markers that use changeset Y as | |
27 | a successors are call "predecessor markers of Y" because they hold |
|
27 | a successors are call "predecessor markers of Y" because they hold | |
28 | information about the predecessors of Y. |
|
28 | information about the predecessors of Y. | |
29 |
|
29 | |||
30 | Examples: |
|
30 | Examples: | |
31 |
|
31 | |||
32 | - When changeset A is replaced by changeset A', one marker is stored: |
|
32 | - When changeset A is replaced by changeset A', one marker is stored: | |
33 |
|
33 | |||
34 | (A, (A',)) |
|
34 | (A, (A',)) | |
35 |
|
35 | |||
36 | - When changesets A and B are folded into a new changeset C, two markers are |
|
36 | - When changesets A and B are folded into a new changeset C, two markers are | |
37 | stored: |
|
37 | stored: | |
38 |
|
38 | |||
39 | (A, (C,)) and (B, (C,)) |
|
39 | (A, (C,)) and (B, (C,)) | |
40 |
|
40 | |||
41 | - When changeset A is simply "pruned" from the graph, a marker is created: |
|
41 | - When changeset A is simply "pruned" from the graph, a marker is created: | |
42 |
|
42 | |||
43 | (A, ()) |
|
43 | (A, ()) | |
44 |
|
44 | |||
45 | - When changeset A is split into B and C, a single marker is used: |
|
45 | - When changeset A is split into B and C, a single marker is used: | |
46 |
|
46 | |||
47 | (A, (B, C)) |
|
47 | (A, (B, C)) | |
48 |
|
48 | |||
49 | We use a single marker to distinguish the "split" case from the "divergence" |
|
49 | We use a single marker to distinguish the "split" case from the "divergence" | |
50 | case. If two independent operations rewrite the same changeset A in to A' and |
|
50 | case. If two independent operations rewrite the same changeset A in to A' and | |
51 | A'', we have an error case: divergent rewriting. We can detect it because |
|
51 | A'', we have an error case: divergent rewriting. We can detect it because | |
52 | two markers will be created independently: |
|
52 | two markers will be created independently: | |
53 |
|
53 | |||
54 | (A, (B,)) and (A, (C,)) |
|
54 | (A, (B,)) and (A, (C,)) | |
55 |
|
55 | |||
56 | Format |
|
56 | Format | |
57 | ------ |
|
57 | ------ | |
58 |
|
58 | |||
59 | Markers are stored in an append-only file stored in |
|
59 | Markers are stored in an append-only file stored in | |
60 | '.hg/store/obsstore'. |
|
60 | '.hg/store/obsstore'. | |
61 |
|
61 | |||
62 | The file starts with a version header: |
|
62 | The file starts with a version header: | |
63 |
|
63 | |||
64 | - 1 unsigned byte: version number, starting at zero. |
|
64 | - 1 unsigned byte: version number, starting at zero. | |
65 |
|
65 | |||
66 | The header is followed by the markers. Marker format depend of the version. See |
|
66 | The header is followed by the markers. Marker format depend of the version. See | |
67 | comment associated with each format for details. |
|
67 | comment associated with each format for details. | |
68 |
|
68 | |||
69 | """ |
|
69 | """ | |
70 | from __future__ import absolute_import |
|
70 | from __future__ import absolute_import | |
71 |
|
71 | |||
72 | import errno |
|
72 | import errno | |
73 | import struct |
|
73 | import struct | |
74 |
|
74 | |||
75 | from .i18n import _ |
|
75 | from .i18n import _ | |
76 | from . import ( |
|
76 | from . import ( | |
77 | error, |
|
77 | error, | |
78 | node, |
|
78 | node, | |
79 | obsutil, |
|
79 | obsutil, | |
80 | phases, |
|
80 | phases, | |
81 | policy, |
|
81 | policy, | |
82 | util, |
|
82 | util, | |
83 | ) |
|
83 | ) | |
84 |
|
84 | |||
85 | parsers = policy.importmod(r'parsers') |
|
85 | parsers = policy.importmod(r'parsers') | |
86 |
|
86 | |||
87 | _pack = struct.pack |
|
87 | _pack = struct.pack | |
88 | _unpack = struct.unpack |
|
88 | _unpack = struct.unpack | |
89 | _calcsize = struct.calcsize |
|
89 | _calcsize = struct.calcsize | |
90 | propertycache = util.propertycache |
|
90 | propertycache = util.propertycache | |
91 |
|
91 | |||
92 | # the obsolete feature is not mature enough to be enabled by default. |
|
92 | # the obsolete feature is not mature enough to be enabled by default. | |
93 | # you have to rely on third party extension extension to enable this. |
|
93 | # you have to rely on third party extension extension to enable this. | |
94 | _enabled = False |
|
94 | _enabled = False | |
95 |
|
95 | |||
96 | # Options for obsolescence |
|
96 | # Options for obsolescence | |
97 | createmarkersopt = 'createmarkers' |
|
97 | createmarkersopt = 'createmarkers' | |
98 | allowunstableopt = 'allowunstable' |
|
98 | allowunstableopt = 'allowunstable' | |
99 | exchangeopt = 'exchange' |
|
99 | exchangeopt = 'exchange' | |
100 |
|
100 | |||
101 | def isenabled(repo, option): |
|
101 | def isenabled(repo, option): | |
102 | """Returns True if the given repository has the given obsolete option |
|
102 | """Returns True if the given repository has the given obsolete option | |
103 | enabled. |
|
103 | enabled. | |
104 | """ |
|
104 | """ | |
105 | result = set(repo.ui.configlist('experimental', 'stabilization')) |
|
105 | result = set(repo.ui.configlist('experimental', 'stabilization')) | |
106 | if 'all' in result: |
|
106 | if 'all' in result: | |
107 | return True |
|
107 | return True | |
108 |
|
108 | |||
109 | # For migration purposes, temporarily return true if the config hasn't been |
|
109 | # For migration purposes, temporarily return true if the config hasn't been | |
110 | # set but _enabled is true. |
|
110 | # set but _enabled is true. | |
111 | if len(result) == 0 and _enabled: |
|
111 | if len(result) == 0 and _enabled: | |
112 | return True |
|
112 | return True | |
113 |
|
113 | |||
114 | # createmarkers must be enabled if other options are enabled |
|
114 | # createmarkers must be enabled if other options are enabled | |
115 | if ((allowunstableopt in result or exchangeopt in result) and |
|
115 | if ((allowunstableopt in result or exchangeopt in result) and | |
116 | not createmarkersopt in result): |
|
116 | not createmarkersopt in result): | |
117 | raise error.Abort(_("'createmarkers' obsolete option must be enabled " |
|
117 | raise error.Abort(_("'createmarkers' obsolete option must be enabled " | |
118 | "if other obsolete options are enabled")) |
|
118 | "if other obsolete options are enabled")) | |
119 |
|
119 | |||
120 | return option in result |
|
120 | return option in result | |
121 |
|
121 | |||
122 | ### obsolescence marker flag |
|
122 | ### obsolescence marker flag | |
123 |
|
123 | |||
124 | ## bumpedfix flag |
|
124 | ## bumpedfix flag | |
125 | # |
|
125 | # | |
126 | # When a changeset A' succeed to a changeset A which became public, we call A' |
|
126 | # When a changeset A' succeed to a changeset A which became public, we call A' | |
127 | # "bumped" because it's a successors of a public changesets |
|
127 | # "bumped" because it's a successors of a public changesets | |
128 | # |
|
128 | # | |
129 | # o A' (bumped) |
|
129 | # o A' (bumped) | |
130 | # |`: |
|
130 | # |`: | |
131 | # | o A |
|
131 | # | o A | |
132 | # |/ |
|
132 | # |/ | |
133 | # o Z |
|
133 | # o Z | |
134 | # |
|
134 | # | |
135 | # The way to solve this situation is to create a new changeset Ad as children |
|
135 | # The way to solve this situation is to create a new changeset Ad as children | |
136 | # of A. This changeset have the same content than A'. So the diff from A to A' |
|
136 | # of A. This changeset have the same content than A'. So the diff from A to A' | |
137 | # is the same than the diff from A to Ad. Ad is marked as a successors of A' |
|
137 | # is the same than the diff from A to Ad. Ad is marked as a successors of A' | |
138 | # |
|
138 | # | |
139 | # o Ad |
|
139 | # o Ad | |
140 | # |`: |
|
140 | # |`: | |
141 | # | x A' |
|
141 | # | x A' | |
142 | # |'| |
|
142 | # |'| | |
143 | # o | A |
|
143 | # o | A | |
144 | # |/ |
|
144 | # |/ | |
145 | # o Z |
|
145 | # o Z | |
146 | # |
|
146 | # | |
147 | # But by transitivity Ad is also a successors of A. To avoid having Ad marked |
|
147 | # But by transitivity Ad is also a successors of A. To avoid having Ad marked | |
148 | # as bumped too, we add the `bumpedfix` flag to the marker. <A', (Ad,)>. |
|
148 | # as bumped too, we add the `bumpedfix` flag to the marker. <A', (Ad,)>. | |
149 | # This flag mean that the successors express the changes between the public and |
|
149 | # This flag mean that the successors express the changes between the public and | |
150 | # bumped version and fix the situation, breaking the transitivity of |
|
150 | # bumped version and fix the situation, breaking the transitivity of | |
151 | # "bumped" here. |
|
151 | # "bumped" here. | |
152 | bumpedfix = 1 |
|
152 | bumpedfix = 1 | |
153 | usingsha256 = 2 |
|
153 | usingsha256 = 2 | |
154 |
|
154 | |||
155 | ## Parsing and writing of version "0" |
|
155 | ## Parsing and writing of version "0" | |
156 | # |
|
156 | # | |
157 | # The header is followed by the markers. Each marker is made of: |
|
157 | # The header is followed by the markers. Each marker is made of: | |
158 | # |
|
158 | # | |
159 | # - 1 uint8 : number of new changesets "N", can be zero. |
|
159 | # - 1 uint8 : number of new changesets "N", can be zero. | |
160 | # |
|
160 | # | |
161 | # - 1 uint32: metadata size "M" in bytes. |
|
161 | # - 1 uint32: metadata size "M" in bytes. | |
162 | # |
|
162 | # | |
163 | # - 1 byte: a bit field. It is reserved for flags used in common |
|
163 | # - 1 byte: a bit field. It is reserved for flags used in common | |
164 | # obsolete marker operations, to avoid repeated decoding of metadata |
|
164 | # obsolete marker operations, to avoid repeated decoding of metadata | |
165 | # entries. |
|
165 | # entries. | |
166 | # |
|
166 | # | |
167 | # - 20 bytes: obsoleted changeset identifier. |
|
167 | # - 20 bytes: obsoleted changeset identifier. | |
168 | # |
|
168 | # | |
169 | # - N*20 bytes: new changesets identifiers. |
|
169 | # - N*20 bytes: new changesets identifiers. | |
170 | # |
|
170 | # | |
171 | # - M bytes: metadata as a sequence of nul-terminated strings. Each |
|
171 | # - M bytes: metadata as a sequence of nul-terminated strings. Each | |
172 | # string contains a key and a value, separated by a colon ':', without |
|
172 | # string contains a key and a value, separated by a colon ':', without | |
173 | # additional encoding. Keys cannot contain '\0' or ':' and values |
|
173 | # additional encoding. Keys cannot contain '\0' or ':' and values | |
174 | # cannot contain '\0'. |
|
174 | # cannot contain '\0'. | |
175 | _fm0version = 0 |
|
175 | _fm0version = 0 | |
176 | _fm0fixed = '>BIB20s' |
|
176 | _fm0fixed = '>BIB20s' | |
177 | _fm0node = '20s' |
|
177 | _fm0node = '20s' | |
178 | _fm0fsize = _calcsize(_fm0fixed) |
|
178 | _fm0fsize = _calcsize(_fm0fixed) | |
179 | _fm0fnodesize = _calcsize(_fm0node) |
|
179 | _fm0fnodesize = _calcsize(_fm0node) | |
180 |
|
180 | |||
181 | def _fm0readmarkers(data, off, stop): |
|
181 | def _fm0readmarkers(data, off, stop): | |
182 | # Loop on markers |
|
182 | # Loop on markers | |
183 | while off < stop: |
|
183 | while off < stop: | |
184 | # read fixed part |
|
184 | # read fixed part | |
185 | cur = data[off:off + _fm0fsize] |
|
185 | cur = data[off:off + _fm0fsize] | |
186 | off += _fm0fsize |
|
186 | off += _fm0fsize | |
187 | numsuc, mdsize, flags, pre = _unpack(_fm0fixed, cur) |
|
187 | numsuc, mdsize, flags, pre = _unpack(_fm0fixed, cur) | |
188 | # read replacement |
|
188 | # read replacement | |
189 | sucs = () |
|
189 | sucs = () | |
190 | if numsuc: |
|
190 | if numsuc: | |
191 | s = (_fm0fnodesize * numsuc) |
|
191 | s = (_fm0fnodesize * numsuc) | |
192 | cur = data[off:off + s] |
|
192 | cur = data[off:off + s] | |
193 | sucs = _unpack(_fm0node * numsuc, cur) |
|
193 | sucs = _unpack(_fm0node * numsuc, cur) | |
194 | off += s |
|
194 | off += s | |
195 | # read metadata |
|
195 | # read metadata | |
196 | # (metadata will be decoded on demand) |
|
196 | # (metadata will be decoded on demand) | |
197 | metadata = data[off:off + mdsize] |
|
197 | metadata = data[off:off + mdsize] | |
198 | if len(metadata) != mdsize: |
|
198 | if len(metadata) != mdsize: | |
199 | raise error.Abort(_('parsing obsolete marker: metadata is too ' |
|
199 | raise error.Abort(_('parsing obsolete marker: metadata is too ' | |
200 | 'short, %d bytes expected, got %d') |
|
200 | 'short, %d bytes expected, got %d') | |
201 | % (mdsize, len(metadata))) |
|
201 | % (mdsize, len(metadata))) | |
202 | off += mdsize |
|
202 | off += mdsize | |
203 | metadata = _fm0decodemeta(metadata) |
|
203 | metadata = _fm0decodemeta(metadata) | |
204 | try: |
|
204 | try: | |
205 | when, offset = metadata.pop('date', '0 0').split(' ') |
|
205 | when, offset = metadata.pop('date', '0 0').split(' ') | |
206 | date = float(when), int(offset) |
|
206 | date = float(when), int(offset) | |
207 | except ValueError: |
|
207 | except ValueError: | |
208 | date = (0., 0) |
|
208 | date = (0., 0) | |
209 | parents = None |
|
209 | parents = None | |
210 | if 'p2' in metadata: |
|
210 | if 'p2' in metadata: | |
211 | parents = (metadata.pop('p1', None), metadata.pop('p2', None)) |
|
211 | parents = (metadata.pop('p1', None), metadata.pop('p2', None)) | |
212 | elif 'p1' in metadata: |
|
212 | elif 'p1' in metadata: | |
213 | parents = (metadata.pop('p1', None),) |
|
213 | parents = (metadata.pop('p1', None),) | |
214 | elif 'p0' in metadata: |
|
214 | elif 'p0' in metadata: | |
215 | parents = () |
|
215 | parents = () | |
216 | if parents is not None: |
|
216 | if parents is not None: | |
217 | try: |
|
217 | try: | |
218 | parents = tuple(node.bin(p) for p in parents) |
|
218 | parents = tuple(node.bin(p) for p in parents) | |
219 | # if parent content is not a nodeid, drop the data |
|
219 | # if parent content is not a nodeid, drop the data | |
220 | for p in parents: |
|
220 | for p in parents: | |
221 | if len(p) != 20: |
|
221 | if len(p) != 20: | |
222 | parents = None |
|
222 | parents = None | |
223 | break |
|
223 | break | |
224 | except TypeError: |
|
224 | except TypeError: | |
225 | # if content cannot be translated to nodeid drop the data. |
|
225 | # if content cannot be translated to nodeid drop the data. | |
226 | parents = None |
|
226 | parents = None | |
227 |
|
227 | |||
228 | metadata = tuple(sorted(metadata.iteritems())) |
|
228 | metadata = tuple(sorted(metadata.iteritems())) | |
229 |
|
229 | |||
230 | yield (pre, sucs, flags, metadata, date, parents) |
|
230 | yield (pre, sucs, flags, metadata, date, parents) | |
231 |
|
231 | |||
232 | def _fm0encodeonemarker(marker): |
|
232 | def _fm0encodeonemarker(marker): | |
233 | pre, sucs, flags, metadata, date, parents = marker |
|
233 | pre, sucs, flags, metadata, date, parents = marker | |
234 | if flags & usingsha256: |
|
234 | if flags & usingsha256: | |
235 | raise error.Abort(_('cannot handle sha256 with old obsstore format')) |
|
235 | raise error.Abort(_('cannot handle sha256 with old obsstore format')) | |
236 | metadata = dict(metadata) |
|
236 | metadata = dict(metadata) | |
237 | time, tz = date |
|
237 | time, tz = date | |
238 | metadata['date'] = '%r %i' % (time, tz) |
|
238 | metadata['date'] = '%r %i' % (time, tz) | |
239 | if parents is not None: |
|
239 | if parents is not None: | |
240 | if not parents: |
|
240 | if not parents: | |
241 | # mark that we explicitly recorded no parents |
|
241 | # mark that we explicitly recorded no parents | |
242 | metadata['p0'] = '' |
|
242 | metadata['p0'] = '' | |
243 | for i, p in enumerate(parents, 1): |
|
243 | for i, p in enumerate(parents, 1): | |
244 | metadata['p%i' % i] = node.hex(p) |
|
244 | metadata['p%i' % i] = node.hex(p) | |
245 | metadata = _fm0encodemeta(metadata) |
|
245 | metadata = _fm0encodemeta(metadata) | |
246 | numsuc = len(sucs) |
|
246 | numsuc = len(sucs) | |
247 | format = _fm0fixed + (_fm0node * numsuc) |
|
247 | format = _fm0fixed + (_fm0node * numsuc) | |
248 | data = [numsuc, len(metadata), flags, pre] |
|
248 | data = [numsuc, len(metadata), flags, pre] | |
249 | data.extend(sucs) |
|
249 | data.extend(sucs) | |
250 | return _pack(format, *data) + metadata |
|
250 | return _pack(format, *data) + metadata | |
251 |
|
251 | |||
252 | def _fm0encodemeta(meta): |
|
252 | def _fm0encodemeta(meta): | |
253 | """Return encoded metadata string to string mapping. |
|
253 | """Return encoded metadata string to string mapping. | |
254 |
|
254 | |||
255 | Assume no ':' in key and no '\0' in both key and value.""" |
|
255 | Assume no ':' in key and no '\0' in both key and value.""" | |
256 | for key, value in meta.iteritems(): |
|
256 | for key, value in meta.iteritems(): | |
257 | if ':' in key or '\0' in key: |
|
257 | if ':' in key or '\0' in key: | |
258 | raise ValueError("':' and '\0' are forbidden in metadata key'") |
|
258 | raise ValueError("':' and '\0' are forbidden in metadata key'") | |
259 | if '\0' in value: |
|
259 | if '\0' in value: | |
260 | raise ValueError("':' is forbidden in metadata value'") |
|
260 | raise ValueError("':' is forbidden in metadata value'") | |
261 | return '\0'.join(['%s:%s' % (k, meta[k]) for k in sorted(meta)]) |
|
261 | return '\0'.join(['%s:%s' % (k, meta[k]) for k in sorted(meta)]) | |
262 |
|
262 | |||
263 | def _fm0decodemeta(data): |
|
263 | def _fm0decodemeta(data): | |
264 | """Return string to string dictionary from encoded version.""" |
|
264 | """Return string to string dictionary from encoded version.""" | |
265 | d = {} |
|
265 | d = {} | |
266 | for l in data.split('\0'): |
|
266 | for l in data.split('\0'): | |
267 | if l: |
|
267 | if l: | |
268 | key, value = l.split(':') |
|
268 | key, value = l.split(':') | |
269 | d[key] = value |
|
269 | d[key] = value | |
270 | return d |
|
270 | return d | |
271 |
|
271 | |||
272 | ## Parsing and writing of version "1" |
|
272 | ## Parsing and writing of version "1" | |
273 | # |
|
273 | # | |
274 | # The header is followed by the markers. Each marker is made of: |
|
274 | # The header is followed by the markers. Each marker is made of: | |
275 | # |
|
275 | # | |
276 | # - uint32: total size of the marker (including this field) |
|
276 | # - uint32: total size of the marker (including this field) | |
277 | # |
|
277 | # | |
278 | # - float64: date in seconds since epoch |
|
278 | # - float64: date in seconds since epoch | |
279 | # |
|
279 | # | |
280 | # - int16: timezone offset in minutes |
|
280 | # - int16: timezone offset in minutes | |
281 | # |
|
281 | # | |
282 | # - uint16: a bit field. It is reserved for flags used in common |
|
282 | # - uint16: a bit field. It is reserved for flags used in common | |
283 | # obsolete marker operations, to avoid repeated decoding of metadata |
|
283 | # obsolete marker operations, to avoid repeated decoding of metadata | |
284 | # entries. |
|
284 | # entries. | |
285 | # |
|
285 | # | |
286 | # - uint8: number of successors "N", can be zero. |
|
286 | # - uint8: number of successors "N", can be zero. | |
287 | # |
|
287 | # | |
288 | # - uint8: number of parents "P", can be zero. |
|
288 | # - uint8: number of parents "P", can be zero. | |
289 | # |
|
289 | # | |
290 | # 0: parents data stored but no parent, |
|
290 | # 0: parents data stored but no parent, | |
291 | # 1: one parent stored, |
|
291 | # 1: one parent stored, | |
292 | # 2: two parents stored, |
|
292 | # 2: two parents stored, | |
293 | # 3: no parent data stored |
|
293 | # 3: no parent data stored | |
294 | # |
|
294 | # | |
295 | # - uint8: number of metadata entries M |
|
295 | # - uint8: number of metadata entries M | |
296 | # |
|
296 | # | |
297 | # - 20 or 32 bytes: predecessor changeset identifier. |
|
297 | # - 20 or 32 bytes: predecessor changeset identifier. | |
298 | # |
|
298 | # | |
299 | # - N*(20 or 32) bytes: successors changesets identifiers. |
|
299 | # - N*(20 or 32) bytes: successors changesets identifiers. | |
300 | # |
|
300 | # | |
301 | # - P*(20 or 32) bytes: parents of the predecessors changesets. |
|
301 | # - P*(20 or 32) bytes: parents of the predecessors changesets. | |
302 | # |
|
302 | # | |
303 | # - M*(uint8, uint8): size of all metadata entries (key and value) |
|
303 | # - M*(uint8, uint8): size of all metadata entries (key and value) | |
304 | # |
|
304 | # | |
305 | # - remaining bytes: the metadata, each (key, value) pair after the other. |
|
305 | # - remaining bytes: the metadata, each (key, value) pair after the other. | |
306 | _fm1version = 1 |
|
306 | _fm1version = 1 | |
307 | _fm1fixed = '>IdhHBBB20s' |
|
307 | _fm1fixed = '>IdhHBBB20s' | |
308 | _fm1nodesha1 = '20s' |
|
308 | _fm1nodesha1 = '20s' | |
309 | _fm1nodesha256 = '32s' |
|
309 | _fm1nodesha256 = '32s' | |
310 | _fm1nodesha1size = _calcsize(_fm1nodesha1) |
|
310 | _fm1nodesha1size = _calcsize(_fm1nodesha1) | |
311 | _fm1nodesha256size = _calcsize(_fm1nodesha256) |
|
311 | _fm1nodesha256size = _calcsize(_fm1nodesha256) | |
312 | _fm1fsize = _calcsize(_fm1fixed) |
|
312 | _fm1fsize = _calcsize(_fm1fixed) | |
313 | _fm1parentnone = 3 |
|
313 | _fm1parentnone = 3 | |
314 | _fm1parentshift = 14 |
|
314 | _fm1parentshift = 14 | |
315 | _fm1parentmask = (_fm1parentnone << _fm1parentshift) |
|
315 | _fm1parentmask = (_fm1parentnone << _fm1parentshift) | |
316 | _fm1metapair = 'BB' |
|
316 | _fm1metapair = 'BB' | |
317 | _fm1metapairsize = _calcsize(_fm1metapair) |
|
317 | _fm1metapairsize = _calcsize(_fm1metapair) | |
318 |
|
318 | |||
319 | def _fm1purereadmarkers(data, off, stop): |
|
319 | def _fm1purereadmarkers(data, off, stop): | |
320 | # make some global constants local for performance |
|
320 | # make some global constants local for performance | |
321 | noneflag = _fm1parentnone |
|
321 | noneflag = _fm1parentnone | |
322 | sha2flag = usingsha256 |
|
322 | sha2flag = usingsha256 | |
323 | sha1size = _fm1nodesha1size |
|
323 | sha1size = _fm1nodesha1size | |
324 | sha2size = _fm1nodesha256size |
|
324 | sha2size = _fm1nodesha256size | |
325 | sha1fmt = _fm1nodesha1 |
|
325 | sha1fmt = _fm1nodesha1 | |
326 | sha2fmt = _fm1nodesha256 |
|
326 | sha2fmt = _fm1nodesha256 | |
327 | metasize = _fm1metapairsize |
|
327 | metasize = _fm1metapairsize | |
328 | metafmt = _fm1metapair |
|
328 | metafmt = _fm1metapair | |
329 | fsize = _fm1fsize |
|
329 | fsize = _fm1fsize | |
330 | unpack = _unpack |
|
330 | unpack = _unpack | |
331 |
|
331 | |||
332 | # Loop on markers |
|
332 | # Loop on markers | |
333 | ufixed = struct.Struct(_fm1fixed).unpack |
|
333 | ufixed = struct.Struct(_fm1fixed).unpack | |
334 |
|
334 | |||
335 | while off < stop: |
|
335 | while off < stop: | |
336 | # read fixed part |
|
336 | # read fixed part | |
337 | o1 = off + fsize |
|
337 | o1 = off + fsize | |
338 | t, secs, tz, flags, numsuc, numpar, nummeta, prec = ufixed(data[off:o1]) |
|
338 | t, secs, tz, flags, numsuc, numpar, nummeta, prec = ufixed(data[off:o1]) | |
339 |
|
339 | |||
340 | if flags & sha2flag: |
|
340 | if flags & sha2flag: | |
341 | # FIXME: prec was read as a SHA1, needs to be amended |
|
341 | # FIXME: prec was read as a SHA1, needs to be amended | |
342 |
|
342 | |||
343 | # read 0 or more successors |
|
343 | # read 0 or more successors | |
344 | if numsuc == 1: |
|
344 | if numsuc == 1: | |
345 | o2 = o1 + sha2size |
|
345 | o2 = o1 + sha2size | |
346 | sucs = (data[o1:o2],) |
|
346 | sucs = (data[o1:o2],) | |
347 | else: |
|
347 | else: | |
348 | o2 = o1 + sha2size * numsuc |
|
348 | o2 = o1 + sha2size * numsuc | |
349 | sucs = unpack(sha2fmt * numsuc, data[o1:o2]) |
|
349 | sucs = unpack(sha2fmt * numsuc, data[o1:o2]) | |
350 |
|
350 | |||
351 | # read parents |
|
351 | # read parents | |
352 | if numpar == noneflag: |
|
352 | if numpar == noneflag: | |
353 | o3 = o2 |
|
353 | o3 = o2 | |
354 | parents = None |
|
354 | parents = None | |
355 | elif numpar == 1: |
|
355 | elif numpar == 1: | |
356 | o3 = o2 + sha2size |
|
356 | o3 = o2 + sha2size | |
357 | parents = (data[o2:o3],) |
|
357 | parents = (data[o2:o3],) | |
358 | else: |
|
358 | else: | |
359 | o3 = o2 + sha2size * numpar |
|
359 | o3 = o2 + sha2size * numpar | |
360 | parents = unpack(sha2fmt * numpar, data[o2:o3]) |
|
360 | parents = unpack(sha2fmt * numpar, data[o2:o3]) | |
361 | else: |
|
361 | else: | |
362 | # read 0 or more successors |
|
362 | # read 0 or more successors | |
363 | if numsuc == 1: |
|
363 | if numsuc == 1: | |
364 | o2 = o1 + sha1size |
|
364 | o2 = o1 + sha1size | |
365 | sucs = (data[o1:o2],) |
|
365 | sucs = (data[o1:o2],) | |
366 | else: |
|
366 | else: | |
367 | o2 = o1 + sha1size * numsuc |
|
367 | o2 = o1 + sha1size * numsuc | |
368 | sucs = unpack(sha1fmt * numsuc, data[o1:o2]) |
|
368 | sucs = unpack(sha1fmt * numsuc, data[o1:o2]) | |
369 |
|
369 | |||
370 | # read parents |
|
370 | # read parents | |
371 | if numpar == noneflag: |
|
371 | if numpar == noneflag: | |
372 | o3 = o2 |
|
372 | o3 = o2 | |
373 | parents = None |
|
373 | parents = None | |
374 | elif numpar == 1: |
|
374 | elif numpar == 1: | |
375 | o3 = o2 + sha1size |
|
375 | o3 = o2 + sha1size | |
376 | parents = (data[o2:o3],) |
|
376 | parents = (data[o2:o3],) | |
377 | else: |
|
377 | else: | |
378 | o3 = o2 + sha1size * numpar |
|
378 | o3 = o2 + sha1size * numpar | |
379 | parents = unpack(sha1fmt * numpar, data[o2:o3]) |
|
379 | parents = unpack(sha1fmt * numpar, data[o2:o3]) | |
380 |
|
380 | |||
381 | # read metadata |
|
381 | # read metadata | |
382 | off = o3 + metasize * nummeta |
|
382 | off = o3 + metasize * nummeta | |
383 | metapairsize = unpack('>' + (metafmt * nummeta), data[o3:off]) |
|
383 | metapairsize = unpack('>' + (metafmt * nummeta), data[o3:off]) | |
384 | metadata = [] |
|
384 | metadata = [] | |
385 | for idx in xrange(0, len(metapairsize), 2): |
|
385 | for idx in xrange(0, len(metapairsize), 2): | |
386 | o1 = off + metapairsize[idx] |
|
386 | o1 = off + metapairsize[idx] | |
387 | o2 = o1 + metapairsize[idx + 1] |
|
387 | o2 = o1 + metapairsize[idx + 1] | |
388 | metadata.append((data[off:o1], data[o1:o2])) |
|
388 | metadata.append((data[off:o1], data[o1:o2])) | |
389 | off = o2 |
|
389 | off = o2 | |
390 |
|
390 | |||
391 | yield (prec, sucs, flags, tuple(metadata), (secs, tz * 60), parents) |
|
391 | yield (prec, sucs, flags, tuple(metadata), (secs, tz * 60), parents) | |
392 |
|
392 | |||
393 | def _fm1encodeonemarker(marker): |
|
393 | def _fm1encodeonemarker(marker): | |
394 | pre, sucs, flags, metadata, date, parents = marker |
|
394 | pre, sucs, flags, metadata, date, parents = marker | |
395 | # determine node size |
|
395 | # determine node size | |
396 | _fm1node = _fm1nodesha1 |
|
396 | _fm1node = _fm1nodesha1 | |
397 | if flags & usingsha256: |
|
397 | if flags & usingsha256: | |
398 | _fm1node = _fm1nodesha256 |
|
398 | _fm1node = _fm1nodesha256 | |
399 | numsuc = len(sucs) |
|
399 | numsuc = len(sucs) | |
400 | numextranodes = numsuc |
|
400 | numextranodes = numsuc | |
401 | if parents is None: |
|
401 | if parents is None: | |
402 | numpar = _fm1parentnone |
|
402 | numpar = _fm1parentnone | |
403 | else: |
|
403 | else: | |
404 | numpar = len(parents) |
|
404 | numpar = len(parents) | |
405 | numextranodes += numpar |
|
405 | numextranodes += numpar | |
406 | formatnodes = _fm1node * numextranodes |
|
406 | formatnodes = _fm1node * numextranodes | |
407 | formatmeta = _fm1metapair * len(metadata) |
|
407 | formatmeta = _fm1metapair * len(metadata) | |
408 | format = _fm1fixed + formatnodes + formatmeta |
|
408 | format = _fm1fixed + formatnodes + formatmeta | |
409 | # tz is stored in minutes so we divide by 60 |
|
409 | # tz is stored in minutes so we divide by 60 | |
410 | tz = date[1]//60 |
|
410 | tz = date[1]//60 | |
411 | data = [None, date[0], tz, flags, numsuc, numpar, len(metadata), pre] |
|
411 | data = [None, date[0], tz, flags, numsuc, numpar, len(metadata), pre] | |
412 | data.extend(sucs) |
|
412 | data.extend(sucs) | |
413 | if parents is not None: |
|
413 | if parents is not None: | |
414 | data.extend(parents) |
|
414 | data.extend(parents) | |
415 | totalsize = _calcsize(format) |
|
415 | totalsize = _calcsize(format) | |
416 | for key, value in metadata: |
|
416 | for key, value in metadata: | |
417 | lk = len(key) |
|
417 | lk = len(key) | |
418 | lv = len(value) |
|
418 | lv = len(value) | |
419 | if lk > 255: |
|
419 | if lk > 255: | |
420 | msg = ('obsstore metadata key cannot be longer than 255 bytes' |
|
420 | msg = ('obsstore metadata key cannot be longer than 255 bytes' | |
421 | ' (key "%s" is %u bytes)') % (key, lk) |
|
421 | ' (key "%s" is %u bytes)') % (key, lk) | |
422 | raise error.ProgrammingError(msg) |
|
422 | raise error.ProgrammingError(msg) | |
423 | if lv > 255: |
|
423 | if lv > 255: | |
424 | msg = ('obsstore metadata value cannot be longer than 255 bytes' |
|
424 | msg = ('obsstore metadata value cannot be longer than 255 bytes' | |
425 | ' (value "%s" for key "%s" is %u bytes)') % (value, key, lv) |
|
425 | ' (value "%s" for key "%s" is %u bytes)') % (value, key, lv) | |
426 | raise error.ProgrammingError(msg) |
|
426 | raise error.ProgrammingError(msg) | |
427 | data.append(lk) |
|
427 | data.append(lk) | |
428 | data.append(lv) |
|
428 | data.append(lv) | |
429 | totalsize += lk + lv |
|
429 | totalsize += lk + lv | |
430 | data[0] = totalsize |
|
430 | data[0] = totalsize | |
431 | data = [_pack(format, *data)] |
|
431 | data = [_pack(format, *data)] | |
432 | for key, value in metadata: |
|
432 | for key, value in metadata: | |
433 | data.append(key) |
|
433 | data.append(key) | |
434 | data.append(value) |
|
434 | data.append(value) | |
435 | return ''.join(data) |
|
435 | return ''.join(data) | |
436 |
|
436 | |||
437 | def _fm1readmarkers(data, off, stop): |
|
437 | def _fm1readmarkers(data, off, stop): | |
438 | native = getattr(parsers, 'fm1readmarkers', None) |
|
438 | native = getattr(parsers, 'fm1readmarkers', None) | |
439 | if not native: |
|
439 | if not native: | |
440 | return _fm1purereadmarkers(data, off, stop) |
|
440 | return _fm1purereadmarkers(data, off, stop) | |
441 | return native(data, off, stop) |
|
441 | return native(data, off, stop) | |
442 |
|
442 | |||
443 | # mapping to read/write various marker formats |
|
443 | # mapping to read/write various marker formats | |
444 | # <version> -> (decoder, encoder) |
|
444 | # <version> -> (decoder, encoder) | |
445 | formats = {_fm0version: (_fm0readmarkers, _fm0encodeonemarker), |
|
445 | formats = {_fm0version: (_fm0readmarkers, _fm0encodeonemarker), | |
446 | _fm1version: (_fm1readmarkers, _fm1encodeonemarker)} |
|
446 | _fm1version: (_fm1readmarkers, _fm1encodeonemarker)} | |
447 |
|
447 | |||
448 | def _readmarkerversion(data): |
|
448 | def _readmarkerversion(data): | |
449 | return _unpack('>B', data[0:1])[0] |
|
449 | return _unpack('>B', data[0:1])[0] | |
450 |
|
450 | |||
451 | @util.nogc |
|
451 | @util.nogc | |
452 | def _readmarkers(data, off=None, stop=None): |
|
452 | def _readmarkers(data, off=None, stop=None): | |
453 | """Read and enumerate markers from raw data""" |
|
453 | """Read and enumerate markers from raw data""" | |
454 | diskversion = _readmarkerversion(data) |
|
454 | diskversion = _readmarkerversion(data) | |
455 | if not off: |
|
455 | if not off: | |
456 | off = 1 # skip 1 byte version number |
|
456 | off = 1 # skip 1 byte version number | |
457 | if stop is None: |
|
457 | if stop is None: | |
458 | stop = len(data) |
|
458 | stop = len(data) | |
459 | if diskversion not in formats: |
|
459 | if diskversion not in formats: | |
460 | msg = _('parsing obsolete marker: unknown version %r') % diskversion |
|
460 | msg = _('parsing obsolete marker: unknown version %r') % diskversion | |
461 | raise error.UnknownVersion(msg, version=diskversion) |
|
461 | raise error.UnknownVersion(msg, version=diskversion) | |
462 | return diskversion, formats[diskversion][0](data, off, stop) |
|
462 | return diskversion, formats[diskversion][0](data, off, stop) | |
463 |
|
463 | |||
464 | def encodeheader(version=_fm0version): |
|
464 | def encodeheader(version=_fm0version): | |
465 | return _pack('>B', version) |
|
465 | return _pack('>B', version) | |
466 |
|
466 | |||
467 | def encodemarkers(markers, addheader=False, version=_fm0version): |
|
467 | def encodemarkers(markers, addheader=False, version=_fm0version): | |
468 | # Kept separate from flushmarkers(), it will be reused for |
|
468 | # Kept separate from flushmarkers(), it will be reused for | |
469 | # markers exchange. |
|
469 | # markers exchange. | |
470 | encodeone = formats[version][1] |
|
470 | encodeone = formats[version][1] | |
471 | if addheader: |
|
471 | if addheader: | |
472 | yield encodeheader(version) |
|
472 | yield encodeheader(version) | |
473 | for marker in markers: |
|
473 | for marker in markers: | |
474 | yield encodeone(marker) |
|
474 | yield encodeone(marker) | |
475 |
|
475 | |||
476 | @util.nogc |
|
476 | @util.nogc | |
477 | def _addsuccessors(successors, markers): |
|
477 | def _addsuccessors(successors, markers): | |
478 | for mark in markers: |
|
478 | for mark in markers: | |
479 | successors.setdefault(mark[0], set()).add(mark) |
|
479 | successors.setdefault(mark[0], set()).add(mark) | |
480 |
|
480 | |||
481 | def _addprecursors(*args, **kwargs): |
|
481 | def _addprecursors(*args, **kwargs): | |
482 | msg = ("'obsolete._addprecursors' is deprecated, " |
|
482 | msg = ("'obsolete._addprecursors' is deprecated, " | |
483 | "use 'obsolete._addpredecessors'") |
|
483 | "use 'obsolete._addpredecessors'") | |
484 | util.nouideprecwarn(msg, '4.4') |
|
484 | util.nouideprecwarn(msg, '4.4') | |
485 |
|
485 | |||
486 | return _addpredecessors(*args, **kwargs) |
|
486 | return _addpredecessors(*args, **kwargs) | |
487 |
|
487 | |||
488 | @util.nogc |
|
488 | @util.nogc | |
489 | def _addpredecessors(predecessors, markers): |
|
489 | def _addpredecessors(predecessors, markers): | |
490 | for mark in markers: |
|
490 | for mark in markers: | |
491 | for suc in mark[1]: |
|
491 | for suc in mark[1]: | |
492 | predecessors.setdefault(suc, set()).add(mark) |
|
492 | predecessors.setdefault(suc, set()).add(mark) | |
493 |
|
493 | |||
494 | @util.nogc |
|
494 | @util.nogc | |
495 | def _addchildren(children, markers): |
|
495 | def _addchildren(children, markers): | |
496 | for mark in markers: |
|
496 | for mark in markers: | |
497 | parents = mark[5] |
|
497 | parents = mark[5] | |
498 | if parents is not None: |
|
498 | if parents is not None: | |
499 | for p in parents: |
|
499 | for p in parents: | |
500 | children.setdefault(p, set()).add(mark) |
|
500 | children.setdefault(p, set()).add(mark) | |
501 |
|
501 | |||
502 | def _checkinvalidmarkers(markers): |
|
502 | def _checkinvalidmarkers(markers): | |
503 | """search for marker with invalid data and raise error if needed |
|
503 | """search for marker with invalid data and raise error if needed | |
504 |
|
504 | |||
505 | Exist as a separated function to allow the evolve extension for a more |
|
505 | Exist as a separated function to allow the evolve extension for a more | |
506 | subtle handling. |
|
506 | subtle handling. | |
507 | """ |
|
507 | """ | |
508 | for mark in markers: |
|
508 | for mark in markers: | |
509 | if node.nullid in mark[1]: |
|
509 | if node.nullid in mark[1]: | |
510 | raise error.Abort(_('bad obsolescence marker detected: ' |
|
510 | raise error.Abort(_('bad obsolescence marker detected: ' | |
511 | 'invalid successors nullid')) |
|
511 | 'invalid successors nullid')) | |
512 |
|
512 | |||
513 | class obsstore(object): |
|
513 | class obsstore(object): | |
514 | """Store obsolete markers |
|
514 | """Store obsolete markers | |
515 |
|
515 | |||
516 | Markers can be accessed with two mappings: |
|
516 | Markers can be accessed with two mappings: | |
517 | - predecessors[x] -> set(markers on predecessors edges of x) |
|
517 | - predecessors[x] -> set(markers on predecessors edges of x) | |
518 | - successors[x] -> set(markers on successors edges of x) |
|
518 | - successors[x] -> set(markers on successors edges of x) | |
519 | - children[x] -> set(markers on predecessors edges of children(x) |
|
519 | - children[x] -> set(markers on predecessors edges of children(x) | |
520 | """ |
|
520 | """ | |
521 |
|
521 | |||
522 | fields = ('prec', 'succs', 'flag', 'meta', 'date', 'parents') |
|
522 | fields = ('prec', 'succs', 'flag', 'meta', 'date', 'parents') | |
523 | # prec: nodeid, predecessors changesets |
|
523 | # prec: nodeid, predecessors changesets | |
524 | # succs: tuple of nodeid, successor changesets (0-N length) |
|
524 | # succs: tuple of nodeid, successor changesets (0-N length) | |
525 | # flag: integer, flag field carrying modifier for the markers (see doc) |
|
525 | # flag: integer, flag field carrying modifier for the markers (see doc) | |
526 | # meta: binary blob, encoded metadata dictionary |
|
526 | # meta: binary blob, encoded metadata dictionary | |
527 | # date: (float, int) tuple, date of marker creation |
|
527 | # date: (float, int) tuple, date of marker creation | |
528 | # parents: (tuple of nodeid) or None, parents of predecessors |
|
528 | # parents: (tuple of nodeid) or None, parents of predecessors | |
529 | # None is used when no data has been recorded |
|
529 | # None is used when no data has been recorded | |
530 |
|
530 | |||
531 | def __init__(self, svfs, defaultformat=_fm1version, readonly=False): |
|
531 | def __init__(self, svfs, defaultformat=_fm1version, readonly=False): | |
532 | # caches for various obsolescence related cache |
|
532 | # caches for various obsolescence related cache | |
533 | self.caches = {} |
|
533 | self.caches = {} | |
534 | self.svfs = svfs |
|
534 | self.svfs = svfs | |
535 | self._defaultformat = defaultformat |
|
535 | self._defaultformat = defaultformat | |
536 | self._readonly = readonly |
|
536 | self._readonly = readonly | |
537 |
|
537 | |||
538 | def __iter__(self): |
|
538 | def __iter__(self): | |
539 | return iter(self._all) |
|
539 | return iter(self._all) | |
540 |
|
540 | |||
541 | def __len__(self): |
|
541 | def __len__(self): | |
542 | return len(self._all) |
|
542 | return len(self._all) | |
543 |
|
543 | |||
544 | def __nonzero__(self): |
|
544 | def __nonzero__(self): | |
545 | if not self._cached('_all'): |
|
545 | if not self._cached('_all'): | |
546 | try: |
|
546 | try: | |
547 | return self.svfs.stat('obsstore').st_size > 1 |
|
547 | return self.svfs.stat('obsstore').st_size > 1 | |
548 | except OSError as inst: |
|
548 | except OSError as inst: | |
549 | if inst.errno != errno.ENOENT: |
|
549 | if inst.errno != errno.ENOENT: | |
550 | raise |
|
550 | raise | |
551 | # just build an empty _all list if no obsstore exists, which |
|
551 | # just build an empty _all list if no obsstore exists, which | |
552 | # avoids further stat() syscalls |
|
552 | # avoids further stat() syscalls | |
553 | return bool(self._all) |
|
553 | return bool(self._all) | |
554 |
|
554 | |||
555 | __bool__ = __nonzero__ |
|
555 | __bool__ = __nonzero__ | |
556 |
|
556 | |||
557 | @property |
|
557 | @property | |
558 | def readonly(self): |
|
558 | def readonly(self): | |
559 | """True if marker creation is disabled |
|
559 | """True if marker creation is disabled | |
560 |
|
560 | |||
561 | Remove me in the future when obsolete marker is always on.""" |
|
561 | Remove me in the future when obsolete marker is always on.""" | |
562 | return self._readonly |
|
562 | return self._readonly | |
563 |
|
563 | |||
564 | def create(self, transaction, prec, succs=(), flag=0, parents=None, |
|
564 | def create(self, transaction, prec, succs=(), flag=0, parents=None, | |
565 | date=None, metadata=None, ui=None): |
|
565 | date=None, metadata=None, ui=None): | |
566 | """obsolete: add a new obsolete marker |
|
566 | """obsolete: add a new obsolete marker | |
567 |
|
567 | |||
568 | * ensuring it is hashable |
|
568 | * ensuring it is hashable | |
569 | * check mandatory metadata |
|
569 | * check mandatory metadata | |
570 | * encode metadata |
|
570 | * encode metadata | |
571 |
|
571 | |||
572 | If you are a human writing code creating marker you want to use the |
|
572 | If you are a human writing code creating marker you want to use the | |
573 | `createmarkers` function in this module instead. |
|
573 | `createmarkers` function in this module instead. | |
574 |
|
574 | |||
575 | return True if a new marker have been added, False if the markers |
|
575 | return True if a new marker have been added, False if the markers | |
576 | already existed (no op). |
|
576 | already existed (no op). | |
577 | """ |
|
577 | """ | |
578 | if metadata is None: |
|
578 | if metadata is None: | |
579 | metadata = {} |
|
579 | metadata = {} | |
580 | if date is None: |
|
580 | if date is None: | |
581 | if 'date' in metadata: |
|
581 | if 'date' in metadata: | |
582 | # as a courtesy for out-of-tree extensions |
|
582 | # as a courtesy for out-of-tree extensions | |
583 | date = util.parsedate(metadata.pop('date')) |
|
583 | date = util.parsedate(metadata.pop('date')) | |
584 | elif ui is not None: |
|
584 | elif ui is not None: | |
585 | date = ui.configdate('devel', 'default-date') |
|
585 | date = ui.configdate('devel', 'default-date') | |
586 | if date is None: |
|
586 | if date is None: | |
587 | date = util.makedate() |
|
587 | date = util.makedate() | |
588 | else: |
|
588 | else: | |
589 | date = util.makedate() |
|
589 | date = util.makedate() | |
590 | if len(prec) != 20: |
|
590 | if len(prec) != 20: | |
591 | raise ValueError(prec) |
|
591 | raise ValueError(prec) | |
592 | for succ in succs: |
|
592 | for succ in succs: | |
593 | if len(succ) != 20: |
|
593 | if len(succ) != 20: | |
594 | raise ValueError(succ) |
|
594 | raise ValueError(succ) | |
595 | if prec in succs: |
|
595 | if prec in succs: | |
596 | raise ValueError(_('in-marker cycle with %s') % node.hex(prec)) |
|
596 | raise ValueError(_('in-marker cycle with %s') % node.hex(prec)) | |
597 |
|
597 | |||
598 | metadata = tuple(sorted(metadata.iteritems())) |
|
598 | metadata = tuple(sorted(metadata.iteritems())) | |
599 |
|
599 | |||
600 | marker = (bytes(prec), tuple(succs), int(flag), metadata, date, parents) |
|
600 | marker = (bytes(prec), tuple(succs), int(flag), metadata, date, parents) | |
601 | return bool(self.add(transaction, [marker])) |
|
601 | return bool(self.add(transaction, [marker])) | |
602 |
|
602 | |||
603 | def add(self, transaction, markers): |
|
603 | def add(self, transaction, markers): | |
604 | """Add new markers to the store |
|
604 | """Add new markers to the store | |
605 |
|
605 | |||
606 | Take care of filtering duplicate. |
|
606 | Take care of filtering duplicate. | |
607 | Return the number of new marker.""" |
|
607 | Return the number of new marker.""" | |
608 | if self._readonly: |
|
608 | if self._readonly: | |
609 | raise error.Abort(_('creating obsolete markers is not enabled on ' |
|
609 | raise error.Abort(_('creating obsolete markers is not enabled on ' | |
610 | 'this repo')) |
|
610 | 'this repo')) | |
611 | known = set() |
|
611 | known = set() | |
612 | getsuccessors = self.successors.get |
|
612 | getsuccessors = self.successors.get | |
613 | new = [] |
|
613 | new = [] | |
614 | for m in markers: |
|
614 | for m in markers: | |
615 | if m not in getsuccessors(m[0], ()) and m not in known: |
|
615 | if m not in getsuccessors(m[0], ()) and m not in known: | |
616 | known.add(m) |
|
616 | known.add(m) | |
617 | new.append(m) |
|
617 | new.append(m) | |
618 | if new: |
|
618 | if new: | |
619 | f = self.svfs('obsstore', 'ab') |
|
619 | f = self.svfs('obsstore', 'ab') | |
620 | try: |
|
620 | try: | |
621 | offset = f.tell() |
|
621 | offset = f.tell() | |
622 | transaction.add('obsstore', offset) |
|
622 | transaction.add('obsstore', offset) | |
623 | # offset == 0: new file - add the version header |
|
623 | # offset == 0: new file - add the version header | |
624 | data = b''.join(encodemarkers(new, offset == 0, self._version)) |
|
624 | data = b''.join(encodemarkers(new, offset == 0, self._version)) | |
625 | f.write(data) |
|
625 | f.write(data) | |
626 | finally: |
|
626 | finally: | |
627 | # XXX: f.close() == filecache invalidation == obsstore rebuilt. |
|
627 | # XXX: f.close() == filecache invalidation == obsstore rebuilt. | |
628 | # call 'filecacheentry.refresh()' here |
|
628 | # call 'filecacheentry.refresh()' here | |
629 | f.close() |
|
629 | f.close() | |
630 | addedmarkers = transaction.changes.get('obsmarkers') |
|
630 | addedmarkers = transaction.changes.get('obsmarkers') | |
631 | if addedmarkers is not None: |
|
631 | if addedmarkers is not None: | |
632 | addedmarkers.update(new) |
|
632 | addedmarkers.update(new) | |
633 | self._addmarkers(new, data) |
|
633 | self._addmarkers(new, data) | |
634 | # new marker *may* have changed several set. invalidate the cache. |
|
634 | # new marker *may* have changed several set. invalidate the cache. | |
635 | self.caches.clear() |
|
635 | self.caches.clear() | |
636 | # records the number of new markers for the transaction hooks |
|
636 | # records the number of new markers for the transaction hooks | |
637 | previous = int(transaction.hookargs.get('new_obsmarkers', '0')) |
|
637 | previous = int(transaction.hookargs.get('new_obsmarkers', '0')) | |
638 | transaction.hookargs['new_obsmarkers'] = str(previous + len(new)) |
|
638 | transaction.hookargs['new_obsmarkers'] = str(previous + len(new)) | |
639 | return len(new) |
|
639 | return len(new) | |
640 |
|
640 | |||
641 | def mergemarkers(self, transaction, data): |
|
641 | def mergemarkers(self, transaction, data): | |
642 | """merge a binary stream of markers inside the obsstore |
|
642 | """merge a binary stream of markers inside the obsstore | |
643 |
|
643 | |||
644 | Returns the number of new markers added.""" |
|
644 | Returns the number of new markers added.""" | |
645 | version, markers = _readmarkers(data) |
|
645 | version, markers = _readmarkers(data) | |
646 | return self.add(transaction, markers) |
|
646 | return self.add(transaction, markers) | |
647 |
|
647 | |||
648 | @propertycache |
|
648 | @propertycache | |
649 | def _data(self): |
|
649 | def _data(self): | |
650 | return self.svfs.tryread('obsstore') |
|
650 | return self.svfs.tryread('obsstore') | |
651 |
|
651 | |||
652 | @propertycache |
|
652 | @propertycache | |
653 | def _version(self): |
|
653 | def _version(self): | |
654 | if len(self._data) >= 1: |
|
654 | if len(self._data) >= 1: | |
655 | return _readmarkerversion(self._data) |
|
655 | return _readmarkerversion(self._data) | |
656 | else: |
|
656 | else: | |
657 | return self._defaultformat |
|
657 | return self._defaultformat | |
658 |
|
658 | |||
659 | @propertycache |
|
659 | @propertycache | |
660 | def _all(self): |
|
660 | def _all(self): | |
661 | data = self._data |
|
661 | data = self._data | |
662 | if not data: |
|
662 | if not data: | |
663 | return [] |
|
663 | return [] | |
664 | self._version, markers = _readmarkers(data) |
|
664 | self._version, markers = _readmarkers(data) | |
665 | markers = list(markers) |
|
665 | markers = list(markers) | |
666 | _checkinvalidmarkers(markers) |
|
666 | _checkinvalidmarkers(markers) | |
667 | return markers |
|
667 | return markers | |
668 |
|
668 | |||
669 | @propertycache |
|
669 | @propertycache | |
670 | def successors(self): |
|
670 | def successors(self): | |
671 | successors = {} |
|
671 | successors = {} | |
672 | _addsuccessors(successors, self._all) |
|
672 | _addsuccessors(successors, self._all) | |
673 | return successors |
|
673 | return successors | |
674 |
|
674 | |||
675 | @property |
|
675 | @property | |
676 | def precursors(self): |
|
676 | def precursors(self): | |
677 | msg = ("'obsstore.precursors' is deprecated, " |
|
677 | msg = ("'obsstore.precursors' is deprecated, " | |
678 | "use 'obsstore.predecessors'") |
|
678 | "use 'obsstore.predecessors'") | |
679 | util.nouideprecwarn(msg, '4.4') |
|
679 | util.nouideprecwarn(msg, '4.4') | |
680 |
|
680 | |||
681 | return self.predecessors |
|
681 | return self.predecessors | |
682 |
|
682 | |||
683 | @propertycache |
|
683 | @propertycache | |
684 | def predecessors(self): |
|
684 | def predecessors(self): | |
685 | predecessors = {} |
|
685 | predecessors = {} | |
686 | _addpredecessors(predecessors, self._all) |
|
686 | _addpredecessors(predecessors, self._all) | |
687 | return predecessors |
|
687 | return predecessors | |
688 |
|
688 | |||
689 | @propertycache |
|
689 | @propertycache | |
690 | def children(self): |
|
690 | def children(self): | |
691 | children = {} |
|
691 | children = {} | |
692 | _addchildren(children, self._all) |
|
692 | _addchildren(children, self._all) | |
693 | return children |
|
693 | return children | |
694 |
|
694 | |||
695 | def _cached(self, attr): |
|
695 | def _cached(self, attr): | |
696 | return attr in self.__dict__ |
|
696 | return attr in self.__dict__ | |
697 |
|
697 | |||
698 | def _addmarkers(self, markers, rawdata): |
|
698 | def _addmarkers(self, markers, rawdata): | |
699 | markers = list(markers) # to allow repeated iteration |
|
699 | markers = list(markers) # to allow repeated iteration | |
700 | self._data = self._data + rawdata |
|
700 | self._data = self._data + rawdata | |
701 | self._all.extend(markers) |
|
701 | self._all.extend(markers) | |
702 | if self._cached('successors'): |
|
702 | if self._cached('successors'): | |
703 | _addsuccessors(self.successors, markers) |
|
703 | _addsuccessors(self.successors, markers) | |
704 | if self._cached('predecessors'): |
|
704 | if self._cached('predecessors'): | |
705 | _addpredecessors(self.predecessors, markers) |
|
705 | _addpredecessors(self.predecessors, markers) | |
706 | if self._cached('children'): |
|
706 | if self._cached('children'): | |
707 | _addchildren(self.children, markers) |
|
707 | _addchildren(self.children, markers) | |
708 | _checkinvalidmarkers(markers) |
|
708 | _checkinvalidmarkers(markers) | |
709 |
|
709 | |||
710 | def relevantmarkers(self, nodes): |
|
710 | def relevantmarkers(self, nodes): | |
711 | """return a set of all obsolescence markers relevant to a set of nodes. |
|
711 | """return a set of all obsolescence markers relevant to a set of nodes. | |
712 |
|
712 | |||
713 | "relevant" to a set of nodes mean: |
|
713 | "relevant" to a set of nodes mean: | |
714 |
|
714 | |||
715 | - marker that use this changeset as successor |
|
715 | - marker that use this changeset as successor | |
716 | - prune marker of direct children on this changeset |
|
716 | - prune marker of direct children on this changeset | |
717 | - recursive application of the two rules on predecessors of these |
|
717 | - recursive application of the two rules on predecessors of these | |
718 | markers |
|
718 | markers | |
719 |
|
719 | |||
720 | It is a set so you cannot rely on order.""" |
|
720 | It is a set so you cannot rely on order.""" | |
721 |
|
721 | |||
722 | pendingnodes = set(nodes) |
|
722 | pendingnodes = set(nodes) | |
723 | seenmarkers = set() |
|
723 | seenmarkers = set() | |
724 | seennodes = set(pendingnodes) |
|
724 | seennodes = set(pendingnodes) | |
725 | precursorsmarkers = self.predecessors |
|
725 | precursorsmarkers = self.predecessors | |
726 | succsmarkers = self.successors |
|
726 | succsmarkers = self.successors | |
727 | children = self.children |
|
727 | children = self.children | |
728 | while pendingnodes: |
|
728 | while pendingnodes: | |
729 | direct = set() |
|
729 | direct = set() | |
730 | for current in pendingnodes: |
|
730 | for current in pendingnodes: | |
731 | direct.update(precursorsmarkers.get(current, ())) |
|
731 | direct.update(precursorsmarkers.get(current, ())) | |
732 | pruned = [m for m in children.get(current, ()) if not m[1]] |
|
732 | pruned = [m for m in children.get(current, ()) if not m[1]] | |
733 | direct.update(pruned) |
|
733 | direct.update(pruned) | |
734 | pruned = [m for m in succsmarkers.get(current, ()) if not m[1]] |
|
734 | pruned = [m for m in succsmarkers.get(current, ()) if not m[1]] | |
735 | direct.update(pruned) |
|
735 | direct.update(pruned) | |
736 | direct -= seenmarkers |
|
736 | direct -= seenmarkers | |
737 | pendingnodes = set([m[0] for m in direct]) |
|
737 | pendingnodes = set([m[0] for m in direct]) | |
738 | seenmarkers |= direct |
|
738 | seenmarkers |= direct | |
739 | pendingnodes -= seennodes |
|
739 | pendingnodes -= seennodes | |
740 | seennodes |= pendingnodes |
|
740 | seennodes |= pendingnodes | |
741 | return seenmarkers |
|
741 | return seenmarkers | |
742 |
|
742 | |||
743 | def makestore(ui, repo): |
|
743 | def makestore(ui, repo): | |
744 | """Create an obsstore instance from a repo.""" |
|
744 | """Create an obsstore instance from a repo.""" | |
745 | # read default format for new obsstore. |
|
745 | # read default format for new obsstore. | |
746 | # developer config: format.obsstore-version |
|
746 | # developer config: format.obsstore-version | |
747 | defaultformat = ui.configint('format', 'obsstore-version') |
|
747 | defaultformat = ui.configint('format', 'obsstore-version') | |
748 | # rely on obsstore class default when possible. |
|
748 | # rely on obsstore class default when possible. | |
749 | kwargs = {} |
|
749 | kwargs = {} | |
750 | if defaultformat is not None: |
|
750 | if defaultformat is not None: | |
751 | kwargs['defaultformat'] = defaultformat |
|
751 | kwargs['defaultformat'] = defaultformat | |
752 | readonly = not isenabled(repo, createmarkersopt) |
|
752 | readonly = not isenabled(repo, createmarkersopt) | |
753 | store = obsstore(repo.svfs, readonly=readonly, **kwargs) |
|
753 | store = obsstore(repo.svfs, readonly=readonly, **kwargs) | |
754 | if store and readonly: |
|
754 | if store and readonly: | |
755 | ui.warn(_('obsolete feature not enabled but %i markers found!\n') |
|
755 | ui.warn(_('obsolete feature not enabled but %i markers found!\n') | |
756 | % len(list(store))) |
|
756 | % len(list(store))) | |
757 | return store |
|
757 | return store | |
758 |
|
758 | |||
759 | def commonversion(versions): |
|
759 | def commonversion(versions): | |
760 | """Return the newest version listed in both versions and our local formats. |
|
760 | """Return the newest version listed in both versions and our local formats. | |
761 |
|
761 | |||
762 | Returns None if no common version exists. |
|
762 | Returns None if no common version exists. | |
763 | """ |
|
763 | """ | |
764 | versions.sort(reverse=True) |
|
764 | versions.sort(reverse=True) | |
765 | # search for highest version known on both side |
|
765 | # search for highest version known on both side | |
766 | for v in versions: |
|
766 | for v in versions: | |
767 | if v in formats: |
|
767 | if v in formats: | |
768 | return v |
|
768 | return v | |
769 | return None |
|
769 | return None | |
770 |
|
770 | |||
771 | # arbitrary picked to fit into 8K limit from HTTP server |
|
771 | # arbitrary picked to fit into 8K limit from HTTP server | |
772 | # you have to take in account: |
|
772 | # you have to take in account: | |
773 | # - the version header |
|
773 | # - the version header | |
774 | # - the base85 encoding |
|
774 | # - the base85 encoding | |
775 | _maxpayload = 5300 |
|
775 | _maxpayload = 5300 | |
776 |
|
776 | |||
777 | def _pushkeyescape(markers): |
|
777 | def _pushkeyescape(markers): | |
778 | """encode markers into a dict suitable for pushkey exchange |
|
778 | """encode markers into a dict suitable for pushkey exchange | |
779 |
|
779 | |||
780 | - binary data is base85 encoded |
|
780 | - binary data is base85 encoded | |
781 | - split in chunks smaller than 5300 bytes""" |
|
781 | - split in chunks smaller than 5300 bytes""" | |
782 | keys = {} |
|
782 | keys = {} | |
783 | parts = [] |
|
783 | parts = [] | |
784 | currentlen = _maxpayload * 2 # ensure we create a new part |
|
784 | currentlen = _maxpayload * 2 # ensure we create a new part | |
785 | for marker in markers: |
|
785 | for marker in markers: | |
786 | nextdata = _fm0encodeonemarker(marker) |
|
786 | nextdata = _fm0encodeonemarker(marker) | |
787 | if (len(nextdata) + currentlen > _maxpayload): |
|
787 | if (len(nextdata) + currentlen > _maxpayload): | |
788 | currentpart = [] |
|
788 | currentpart = [] | |
789 | currentlen = 0 |
|
789 | currentlen = 0 | |
790 | parts.append(currentpart) |
|
790 | parts.append(currentpart) | |
791 | currentpart.append(nextdata) |
|
791 | currentpart.append(nextdata) | |
792 | currentlen += len(nextdata) |
|
792 | currentlen += len(nextdata) | |
793 | for idx, part in enumerate(reversed(parts)): |
|
793 | for idx, part in enumerate(reversed(parts)): | |
794 | data = ''.join([_pack('>B', _fm0version)] + part) |
|
794 | data = ''.join([_pack('>B', _fm0version)] + part) | |
795 | keys['dump%i' % idx] = util.b85encode(data) |
|
795 | keys['dump%i' % idx] = util.b85encode(data) | |
796 | return keys |
|
796 | return keys | |
797 |
|
797 | |||
798 | def listmarkers(repo): |
|
798 | def listmarkers(repo): | |
799 | """List markers over pushkey""" |
|
799 | """List markers over pushkey""" | |
800 | if not repo.obsstore: |
|
800 | if not repo.obsstore: | |
801 | return {} |
|
801 | return {} | |
802 | return _pushkeyescape(sorted(repo.obsstore)) |
|
802 | return _pushkeyescape(sorted(repo.obsstore)) | |
803 |
|
803 | |||
804 | def pushmarker(repo, key, old, new): |
|
804 | def pushmarker(repo, key, old, new): | |
805 | """Push markers over pushkey""" |
|
805 | """Push markers over pushkey""" | |
806 | if not key.startswith('dump'): |
|
806 | if not key.startswith('dump'): | |
807 | repo.ui.warn(_('unknown key: %r') % key) |
|
807 | repo.ui.warn(_('unknown key: %r') % key) | |
808 | return False |
|
808 | return False | |
809 | if old: |
|
809 | if old: | |
810 | repo.ui.warn(_('unexpected old value for %r') % key) |
|
810 | repo.ui.warn(_('unexpected old value for %r') % key) | |
811 | return False |
|
811 | return False | |
812 | data = util.b85decode(new) |
|
812 | data = util.b85decode(new) | |
813 | lock = repo.lock() |
|
813 | lock = repo.lock() | |
814 | try: |
|
814 | try: | |
815 | tr = repo.transaction('pushkey: obsolete markers') |
|
815 | tr = repo.transaction('pushkey: obsolete markers') | |
816 | try: |
|
816 | try: | |
817 | repo.obsstore.mergemarkers(tr, data) |
|
817 | repo.obsstore.mergemarkers(tr, data) | |
818 | repo.invalidatevolatilesets() |
|
818 | repo.invalidatevolatilesets() | |
819 | tr.close() |
|
819 | tr.close() | |
820 | return True |
|
820 | return True | |
821 | finally: |
|
821 | finally: | |
822 | tr.release() |
|
822 | tr.release() | |
823 | finally: |
|
823 | finally: | |
824 | lock.release() |
|
824 | lock.release() | |
825 |
|
825 | |||
826 | # keep compatibility for the 4.3 cycle |
|
826 | # keep compatibility for the 4.3 cycle | |
827 | def allprecursors(obsstore, nodes, ignoreflags=0): |
|
827 | def allprecursors(obsstore, nodes, ignoreflags=0): | |
828 | movemsg = 'obsolete.allprecursors moved to obsutil.allprecursors' |
|
828 | movemsg = 'obsolete.allprecursors moved to obsutil.allprecursors' | |
829 | util.nouideprecwarn(movemsg, '4.3') |
|
829 | util.nouideprecwarn(movemsg, '4.3') | |
830 | return obsutil.allprecursors(obsstore, nodes, ignoreflags) |
|
830 | return obsutil.allprecursors(obsstore, nodes, ignoreflags) | |
831 |
|
831 | |||
832 | def allsuccessors(obsstore, nodes, ignoreflags=0): |
|
832 | def allsuccessors(obsstore, nodes, ignoreflags=0): | |
833 | movemsg = 'obsolete.allsuccessors moved to obsutil.allsuccessors' |
|
833 | movemsg = 'obsolete.allsuccessors moved to obsutil.allsuccessors' | |
834 | util.nouideprecwarn(movemsg, '4.3') |
|
834 | util.nouideprecwarn(movemsg, '4.3') | |
835 | return obsutil.allsuccessors(obsstore, nodes, ignoreflags) |
|
835 | return obsutil.allsuccessors(obsstore, nodes, ignoreflags) | |
836 |
|
836 | |||
837 | def marker(repo, data): |
|
837 | def marker(repo, data): | |
838 | movemsg = 'obsolete.marker moved to obsutil.marker' |
|
838 | movemsg = 'obsolete.marker moved to obsutil.marker' | |
839 | repo.ui.deprecwarn(movemsg, '4.3') |
|
839 | repo.ui.deprecwarn(movemsg, '4.3') | |
840 | return obsutil.marker(repo, data) |
|
840 | return obsutil.marker(repo, data) | |
841 |
|
841 | |||
842 | def getmarkers(repo, nodes=None, exclusive=False): |
|
842 | def getmarkers(repo, nodes=None, exclusive=False): | |
843 | movemsg = 'obsolete.getmarkers moved to obsutil.getmarkers' |
|
843 | movemsg = 'obsolete.getmarkers moved to obsutil.getmarkers' | |
844 | repo.ui.deprecwarn(movemsg, '4.3') |
|
844 | repo.ui.deprecwarn(movemsg, '4.3') | |
845 | return obsutil.getmarkers(repo, nodes=nodes, exclusive=exclusive) |
|
845 | return obsutil.getmarkers(repo, nodes=nodes, exclusive=exclusive) | |
846 |
|
846 | |||
847 | def exclusivemarkers(repo, nodes): |
|
847 | def exclusivemarkers(repo, nodes): | |
848 | movemsg = 'obsolete.exclusivemarkers moved to obsutil.exclusivemarkers' |
|
848 | movemsg = 'obsolete.exclusivemarkers moved to obsutil.exclusivemarkers' | |
849 | repo.ui.deprecwarn(movemsg, '4.3') |
|
849 | repo.ui.deprecwarn(movemsg, '4.3') | |
850 | return obsutil.exclusivemarkers(repo, nodes) |
|
850 | return obsutil.exclusivemarkers(repo, nodes) | |
851 |
|
851 | |||
852 | def foreground(repo, nodes): |
|
852 | def foreground(repo, nodes): | |
853 | movemsg = 'obsolete.foreground moved to obsutil.foreground' |
|
853 | movemsg = 'obsolete.foreground moved to obsutil.foreground' | |
854 | repo.ui.deprecwarn(movemsg, '4.3') |
|
854 | repo.ui.deprecwarn(movemsg, '4.3') | |
855 | return obsutil.foreground(repo, nodes) |
|
855 | return obsutil.foreground(repo, nodes) | |
856 |
|
856 | |||
857 | def successorssets(repo, initialnode, cache=None): |
|
857 | def successorssets(repo, initialnode, cache=None): | |
858 | movemsg = 'obsolete.successorssets moved to obsutil.successorssets' |
|
858 | movemsg = 'obsolete.successorssets moved to obsutil.successorssets' | |
859 | repo.ui.deprecwarn(movemsg, '4.3') |
|
859 | repo.ui.deprecwarn(movemsg, '4.3') | |
860 | return obsutil.successorssets(repo, initialnode, cache=cache) |
|
860 | return obsutil.successorssets(repo, initialnode, cache=cache) | |
861 |
|
861 | |||
862 | # mapping of 'set-name' -> <function to compute this set> |
|
862 | # mapping of 'set-name' -> <function to compute this set> | |
863 | cachefuncs = {} |
|
863 | cachefuncs = {} | |
864 | def cachefor(name): |
|
864 | def cachefor(name): | |
865 | """Decorator to register a function as computing the cache for a set""" |
|
865 | """Decorator to register a function as computing the cache for a set""" | |
866 | def decorator(func): |
|
866 | def decorator(func): | |
867 | if name in cachefuncs: |
|
867 | if name in cachefuncs: | |
868 | msg = "duplicated registration for volatileset '%s' (existing: %r)" |
|
868 | msg = "duplicated registration for volatileset '%s' (existing: %r)" | |
869 | raise error.ProgrammingError(msg % (name, cachefuncs[name])) |
|
869 | raise error.ProgrammingError(msg % (name, cachefuncs[name])) | |
870 | cachefuncs[name] = func |
|
870 | cachefuncs[name] = func | |
871 | return func |
|
871 | return func | |
872 | return decorator |
|
872 | return decorator | |
873 |
|
873 | |||
874 | def getrevs(repo, name): |
|
874 | def getrevs(repo, name): | |
875 | """Return the set of revision that belong to the <name> set |
|
875 | """Return the set of revision that belong to the <name> set | |
876 |
|
876 | |||
877 | Such access may compute the set and cache it for future use""" |
|
877 | Such access may compute the set and cache it for future use""" | |
878 | repo = repo.unfiltered() |
|
878 | repo = repo.unfiltered() | |
879 | if not repo.obsstore: |
|
879 | if not repo.obsstore: | |
880 | return frozenset() |
|
880 | return frozenset() | |
881 | if name not in repo.obsstore.caches: |
|
881 | if name not in repo.obsstore.caches: | |
882 | repo.obsstore.caches[name] = cachefuncs[name](repo) |
|
882 | repo.obsstore.caches[name] = cachefuncs[name](repo) | |
883 | return repo.obsstore.caches[name] |
|
883 | return repo.obsstore.caches[name] | |
884 |
|
884 | |||
885 | # To be simple we need to invalidate obsolescence cache when: |
|
885 | # To be simple we need to invalidate obsolescence cache when: | |
886 | # |
|
886 | # | |
887 | # - new changeset is added: |
|
887 | # - new changeset is added: | |
888 | # - public phase is changed |
|
888 | # - public phase is changed | |
889 | # - obsolescence marker are added |
|
889 | # - obsolescence marker are added | |
890 | # - strip is used a repo |
|
890 | # - strip is used a repo | |
891 | def clearobscaches(repo): |
|
891 | def clearobscaches(repo): | |
892 | """Remove all obsolescence related cache from a repo |
|
892 | """Remove all obsolescence related cache from a repo | |
893 |
|
893 | |||
894 | This remove all cache in obsstore is the obsstore already exist on the |
|
894 | This remove all cache in obsstore is the obsstore already exist on the | |
895 | repo. |
|
895 | repo. | |
896 |
|
896 | |||
897 | (We could be smarter here given the exact event that trigger the cache |
|
897 | (We could be smarter here given the exact event that trigger the cache | |
898 | clearing)""" |
|
898 | clearing)""" | |
899 | # only clear cache is there is obsstore data in this repo |
|
899 | # only clear cache is there is obsstore data in this repo | |
900 | if 'obsstore' in repo._filecache: |
|
900 | if 'obsstore' in repo._filecache: | |
901 | repo.obsstore.caches.clear() |
|
901 | repo.obsstore.caches.clear() | |
902 |
|
902 | |||
903 | def _mutablerevs(repo): |
|
903 | def _mutablerevs(repo): | |
904 | """the set of mutable revision in the repository""" |
|
904 | """the set of mutable revision in the repository""" | |
905 | return repo._phasecache.getrevset(repo, (phases.draft, phases.secret)) |
|
905 | return repo._phasecache.getrevset(repo, (phases.draft, phases.secret)) | |
906 |
|
906 | |||
907 | @cachefor('obsolete') |
|
907 | @cachefor('obsolete') | |
908 | def _computeobsoleteset(repo): |
|
908 | def _computeobsoleteset(repo): | |
909 | """the set of obsolete revisions""" |
|
909 | """the set of obsolete revisions""" | |
910 | getnode = repo.changelog.node |
|
910 | getnode = repo.changelog.node | |
911 | notpublic = _mutablerevs(repo) |
|
911 | notpublic = _mutablerevs(repo) | |
912 | isobs = repo.obsstore.successors.__contains__ |
|
912 | isobs = repo.obsstore.successors.__contains__ | |
913 | obs = set(r for r in notpublic if isobs(getnode(r))) |
|
913 | obs = set(r for r in notpublic if isobs(getnode(r))) | |
914 | return obs |
|
914 | return obs | |
915 |
|
915 | |||
916 | @cachefor('unstable') |
|
916 | @cachefor('unstable') | |
917 | def _computeunstableset(repo): |
|
917 | def _computeunstableset(repo): | |
918 | msg = ("'unstable' volatile set is deprecated, " |
|
918 | msg = ("'unstable' volatile set is deprecated, " | |
919 | "use 'orphan'") |
|
919 | "use 'orphan'") | |
920 | repo.ui.deprecwarn(msg, '4.4') |
|
920 | repo.ui.deprecwarn(msg, '4.4') | |
921 |
|
921 | |||
922 | return _computeorphanset(repo) |
|
922 | return _computeorphanset(repo) | |
923 |
|
923 | |||
924 | @cachefor('orphan') |
|
924 | @cachefor('orphan') | |
925 | def _computeorphanset(repo): |
|
925 | def _computeorphanset(repo): | |
926 | """the set of non obsolete revisions with obsolete parents""" |
|
926 | """the set of non obsolete revisions with obsolete parents""" | |
927 | pfunc = repo.changelog.parentrevs |
|
927 | pfunc = repo.changelog.parentrevs | |
928 | mutable = _mutablerevs(repo) |
|
928 | mutable = _mutablerevs(repo) | |
929 | obsolete = getrevs(repo, 'obsolete') |
|
929 | obsolete = getrevs(repo, 'obsolete') | |
930 | others = mutable - obsolete |
|
930 | others = mutable - obsolete | |
931 | unstable = set() |
|
931 | unstable = set() | |
932 | for r in sorted(others): |
|
932 | for r in sorted(others): | |
933 | # A rev is unstable if one of its parent is obsolete or unstable |
|
933 | # A rev is unstable if one of its parent is obsolete or unstable | |
934 | # this works since we traverse following growing rev order |
|
934 | # this works since we traverse following growing rev order | |
935 | for p in pfunc(r): |
|
935 | for p in pfunc(r): | |
936 | if p in obsolete or p in unstable: |
|
936 | if p in obsolete or p in unstable: | |
937 | unstable.add(r) |
|
937 | unstable.add(r) | |
938 | break |
|
938 | break | |
939 | return unstable |
|
939 | return unstable | |
940 |
|
940 | |||
941 | @cachefor('suspended') |
|
941 | @cachefor('suspended') | |
942 | def _computesuspendedset(repo): |
|
942 | def _computesuspendedset(repo): | |
943 | """the set of obsolete parents with non obsolete descendants""" |
|
943 | """the set of obsolete parents with non obsolete descendants""" | |
944 | suspended = repo.changelog.ancestors(getrevs(repo, 'orphan')) |
|
944 | suspended = repo.changelog.ancestors(getrevs(repo, 'orphan')) | |
945 | return set(r for r in getrevs(repo, 'obsolete') if r in suspended) |
|
945 | return set(r for r in getrevs(repo, 'obsolete') if r in suspended) | |
946 |
|
946 | |||
947 | @cachefor('extinct') |
|
947 | @cachefor('extinct') | |
948 | def _computeextinctset(repo): |
|
948 | def _computeextinctset(repo): | |
949 | """the set of obsolete parents without non obsolete descendants""" |
|
949 | """the set of obsolete parents without non obsolete descendants""" | |
950 | return getrevs(repo, 'obsolete') - getrevs(repo, 'suspended') |
|
950 | return getrevs(repo, 'obsolete') - getrevs(repo, 'suspended') | |
951 |
|
951 | |||
952 | @cachefor('bumped') |
|
952 | @cachefor('bumped') | |
953 | def _computebumpedset(repo): |
|
953 | def _computebumpedset(repo): | |
954 | msg = ("'bumped' volatile set is deprecated, " |
|
954 | msg = ("'bumped' volatile set is deprecated, " | |
955 | "use 'phasedivergent'") |
|
955 | "use 'phasedivergent'") | |
956 | repo.ui.deprecwarn(msg, '4.4') |
|
956 | repo.ui.deprecwarn(msg, '4.4') | |
957 |
|
957 | |||
958 | return _computephasedivergentset(repo) |
|
958 | return _computephasedivergentset(repo) | |
959 |
|
959 | |||
960 | @cachefor('phasedivergent') |
|
960 | @cachefor('phasedivergent') | |
961 | def _computephasedivergentset(repo): |
|
961 | def _computephasedivergentset(repo): | |
962 | """the set of revs trying to obsolete public revisions""" |
|
962 | """the set of revs trying to obsolete public revisions""" | |
963 | bumped = set() |
|
963 | bumped = set() | |
964 | # util function (avoid attribute lookup in the loop) |
|
964 | # util function (avoid attribute lookup in the loop) | |
965 | phase = repo._phasecache.phase # would be faster to grab the full list |
|
965 | phase = repo._phasecache.phase # would be faster to grab the full list | |
966 | public = phases.public |
|
966 | public = phases.public | |
967 | cl = repo.changelog |
|
967 | cl = repo.changelog | |
968 | torev = cl.nodemap.get |
|
968 | torev = cl.nodemap.get | |
969 | for ctx in repo.set('(not public()) and (not obsolete())'): |
|
969 | for ctx in repo.set('(not public()) and (not obsolete())'): | |
970 | rev = ctx.rev() |
|
970 | rev = ctx.rev() | |
971 | # We only evaluate mutable, non-obsolete revision |
|
971 | # We only evaluate mutable, non-obsolete revision | |
972 | node = ctx.node() |
|
972 | node = ctx.node() | |
973 | # (future) A cache of predecessors may worth if split is very common |
|
973 | # (future) A cache of predecessors may worth if split is very common | |
974 | for pnode in obsutil.allpredecessors(repo.obsstore, [node], |
|
974 | for pnode in obsutil.allpredecessors(repo.obsstore, [node], | |
975 | ignoreflags=bumpedfix): |
|
975 | ignoreflags=bumpedfix): | |
976 | prev = torev(pnode) # unfiltered! but so is phasecache |
|
976 | prev = torev(pnode) # unfiltered! but so is phasecache | |
977 | if (prev is not None) and (phase(repo, prev) <= public): |
|
977 | if (prev is not None) and (phase(repo, prev) <= public): | |
978 | # we have a public predecessor |
|
978 | # we have a public predecessor | |
979 | bumped.add(rev) |
|
979 | bumped.add(rev) | |
980 | break # Next draft! |
|
980 | break # Next draft! | |
981 | return bumped |
|
981 | return bumped | |
982 |
|
982 | |||
983 | @cachefor('divergent') |
|
983 | @cachefor('divergent') | |
984 | def _computedivergentset(repo): |
|
984 | def _computedivergentset(repo): | |
985 | msg = ("'divergent' volatile set is deprecated, " |
|
985 | msg = ("'divergent' volatile set is deprecated, " | |
986 | "use 'contentdivergent'") |
|
986 | "use 'contentdivergent'") | |
987 | repo.ui.deprecwarn(msg, '4.4') |
|
987 | repo.ui.deprecwarn(msg, '4.4') | |
988 |
|
988 | |||
989 | return _computecontentdivergentset(repo) |
|
989 | return _computecontentdivergentset(repo) | |
990 |
|
990 | |||
991 | @cachefor('contentdivergent') |
|
991 | @cachefor('contentdivergent') | |
992 | def _computecontentdivergentset(repo): |
|
992 | def _computecontentdivergentset(repo): | |
993 | """the set of rev that compete to be the final successors of some revision. |
|
993 | """the set of rev that compete to be the final successors of some revision. | |
994 | """ |
|
994 | """ | |
995 | divergent = set() |
|
995 | divergent = set() | |
996 | obsstore = repo.obsstore |
|
996 | obsstore = repo.obsstore | |
997 | newermap = {} |
|
997 | newermap = {} | |
998 | for ctx in repo.set('(not public()) - obsolete()'): |
|
998 | for ctx in repo.set('(not public()) - obsolete()'): | |
999 | mark = obsstore.predecessors.get(ctx.node(), ()) |
|
999 | mark = obsstore.predecessors.get(ctx.node(), ()) | |
1000 | toprocess = set(mark) |
|
1000 | toprocess = set(mark) | |
1001 | seen = set() |
|
1001 | seen = set() | |
1002 | while toprocess: |
|
1002 | while toprocess: | |
1003 | prec = toprocess.pop()[0] |
|
1003 | prec = toprocess.pop()[0] | |
1004 | if prec in seen: |
|
1004 | if prec in seen: | |
1005 | continue # emergency cycle hanging prevention |
|
1005 | continue # emergency cycle hanging prevention | |
1006 | seen.add(prec) |
|
1006 | seen.add(prec) | |
1007 | if prec not in newermap: |
|
1007 | if prec not in newermap: | |
1008 | obsutil.successorssets(repo, prec, cache=newermap) |
|
1008 | obsutil.successorssets(repo, prec, cache=newermap) | |
1009 | newer = [n for n in newermap[prec] if n] |
|
1009 | newer = [n for n in newermap[prec] if n] | |
1010 | if len(newer) > 1: |
|
1010 | if len(newer) > 1: | |
1011 | divergent.add(ctx.rev()) |
|
1011 | divergent.add(ctx.rev()) | |
1012 | break |
|
1012 | break | |
1013 | toprocess.update(obsstore.predecessors.get(prec, ())) |
|
1013 | toprocess.update(obsstore.predecessors.get(prec, ())) | |
1014 | return divergent |
|
1014 | return divergent | |
1015 |
|
1015 | |||
1016 |
|
1016 | |||
1017 | def createmarkers(repo, relations, flag=0, date=None, metadata=None, |
|
1017 | def createmarkers(repo, relations, flag=0, date=None, metadata=None, | |
1018 | operation=None): |
|
1018 | operation=None): | |
1019 | """Add obsolete markers between changesets in a repo |
|
1019 | """Add obsolete markers between changesets in a repo | |
1020 |
|
1020 | |||
1021 | <relations> must be an iterable of (<old>, (<new>, ...)[,{metadata}]) |
|
1021 | <relations> must be an iterable of (<old>, (<new>, ...)[,{metadata}]) | |
1022 | tuple. `old` and `news` are changectx. metadata is an optional dictionary |
|
1022 | tuple. `old` and `news` are changectx. metadata is an optional dictionary | |
1023 | containing metadata for this marker only. It is merged with the global |
|
1023 | containing metadata for this marker only. It is merged with the global | |
1024 | metadata specified through the `metadata` argument of this function, |
|
1024 | metadata specified through the `metadata` argument of this function, | |
1025 |
|
1025 | |||
1026 | Trying to obsolete a public changeset will raise an exception. |
|
1026 | Trying to obsolete a public changeset will raise an exception. | |
1027 |
|
1027 | |||
1028 | Current user and date are used except if specified otherwise in the |
|
1028 | Current user and date are used except if specified otherwise in the | |
1029 | metadata attribute. |
|
1029 | metadata attribute. | |
1030 |
|
1030 | |||
1031 | This function operates within a transaction of its own, but does |
|
1031 | This function operates within a transaction of its own, but does | |
1032 | not take any lock on the repo. |
|
1032 | not take any lock on the repo. | |
1033 | """ |
|
1033 | """ | |
1034 | # prepare metadata |
|
1034 | # prepare metadata | |
1035 | if metadata is None: |
|
1035 | if metadata is None: | |
1036 | metadata = {} |
|
1036 | metadata = {} | |
1037 | if 'user' not in metadata: |
|
1037 | if 'user' not in metadata: | |
|
1038 | develuser = repo.ui.config('devel', 'user.obsmarker') | |||
|
1039 | if develuser: | |||
|
1040 | metadata['user'] = develuser | |||
|
1041 | else: | |||
1038 | metadata['user'] = repo.ui.username() |
|
1042 | metadata['user'] = repo.ui.username() | |
1039 |
|
1043 | |||
1040 | # Operation metadata handling |
|
1044 | # Operation metadata handling | |
1041 | useoperation = repo.ui.configbool('experimental', |
|
1045 | useoperation = repo.ui.configbool('experimental', | |
1042 | 'stabilization.track-operation') |
|
1046 | 'stabilization.track-operation') | |
1043 | if useoperation and operation: |
|
1047 | if useoperation and operation: | |
1044 | metadata['operation'] = operation |
|
1048 | metadata['operation'] = operation | |
1045 |
|
1049 | |||
1046 | # Effect flag metadata handling |
|
1050 | # Effect flag metadata handling | |
1047 | saveeffectflag = repo.ui.configbool('experimental', |
|
1051 | saveeffectflag = repo.ui.configbool('experimental', | |
1048 | 'effect-flags', |
|
1052 | 'effect-flags', | |
1049 | False) |
|
1053 | False) | |
1050 |
|
1054 | |||
1051 | tr = repo.transaction('add-obsolescence-marker') |
|
1055 | tr = repo.transaction('add-obsolescence-marker') | |
1052 | try: |
|
1056 | try: | |
1053 | markerargs = [] |
|
1057 | markerargs = [] | |
1054 | for rel in relations: |
|
1058 | for rel in relations: | |
1055 | prec = rel[0] |
|
1059 | prec = rel[0] | |
1056 | sucs = rel[1] |
|
1060 | sucs = rel[1] | |
1057 | localmetadata = metadata.copy() |
|
1061 | localmetadata = metadata.copy() | |
1058 | if 2 < len(rel): |
|
1062 | if 2 < len(rel): | |
1059 | localmetadata.update(rel[2]) |
|
1063 | localmetadata.update(rel[2]) | |
1060 |
|
1064 | |||
1061 | if not prec.mutable(): |
|
1065 | if not prec.mutable(): | |
1062 | raise error.Abort(_("cannot obsolete public changeset: %s") |
|
1066 | raise error.Abort(_("cannot obsolete public changeset: %s") | |
1063 | % prec, |
|
1067 | % prec, | |
1064 | hint="see 'hg help phases' for details") |
|
1068 | hint="see 'hg help phases' for details") | |
1065 | nprec = prec.node() |
|
1069 | nprec = prec.node() | |
1066 | nsucs = tuple(s.node() for s in sucs) |
|
1070 | nsucs = tuple(s.node() for s in sucs) | |
1067 | npare = None |
|
1071 | npare = None | |
1068 | if not nsucs: |
|
1072 | if not nsucs: | |
1069 | npare = tuple(p.node() for p in prec.parents()) |
|
1073 | npare = tuple(p.node() for p in prec.parents()) | |
1070 | if nprec in nsucs: |
|
1074 | if nprec in nsucs: | |
1071 | raise error.Abort(_("changeset %s cannot obsolete itself") |
|
1075 | raise error.Abort(_("changeset %s cannot obsolete itself") | |
1072 | % prec) |
|
1076 | % prec) | |
1073 |
|
1077 | |||
1074 | # Effect flag can be different by relation |
|
1078 | # Effect flag can be different by relation | |
1075 | if saveeffectflag: |
|
1079 | if saveeffectflag: | |
1076 | # The effect flag is saved in a versioned field name for future |
|
1080 | # The effect flag is saved in a versioned field name for future | |
1077 | # evolution |
|
1081 | # evolution | |
1078 | effectflag = obsutil.geteffectflag(rel) |
|
1082 | effectflag = obsutil.geteffectflag(rel) | |
1079 | localmetadata[obsutil.EFFECTFLAGFIELD] = "%d" % effectflag |
|
1083 | localmetadata[obsutil.EFFECTFLAGFIELD] = "%d" % effectflag | |
1080 |
|
1084 | |||
1081 | # Creating the marker causes the hidden cache to become invalid, |
|
1085 | # Creating the marker causes the hidden cache to become invalid, | |
1082 | # which causes recomputation when we ask for prec.parents() above. |
|
1086 | # which causes recomputation when we ask for prec.parents() above. | |
1083 | # Resulting in n^2 behavior. So let's prepare all of the args |
|
1087 | # Resulting in n^2 behavior. So let's prepare all of the args | |
1084 | # first, then create the markers. |
|
1088 | # first, then create the markers. | |
1085 | markerargs.append((nprec, nsucs, npare, localmetadata)) |
|
1089 | markerargs.append((nprec, nsucs, npare, localmetadata)) | |
1086 |
|
1090 | |||
1087 | for args in markerargs: |
|
1091 | for args in markerargs: | |
1088 | nprec, nsucs, npare, localmetadata = args |
|
1092 | nprec, nsucs, npare, localmetadata = args | |
1089 | repo.obsstore.create(tr, nprec, nsucs, flag, parents=npare, |
|
1093 | repo.obsstore.create(tr, nprec, nsucs, flag, parents=npare, | |
1090 | date=date, metadata=localmetadata, |
|
1094 | date=date, metadata=localmetadata, | |
1091 | ui=repo.ui) |
|
1095 | ui=repo.ui) | |
1092 | repo.filteredrevcache.clear() |
|
1096 | repo.filteredrevcache.clear() | |
1093 | tr.close() |
|
1097 | tr.close() | |
1094 | finally: |
|
1098 | finally: | |
1095 | tr.release() |
|
1099 | tr.release() |
@@ -1,1766 +1,1766 b'' | |||||
1 | This test file test the various templates related to obsmarkers. |
|
1 | This test file test the various templates related to obsmarkers. | |
2 |
|
2 | |||
3 | Global setup |
|
3 | Global setup | |
4 | ============ |
|
4 | ============ | |
5 |
|
5 | |||
6 | $ . $TESTDIR/testlib/obsmarker-common.sh |
|
6 | $ . $TESTDIR/testlib/obsmarker-common.sh | |
7 | $ cat >> $HGRCPATH <<EOF |
|
7 | $ cat >> $HGRCPATH <<EOF | |
8 | > [ui] |
|
8 | > [ui] | |
9 | > interactive = true |
|
9 | > interactive = true | |
10 | > [phases] |
|
10 | > [phases] | |
11 | > publish=False |
|
11 | > publish=False | |
12 | > [experimental] |
|
12 | > [experimental] | |
13 | > stabilization=all |
|
13 | > stabilization=all | |
14 | > [templates] |
|
14 | > [templates] | |
15 | > obsfatesuccessors = "{if(successors, " as ")}{join(successors, ", ")}" |
|
15 | > obsfatesuccessors = "{if(successors, " as ")}{join(successors, ", ")}" | |
16 | > obsfateverb = "{obsfateverb(successors)}" |
|
16 | > obsfateverb = "{obsfateverb(successors)}" | |
17 | > obsfateoperations = "{if(obsfateoperations(markers), " using {join(obsfateoperations(markers), ", ")}")}" |
|
17 | > obsfateoperations = "{if(obsfateoperations(markers), " using {join(obsfateoperations(markers), ", ")}")}" | |
18 | > obsfateusers = "{if(obsfateusers(markers), " by {join(obsfateusers(markers), ", ")}")}" |
|
18 | > obsfateusers = "{if(obsfateusers(markers), " by {join(obsfateusers(markers), ", ")}")}" | |
19 | > obsfatedate = "{if(obsfatedate(markers), "{ifeq(min(obsfatedate(markers)), max(obsfatedate(markers)), " (at {min(obsfatedate(markers))|isodate})", " (between {min(obsfatedate(markers))|isodate} and {max(obsfatedate(markers))|isodate})")}")}" |
|
19 | > obsfatedate = "{if(obsfatedate(markers), "{ifeq(min(obsfatedate(markers)), max(obsfatedate(markers)), " (at {min(obsfatedate(markers))|isodate})", " (between {min(obsfatedate(markers))|isodate} and {max(obsfatedate(markers))|isodate})")}")}" | |
20 | > obsfate = "{obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}{obsfatedate}; " |
|
20 | > obsfate = "{obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}{obsfatedate}; " | |
21 | > [alias] |
|
21 | > [alias] | |
22 | > tlog = log -G -T '{node|short}\ |
|
22 | > tlog = log -G -T '{node|short}\ | |
23 | > {if(predecessors, "\n Predecessors: {predecessors}")}\ |
|
23 | > {if(predecessors, "\n Predecessors: {predecessors}")}\ | |
24 | > {if(predecessors, "\n semi-colon: {join(predecessors, "; ")}")}\ |
|
24 | > {if(predecessors, "\n semi-colon: {join(predecessors, "; ")}")}\ | |
25 | > {if(predecessors, "\n json: {predecessors|json}")}\ |
|
25 | > {if(predecessors, "\n json: {predecessors|json}")}\ | |
26 | > {if(predecessors, "\n map: {join(predecessors % "{rev}:{node}", " ")}")}\ |
|
26 | > {if(predecessors, "\n map: {join(predecessors % "{rev}:{node}", " ")}")}\ | |
27 | > {if(successorssets, "\n Successors: {successorssets}")}\ |
|
27 | > {if(successorssets, "\n Successors: {successorssets}")}\ | |
28 | > {if(successorssets, "\n multi-line: {join(successorssets, "\n multi-line: ")}")}\ |
|
28 | > {if(successorssets, "\n multi-line: {join(successorssets, "\n multi-line: ")}")}\ | |
29 | > {if(successorssets, "\n json: {successorssets|json}")}\n' |
|
29 | > {if(successorssets, "\n json: {successorssets|json}")}\n' | |
30 | > fatelog = log -G -T '{node|short}\n{if(succsandmarkers, " Obsfate: {succsandmarkers % "{obsfate}"} \n" )}' |
|
30 | > fatelog = log -G -T '{node|short}\n{if(succsandmarkers, " Obsfate: {succsandmarkers % "{obsfate}"} \n" )}' | |
31 | > fatelogjson = log -G -T '{node|short}\n{if(succsandmarkers, " Obsfate: {succsandmarkers|json}\n")}' |
|
31 | > fatelogjson = log -G -T '{node|short}\n{if(succsandmarkers, " Obsfate: {succsandmarkers|json}\n")}' | |
32 | > EOF |
|
32 | > EOF | |
33 |
|
33 | |||
34 | Test templates on amended commit |
|
34 | Test templates on amended commit | |
35 | ================================ |
|
35 | ================================ | |
36 |
|
36 | |||
37 | Test setup |
|
37 | Test setup | |
38 | ---------- |
|
38 | ---------- | |
39 |
|
39 | |||
40 | $ hg init $TESTTMP/templates-local-amend |
|
40 | $ hg init $TESTTMP/templates-local-amend | |
41 | $ cd $TESTTMP/templates-local-amend |
|
41 | $ cd $TESTTMP/templates-local-amend | |
42 | $ mkcommit ROOT |
|
42 | $ mkcommit ROOT | |
43 | $ mkcommit A0 |
|
43 | $ mkcommit A0 | |
44 | $ echo 42 >> A0 |
|
44 | $ echo 42 >> A0 | |
45 |
$ |
|
45 | $ hg commit --amend -m "A1" --config devel.default-date="1234567890 0" --config devel.user.obsmarker=test1 | |
46 |
$ |
|
46 | $ hg commit --amend -m "A2" --config devel.default-date="987654321 0" --config devel.user.obsmarker=test2 | |
47 |
|
47 | |||
48 | $ hg log --hidden -G |
|
48 | $ hg log --hidden -G | |
49 | @ changeset: 3:d004c8f274b9 |
|
49 | @ changeset: 3:d004c8f274b9 | |
50 | | tag: tip |
|
50 | | tag: tip | |
51 | | parent: 0:ea207398892e |
|
51 | | parent: 0:ea207398892e | |
52 | | user: test |
|
52 | | user: test | |
53 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
53 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
54 | | summary: A2 |
|
54 | | summary: A2 | |
55 | | |
|
55 | | | |
56 | | x changeset: 2:a468dc9b3633 |
|
56 | | x changeset: 2:a468dc9b3633 | |
57 | |/ parent: 0:ea207398892e |
|
57 | |/ parent: 0:ea207398892e | |
58 | | user: test |
|
58 | | user: test | |
59 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
59 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
60 | | summary: A1 |
|
60 | | summary: A1 | |
61 | | |
|
61 | | | |
62 | | x changeset: 1:471f378eab4c |
|
62 | | x changeset: 1:471f378eab4c | |
63 | |/ user: test |
|
63 | |/ user: test | |
64 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
64 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
65 | | summary: A0 |
|
65 | | summary: A0 | |
66 | | |
|
66 | | | |
67 | o changeset: 0:ea207398892e |
|
67 | o changeset: 0:ea207398892e | |
68 | user: test |
|
68 | user: test | |
69 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
69 | date: Thu Jan 01 00:00:00 1970 +0000 | |
70 | summary: ROOT |
|
70 | summary: ROOT | |
71 |
|
71 | |||
72 | Check templates |
|
72 | Check templates | |
73 | --------------- |
|
73 | --------------- | |
74 | $ hg up 'desc(A0)' --hidden |
|
74 | $ hg up 'desc(A0)' --hidden | |
75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
76 |
|
76 | |||
77 | Predecessors template should show current revision as it is the working copy |
|
77 | Predecessors template should show current revision as it is the working copy | |
78 | $ hg tlog |
|
78 | $ hg tlog | |
79 | o d004c8f274b9 |
|
79 | o d004c8f274b9 | |
80 | | Predecessors: 1:471f378eab4c |
|
80 | | Predecessors: 1:471f378eab4c | |
81 | | semi-colon: 1:471f378eab4c |
|
81 | | semi-colon: 1:471f378eab4c | |
82 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
82 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
83 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
83 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
84 | | @ 471f378eab4c |
|
84 | | @ 471f378eab4c | |
85 | |/ Successors: 3:d004c8f274b9 |
|
85 | |/ Successors: 3:d004c8f274b9 | |
86 | | multi-line: 3:d004c8f274b9 |
|
86 | | multi-line: 3:d004c8f274b9 | |
87 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
87 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] | |
88 | o ea207398892e |
|
88 | o ea207398892e | |
89 |
|
89 | |||
90 | $ hg fatelog -q --traceback |
|
90 | $ hg fatelog -q --traceback | |
91 | o d004c8f274b9 |
|
91 | o d004c8f274b9 | |
92 | | |
|
92 | | | |
93 | | @ 471f378eab4c |
|
93 | | @ 471f378eab4c | |
94 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); |
|
94 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
95 | o ea207398892e |
|
95 | o ea207398892e | |
96 |
|
96 | |||
97 | $ hg fatelog |
|
97 | $ hg fatelog | |
98 | o d004c8f274b9 |
|
98 | o d004c8f274b9 | |
99 | | |
|
99 | | | |
100 | | @ 471f378eab4c |
|
100 | | @ 471f378eab4c | |
101 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); |
|
101 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
102 | o ea207398892e |
|
102 | o ea207398892e | |
103 |
|
103 | |||
104 | $ hg fatelog -v |
|
104 | $ hg fatelog -v | |
105 | o d004c8f274b9 |
|
105 | o d004c8f274b9 | |
106 | | |
|
106 | | | |
107 | | @ 471f378eab4c |
|
107 | | @ 471f378eab4c | |
108 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); |
|
108 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test1, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000); | |
109 | o ea207398892e |
|
109 | o ea207398892e | |
110 |
|
110 | |||
111 | $ hg up 'desc(A1)' --hidden |
|
111 | $ hg up 'desc(A1)' --hidden | |
112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
113 |
|
113 | |||
114 | Predecessors template should show current revision as it is the working copy |
|
114 | Predecessors template should show current revision as it is the working copy | |
115 | $ hg tlog |
|
115 | $ hg tlog | |
116 | o d004c8f274b9 |
|
116 | o d004c8f274b9 | |
117 | | Predecessors: 2:a468dc9b3633 |
|
117 | | Predecessors: 2:a468dc9b3633 | |
118 | | semi-colon: 2:a468dc9b3633 |
|
118 | | semi-colon: 2:a468dc9b3633 | |
119 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
119 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] | |
120 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad |
|
120 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
121 | | @ a468dc9b3633 |
|
121 | | @ a468dc9b3633 | |
122 | |/ Successors: 3:d004c8f274b9 |
|
122 | |/ Successors: 3:d004c8f274b9 | |
123 | | multi-line: 3:d004c8f274b9 |
|
123 | | multi-line: 3:d004c8f274b9 | |
124 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
124 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] | |
125 | o ea207398892e |
|
125 | o ea207398892e | |
126 |
|
126 | |||
127 | $ hg fatelog -v |
|
127 | $ hg fatelog -v | |
128 | o d004c8f274b9 |
|
128 | o d004c8f274b9 | |
129 | | |
|
129 | | | |
130 | | @ a468dc9b3633 |
|
130 | | @ a468dc9b3633 | |
131 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); |
|
131 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
132 | o ea207398892e |
|
132 | o ea207398892e | |
133 |
|
133 | |||
134 | Predecessors template should show all the predecessors as we force their display |
|
134 | Predecessors template should show all the predecessors as we force their display | |
135 | with --hidden |
|
135 | with --hidden | |
136 | $ hg tlog --hidden |
|
136 | $ hg tlog --hidden | |
137 | o d004c8f274b9 |
|
137 | o d004c8f274b9 | |
138 | | Predecessors: 2:a468dc9b3633 |
|
138 | | Predecessors: 2:a468dc9b3633 | |
139 | | semi-colon: 2:a468dc9b3633 |
|
139 | | semi-colon: 2:a468dc9b3633 | |
140 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
140 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] | |
141 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad |
|
141 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
142 | | @ a468dc9b3633 |
|
142 | | @ a468dc9b3633 | |
143 | |/ Predecessors: 1:471f378eab4c |
|
143 | |/ Predecessors: 1:471f378eab4c | |
144 | | semi-colon: 1:471f378eab4c |
|
144 | | semi-colon: 1:471f378eab4c | |
145 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
145 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
146 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
146 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
147 | | Successors: 3:d004c8f274b9 |
|
147 | | Successors: 3:d004c8f274b9 | |
148 | | multi-line: 3:d004c8f274b9 |
|
148 | | multi-line: 3:d004c8f274b9 | |
149 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
149 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] | |
150 | | x 471f378eab4c |
|
150 | | x 471f378eab4c | |
151 | |/ Successors: 2:a468dc9b3633 |
|
151 | |/ Successors: 2:a468dc9b3633 | |
152 | | multi-line: 2:a468dc9b3633 |
|
152 | | multi-line: 2:a468dc9b3633 | |
153 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] |
|
153 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] | |
154 | o ea207398892e |
|
154 | o ea207398892e | |
155 |
|
155 | |||
156 | $ hg fatelog --hidden -q |
|
156 | $ hg fatelog --hidden -q | |
157 | o d004c8f274b9 |
|
157 | o d004c8f274b9 | |
158 | | |
|
158 | | | |
159 | | @ a468dc9b3633 |
|
159 | | @ a468dc9b3633 | |
160 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); |
|
160 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
161 | | x 471f378eab4c |
|
161 | | x 471f378eab4c | |
162 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test1 (at 2009-02-13 23:31 +0000); |
|
162 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test1 (at 2009-02-13 23:31 +0000); | |
163 | o ea207398892e |
|
163 | o ea207398892e | |
164 |
|
164 | |||
165 |
|
165 | |||
166 | Predecessors template shouldn't show anything as all obsolete commit are not |
|
166 | Predecessors template shouldn't show anything as all obsolete commit are not | |
167 | visible. |
|
167 | visible. | |
168 | $ hg up 'desc(A2)' |
|
168 | $ hg up 'desc(A2)' | |
169 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
169 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
170 | $ hg tlog |
|
170 | $ hg tlog | |
171 | @ d004c8f274b9 |
|
171 | @ d004c8f274b9 | |
172 | | |
|
172 | | | |
173 | o ea207398892e |
|
173 | o ea207398892e | |
174 |
|
174 | |||
175 | $ hg tlog --hidden |
|
175 | $ hg tlog --hidden | |
176 | @ d004c8f274b9 |
|
176 | @ d004c8f274b9 | |
177 | | Predecessors: 2:a468dc9b3633 |
|
177 | | Predecessors: 2:a468dc9b3633 | |
178 | | semi-colon: 2:a468dc9b3633 |
|
178 | | semi-colon: 2:a468dc9b3633 | |
179 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] |
|
179 | | json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"] | |
180 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad |
|
180 | | map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad | |
181 | | x a468dc9b3633 |
|
181 | | x a468dc9b3633 | |
182 | |/ Predecessors: 1:471f378eab4c |
|
182 | |/ Predecessors: 1:471f378eab4c | |
183 | | semi-colon: 1:471f378eab4c |
|
183 | | semi-colon: 1:471f378eab4c | |
184 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
184 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
185 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
185 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
186 | | Successors: 3:d004c8f274b9 |
|
186 | | Successors: 3:d004c8f274b9 | |
187 | | multi-line: 3:d004c8f274b9 |
|
187 | | multi-line: 3:d004c8f274b9 | |
188 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] |
|
188 | | json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]] | |
189 | | x 471f378eab4c |
|
189 | | x 471f378eab4c | |
190 | |/ Successors: 2:a468dc9b3633 |
|
190 | |/ Successors: 2:a468dc9b3633 | |
191 | | multi-line: 2:a468dc9b3633 |
|
191 | | multi-line: 2:a468dc9b3633 | |
192 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] |
|
192 | | json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]] | |
193 | o ea207398892e |
|
193 | o ea207398892e | |
194 |
|
194 | |||
195 | $ hg fatelog -v |
|
195 | $ hg fatelog -v | |
196 | @ d004c8f274b9 |
|
196 | @ d004c8f274b9 | |
197 | | |
|
197 | | | |
198 | o ea207398892e |
|
198 | o ea207398892e | |
199 |
|
199 | |||
200 |
|
200 | |||
201 | $ hg fatelog -v --hidden |
|
201 | $ hg fatelog -v --hidden | |
202 | @ d004c8f274b9 |
|
202 | @ d004c8f274b9 | |
203 | | |
|
203 | | | |
204 | | x a468dc9b3633 |
|
204 | | x a468dc9b3633 | |
205 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); |
|
205 | |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000); | |
206 | | x 471f378eab4c |
|
206 | | x 471f378eab4c | |
207 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test1 (at 2009-02-13 23:31 +0000); |
|
207 | |/ Obsfate: rewritten using amend as 2:a468dc9b3633 by test1 (at 2009-02-13 23:31 +0000); | |
208 | o ea207398892e |
|
208 | o ea207398892e | |
209 |
|
209 | |||
210 | $ hg fatelogjson --hidden |
|
210 | $ hg fatelogjson --hidden | |
211 | @ d004c8f274b9 |
|
211 | @ d004c8f274b9 | |
212 | | |
|
212 | | | |
213 | | x a468dc9b3633 |
|
213 | | x a468dc9b3633 | |
214 | |/ Obsfate: [{"markers": [["a468dc9b36338b14fdb7825f55ce3df4e71517ad", ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], 0, [["operation", "amend"], ["user", "test2"]], [987654321.0, 0], null]], "successors": ["d004c8f274b9ec480a47a93c10dac5eee63adb78"]}] |
|
214 | |/ Obsfate: [{"markers": [["a468dc9b36338b14fdb7825f55ce3df4e71517ad", ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], 0, [["operation", "amend"], ["user", "test2"]], [987654321.0, 0], null]], "successors": ["d004c8f274b9ec480a47a93c10dac5eee63adb78"]}] | |
215 | | x 471f378eab4c |
|
215 | | x 471f378eab4c | |
216 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], 0, [["operation", "amend"], ["user", "test1"]], [1234567890.0, 0], null]], "successors": ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]}] |
|
216 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], 0, [["operation", "amend"], ["user", "test1"]], [1234567890.0, 0], null]], "successors": ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]}] | |
217 | o ea207398892e |
|
217 | o ea207398892e | |
218 |
|
218 | |||
219 | Test templates with splitted commit |
|
219 | Test templates with splitted commit | |
220 | =================================== |
|
220 | =================================== | |
221 |
|
221 | |||
222 | $ hg init $TESTTMP/templates-local-split |
|
222 | $ hg init $TESTTMP/templates-local-split | |
223 | $ cd $TESTTMP/templates-local-split |
|
223 | $ cd $TESTTMP/templates-local-split | |
224 | $ mkcommit ROOT |
|
224 | $ mkcommit ROOT | |
225 | $ echo 42 >> a |
|
225 | $ echo 42 >> a | |
226 | $ echo 43 >> b |
|
226 | $ echo 43 >> b | |
227 | $ hg commit -A -m "A0" |
|
227 | $ hg commit -A -m "A0" | |
228 | adding a |
|
228 | adding a | |
229 | adding b |
|
229 | adding b | |
230 | $ hg log --hidden -G |
|
230 | $ hg log --hidden -G | |
231 | @ changeset: 1:471597cad322 |
|
231 | @ changeset: 1:471597cad322 | |
232 | | tag: tip |
|
232 | | tag: tip | |
233 | | user: test |
|
233 | | user: test | |
234 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
234 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
235 | | summary: A0 |
|
235 | | summary: A0 | |
236 | | |
|
236 | | | |
237 | o changeset: 0:ea207398892e |
|
237 | o changeset: 0:ea207398892e | |
238 | user: test |
|
238 | user: test | |
239 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
239 | date: Thu Jan 01 00:00:00 1970 +0000 | |
240 | summary: ROOT |
|
240 | summary: ROOT | |
241 |
|
241 | |||
242 | # Simulate split |
|
242 | # Simulate split | |
243 | $ hg up -r "desc(ROOT)" |
|
243 | $ hg up -r "desc(ROOT)" | |
244 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
244 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
245 | $ echo 42 >> a |
|
245 | $ echo 42 >> a | |
246 | $ hg commit -A -m "A0" |
|
246 | $ hg commit -A -m "A0" | |
247 | adding a |
|
247 | adding a | |
248 | created new head |
|
248 | created new head | |
249 | $ echo 43 >> b |
|
249 | $ echo 43 >> b | |
250 | $ hg commit -A -m "A0" |
|
250 | $ hg commit -A -m "A0" | |
251 | adding b |
|
251 | adding b | |
252 | $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"` |
|
252 | $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"` | |
253 | obsoleted 1 changesets |
|
253 | obsoleted 1 changesets | |
254 |
|
254 | |||
255 | $ hg log --hidden -G |
|
255 | $ hg log --hidden -G | |
256 | @ changeset: 3:f257fde29c7a |
|
256 | @ changeset: 3:f257fde29c7a | |
257 | | tag: tip |
|
257 | | tag: tip | |
258 | | user: test |
|
258 | | user: test | |
259 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
259 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
260 | | summary: A0 |
|
260 | | summary: A0 | |
261 | | |
|
261 | | | |
262 | o changeset: 2:337fec4d2edc |
|
262 | o changeset: 2:337fec4d2edc | |
263 | | parent: 0:ea207398892e |
|
263 | | parent: 0:ea207398892e | |
264 | | user: test |
|
264 | | user: test | |
265 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
265 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
266 | | summary: A0 |
|
266 | | summary: A0 | |
267 | | |
|
267 | | | |
268 | | x changeset: 1:471597cad322 |
|
268 | | x changeset: 1:471597cad322 | |
269 | |/ user: test |
|
269 | |/ user: test | |
270 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
270 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
271 | | summary: A0 |
|
271 | | summary: A0 | |
272 | | |
|
272 | | | |
273 | o changeset: 0:ea207398892e |
|
273 | o changeset: 0:ea207398892e | |
274 | user: test |
|
274 | user: test | |
275 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
275 | date: Thu Jan 01 00:00:00 1970 +0000 | |
276 | summary: ROOT |
|
276 | summary: ROOT | |
277 |
|
277 | |||
278 | Check templates |
|
278 | Check templates | |
279 | --------------- |
|
279 | --------------- | |
280 |
|
280 | |||
281 | $ hg up 'obsolete()' --hidden |
|
281 | $ hg up 'obsolete()' --hidden | |
282 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
282 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
283 |
|
283 | |||
284 | Predecessors template should show current revision as it is the working copy |
|
284 | Predecessors template should show current revision as it is the working copy | |
285 | $ hg tlog |
|
285 | $ hg tlog | |
286 | o f257fde29c7a |
|
286 | o f257fde29c7a | |
287 | | Predecessors: 1:471597cad322 |
|
287 | | Predecessors: 1:471597cad322 | |
288 | | semi-colon: 1:471597cad322 |
|
288 | | semi-colon: 1:471597cad322 | |
289 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
289 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] | |
290 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
290 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 | |
291 | o 337fec4d2edc |
|
291 | o 337fec4d2edc | |
292 | | Predecessors: 1:471597cad322 |
|
292 | | Predecessors: 1:471597cad322 | |
293 | | semi-colon: 1:471597cad322 |
|
293 | | semi-colon: 1:471597cad322 | |
294 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
294 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] | |
295 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
295 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 | |
296 | | @ 471597cad322 |
|
296 | | @ 471597cad322 | |
297 | |/ Successors: 2:337fec4d2edc 3:f257fde29c7a |
|
297 | |/ Successors: 2:337fec4d2edc 3:f257fde29c7a | |
298 | | multi-line: 2:337fec4d2edc 3:f257fde29c7a |
|
298 | | multi-line: 2:337fec4d2edc 3:f257fde29c7a | |
299 | | json: [["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]] |
|
299 | | json: [["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]] | |
300 | o ea207398892e |
|
300 | o ea207398892e | |
301 |
|
301 | |||
302 |
|
302 | |||
303 | $ hg fatelog |
|
303 | $ hg fatelog | |
304 | o f257fde29c7a |
|
304 | o f257fde29c7a | |
305 | | |
|
305 | | | |
306 | o 337fec4d2edc |
|
306 | o 337fec4d2edc | |
307 | | |
|
307 | | | |
308 | | @ 471597cad322 |
|
308 | | @ 471597cad322 | |
309 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000); |
|
309 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000); | |
310 | o ea207398892e |
|
310 | o ea207398892e | |
311 |
|
311 | |||
312 | $ hg up f257fde29c7a |
|
312 | $ hg up f257fde29c7a | |
313 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
313 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
314 |
|
314 | |||
315 | Predecessors template should not show a predecessor as it's not displayed in |
|
315 | Predecessors template should not show a predecessor as it's not displayed in | |
316 | the log |
|
316 | the log | |
317 | $ hg tlog |
|
317 | $ hg tlog | |
318 | @ f257fde29c7a |
|
318 | @ f257fde29c7a | |
319 | | |
|
319 | | | |
320 | o 337fec4d2edc |
|
320 | o 337fec4d2edc | |
321 | | |
|
321 | | | |
322 | o ea207398892e |
|
322 | o ea207398892e | |
323 |
|
323 | |||
324 | Predecessors template should show both predecessors as we force their display |
|
324 | Predecessors template should show both predecessors as we force their display | |
325 | with --hidden |
|
325 | with --hidden | |
326 | $ hg tlog --hidden |
|
326 | $ hg tlog --hidden | |
327 | @ f257fde29c7a |
|
327 | @ f257fde29c7a | |
328 | | Predecessors: 1:471597cad322 |
|
328 | | Predecessors: 1:471597cad322 | |
329 | | semi-colon: 1:471597cad322 |
|
329 | | semi-colon: 1:471597cad322 | |
330 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
330 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] | |
331 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
331 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 | |
332 | o 337fec4d2edc |
|
332 | o 337fec4d2edc | |
333 | | Predecessors: 1:471597cad322 |
|
333 | | Predecessors: 1:471597cad322 | |
334 | | semi-colon: 1:471597cad322 |
|
334 | | semi-colon: 1:471597cad322 | |
335 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] |
|
335 | | json: ["471597cad322d1f659bb169751be9133dad92ef3"] | |
336 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 |
|
336 | | map: 1:471597cad322d1f659bb169751be9133dad92ef3 | |
337 | | x 471597cad322 |
|
337 | | x 471597cad322 | |
338 | |/ Successors: 2:337fec4d2edc 3:f257fde29c7a |
|
338 | |/ Successors: 2:337fec4d2edc 3:f257fde29c7a | |
339 | | multi-line: 2:337fec4d2edc 3:f257fde29c7a |
|
339 | | multi-line: 2:337fec4d2edc 3:f257fde29c7a | |
340 | | json: [["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]] |
|
340 | | json: [["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]] | |
341 | o ea207398892e |
|
341 | o ea207398892e | |
342 |
|
342 | |||
343 |
|
343 | |||
344 | $ hg fatelog --hidden |
|
344 | $ hg fatelog --hidden | |
345 | @ f257fde29c7a |
|
345 | @ f257fde29c7a | |
346 | | |
|
346 | | | |
347 | o 337fec4d2edc |
|
347 | o 337fec4d2edc | |
348 | | |
|
348 | | | |
349 | | x 471597cad322 |
|
349 | | x 471597cad322 | |
350 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000); |
|
350 | |/ Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000); | |
351 | o ea207398892e |
|
351 | o ea207398892e | |
352 |
|
352 | |||
353 | $ hg fatelogjson --hidden |
|
353 | $ hg fatelogjson --hidden | |
354 | @ f257fde29c7a |
|
354 | @ f257fde29c7a | |
355 | | |
|
355 | | | |
356 | o 337fec4d2edc |
|
356 | o 337fec4d2edc | |
357 | | |
|
357 | | | |
358 | | x 471597cad322 |
|
358 | | x 471597cad322 | |
359 | |/ Obsfate: [{"markers": [["471597cad322d1f659bb169751be9133dad92ef3", ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]}] |
|
359 | |/ Obsfate: [{"markers": [["471597cad322d1f659bb169751be9133dad92ef3", ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]}] | |
360 | o ea207398892e |
|
360 | o ea207398892e | |
361 |
|
361 | |||
362 | Test templates with folded commit |
|
362 | Test templates with folded commit | |
363 | ================================= |
|
363 | ================================= | |
364 |
|
364 | |||
365 | Test setup |
|
365 | Test setup | |
366 | ---------- |
|
366 | ---------- | |
367 |
|
367 | |||
368 | $ hg init $TESTTMP/templates-local-fold |
|
368 | $ hg init $TESTTMP/templates-local-fold | |
369 | $ cd $TESTTMP/templates-local-fold |
|
369 | $ cd $TESTTMP/templates-local-fold | |
370 | $ mkcommit ROOT |
|
370 | $ mkcommit ROOT | |
371 | $ mkcommit A0 |
|
371 | $ mkcommit A0 | |
372 | $ mkcommit B0 |
|
372 | $ mkcommit B0 | |
373 | $ hg log --hidden -G |
|
373 | $ hg log --hidden -G | |
374 | @ changeset: 2:0dec01379d3b |
|
374 | @ changeset: 2:0dec01379d3b | |
375 | | tag: tip |
|
375 | | tag: tip | |
376 | | user: test |
|
376 | | user: test | |
377 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
377 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
378 | | summary: B0 |
|
378 | | summary: B0 | |
379 | | |
|
379 | | | |
380 | o changeset: 1:471f378eab4c |
|
380 | o changeset: 1:471f378eab4c | |
381 | | user: test |
|
381 | | user: test | |
382 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
382 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
383 | | summary: A0 |
|
383 | | summary: A0 | |
384 | | |
|
384 | | | |
385 | o changeset: 0:ea207398892e |
|
385 | o changeset: 0:ea207398892e | |
386 | user: test |
|
386 | user: test | |
387 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
387 | date: Thu Jan 01 00:00:00 1970 +0000 | |
388 | summary: ROOT |
|
388 | summary: ROOT | |
389 |
|
389 | |||
390 | Simulate a fold |
|
390 | Simulate a fold | |
391 | $ hg up -r "desc(ROOT)" |
|
391 | $ hg up -r "desc(ROOT)" | |
392 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
392 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
393 | $ echo "A0" > A0 |
|
393 | $ echo "A0" > A0 | |
394 | $ echo "B0" > B0 |
|
394 | $ echo "B0" > B0 | |
395 | $ hg commit -A -m "C0" |
|
395 | $ hg commit -A -m "C0" | |
396 | adding A0 |
|
396 | adding A0 | |
397 | adding B0 |
|
397 | adding B0 | |
398 | created new head |
|
398 | created new head | |
399 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"` |
|
399 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"` | |
400 | obsoleted 1 changesets |
|
400 | obsoleted 1 changesets | |
401 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"` |
|
401 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"` | |
402 | obsoleted 1 changesets |
|
402 | obsoleted 1 changesets | |
403 |
|
403 | |||
404 | $ hg log --hidden -G |
|
404 | $ hg log --hidden -G | |
405 | @ changeset: 3:eb5a0daa2192 |
|
405 | @ changeset: 3:eb5a0daa2192 | |
406 | | tag: tip |
|
406 | | tag: tip | |
407 | | parent: 0:ea207398892e |
|
407 | | parent: 0:ea207398892e | |
408 | | user: test |
|
408 | | user: test | |
409 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
409 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
410 | | summary: C0 |
|
410 | | summary: C0 | |
411 | | |
|
411 | | | |
412 | | x changeset: 2:0dec01379d3b |
|
412 | | x changeset: 2:0dec01379d3b | |
413 | | | user: test |
|
413 | | | user: test | |
414 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
414 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
415 | | | summary: B0 |
|
415 | | | summary: B0 | |
416 | | | |
|
416 | | | | |
417 | | x changeset: 1:471f378eab4c |
|
417 | | x changeset: 1:471f378eab4c | |
418 | |/ user: test |
|
418 | |/ user: test | |
419 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
419 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
420 | | summary: A0 |
|
420 | | summary: A0 | |
421 | | |
|
421 | | | |
422 | o changeset: 0:ea207398892e |
|
422 | o changeset: 0:ea207398892e | |
423 | user: test |
|
423 | user: test | |
424 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
424 | date: Thu Jan 01 00:00:00 1970 +0000 | |
425 | summary: ROOT |
|
425 | summary: ROOT | |
426 |
|
426 | |||
427 | Check templates |
|
427 | Check templates | |
428 | --------------- |
|
428 | --------------- | |
429 |
|
429 | |||
430 | $ hg up 'desc(A0)' --hidden |
|
430 | $ hg up 'desc(A0)' --hidden | |
431 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
431 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
432 |
|
432 | |||
433 | Predecessors template should show current revision as it is the working copy |
|
433 | Predecessors template should show current revision as it is the working copy | |
434 | $ hg tlog |
|
434 | $ hg tlog | |
435 | o eb5a0daa2192 |
|
435 | o eb5a0daa2192 | |
436 | | Predecessors: 1:471f378eab4c |
|
436 | | Predecessors: 1:471f378eab4c | |
437 | | semi-colon: 1:471f378eab4c |
|
437 | | semi-colon: 1:471f378eab4c | |
438 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
438 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
439 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
439 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
440 | | @ 471f378eab4c |
|
440 | | @ 471f378eab4c | |
441 | |/ Successors: 3:eb5a0daa2192 |
|
441 | |/ Successors: 3:eb5a0daa2192 | |
442 | | multi-line: 3:eb5a0daa2192 |
|
442 | | multi-line: 3:eb5a0daa2192 | |
443 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
443 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
444 | o ea207398892e |
|
444 | o ea207398892e | |
445 |
|
445 | |||
446 |
|
446 | |||
447 | $ hg fatelog |
|
447 | $ hg fatelog | |
448 | o eb5a0daa2192 |
|
448 | o eb5a0daa2192 | |
449 | | |
|
449 | | | |
450 | | @ 471f378eab4c |
|
450 | | @ 471f378eab4c | |
451 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
451 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
452 | o ea207398892e |
|
452 | o ea207398892e | |
453 |
|
453 | |||
454 | $ hg up 'desc(B0)' --hidden |
|
454 | $ hg up 'desc(B0)' --hidden | |
455 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
455 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
456 |
|
456 | |||
457 | Predecessors template should show both predecessors as they should be both |
|
457 | Predecessors template should show both predecessors as they should be both | |
458 | displayed |
|
458 | displayed | |
459 | $ hg tlog |
|
459 | $ hg tlog | |
460 | o eb5a0daa2192 |
|
460 | o eb5a0daa2192 | |
461 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c |
|
461 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c | |
462 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c |
|
462 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c | |
463 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
463 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] | |
464 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
464 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
465 | | @ 0dec01379d3b |
|
465 | | @ 0dec01379d3b | |
466 | | | Successors: 3:eb5a0daa2192 |
|
466 | | | Successors: 3:eb5a0daa2192 | |
467 | | | multi-line: 3:eb5a0daa2192 |
|
467 | | | multi-line: 3:eb5a0daa2192 | |
468 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
468 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
469 | | x 471f378eab4c |
|
469 | | x 471f378eab4c | |
470 | |/ Successors: 3:eb5a0daa2192 |
|
470 | |/ Successors: 3:eb5a0daa2192 | |
471 | | multi-line: 3:eb5a0daa2192 |
|
471 | | multi-line: 3:eb5a0daa2192 | |
472 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
472 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
473 | o ea207398892e |
|
473 | o ea207398892e | |
474 |
|
474 | |||
475 |
|
475 | |||
476 | $ hg fatelog |
|
476 | $ hg fatelog | |
477 | o eb5a0daa2192 |
|
477 | o eb5a0daa2192 | |
478 | | |
|
478 | | | |
479 | | @ 0dec01379d3b |
|
479 | | @ 0dec01379d3b | |
480 | | | Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
480 | | | Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
481 | | x 471f378eab4c |
|
481 | | x 471f378eab4c | |
482 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
482 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
483 | o ea207398892e |
|
483 | o ea207398892e | |
484 |
|
484 | |||
485 | $ hg up 'desc(C0)' |
|
485 | $ hg up 'desc(C0)' | |
486 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
486 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
487 |
|
487 | |||
488 | Predecessors template should not show predecessors as they are not displayed in |
|
488 | Predecessors template should not show predecessors as they are not displayed in | |
489 | the log |
|
489 | the log | |
490 | $ hg tlog |
|
490 | $ hg tlog | |
491 | @ eb5a0daa2192 |
|
491 | @ eb5a0daa2192 | |
492 | | |
|
492 | | | |
493 | o ea207398892e |
|
493 | o ea207398892e | |
494 |
|
494 | |||
495 | Predecessors template should show both predecessors as we force their display |
|
495 | Predecessors template should show both predecessors as we force their display | |
496 | with --hidden |
|
496 | with --hidden | |
497 | $ hg tlog --hidden |
|
497 | $ hg tlog --hidden | |
498 | @ eb5a0daa2192 |
|
498 | @ eb5a0daa2192 | |
499 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c |
|
499 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c | |
500 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c |
|
500 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c | |
501 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
501 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] | |
502 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
502 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
503 | | x 0dec01379d3b |
|
503 | | x 0dec01379d3b | |
504 | | | Successors: 3:eb5a0daa2192 |
|
504 | | | Successors: 3:eb5a0daa2192 | |
505 | | | multi-line: 3:eb5a0daa2192 |
|
505 | | | multi-line: 3:eb5a0daa2192 | |
506 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
506 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
507 | | x 471f378eab4c |
|
507 | | x 471f378eab4c | |
508 | |/ Successors: 3:eb5a0daa2192 |
|
508 | |/ Successors: 3:eb5a0daa2192 | |
509 | | multi-line: 3:eb5a0daa2192 |
|
509 | | multi-line: 3:eb5a0daa2192 | |
510 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
510 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
511 | o ea207398892e |
|
511 | o ea207398892e | |
512 |
|
512 | |||
513 |
|
513 | |||
514 | $ hg fatelog --hidden |
|
514 | $ hg fatelog --hidden | |
515 | @ eb5a0daa2192 |
|
515 | @ eb5a0daa2192 | |
516 | | |
|
516 | | | |
517 | | x 0dec01379d3b |
|
517 | | x 0dec01379d3b | |
518 | | | Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
518 | | | Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
519 | | x 471f378eab4c |
|
519 | | x 471f378eab4c | |
520 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
520 | |/ Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
521 | o ea207398892e |
|
521 | o ea207398892e | |
522 |
|
522 | |||
523 |
|
523 | |||
524 | $ hg fatelogjson --hidden |
|
524 | $ hg fatelogjson --hidden | |
525 | @ eb5a0daa2192 |
|
525 | @ eb5a0daa2192 | |
526 | | |
|
526 | | | |
527 | | x 0dec01379d3b |
|
527 | | x 0dec01379d3b | |
528 | | | Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
528 | | | Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] | |
529 | | x 471f378eab4c |
|
529 | | x 471f378eab4c | |
530 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
530 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] | |
531 | o ea207398892e |
|
531 | o ea207398892e | |
532 |
|
532 | |||
533 |
|
533 | |||
534 | Test templates with divergence |
|
534 | Test templates with divergence | |
535 | ============================== |
|
535 | ============================== | |
536 |
|
536 | |||
537 | Test setup |
|
537 | Test setup | |
538 | ---------- |
|
538 | ---------- | |
539 |
|
539 | |||
540 | $ hg init $TESTTMP/templates-local-divergence |
|
540 | $ hg init $TESTTMP/templates-local-divergence | |
541 | $ cd $TESTTMP/templates-local-divergence |
|
541 | $ cd $TESTTMP/templates-local-divergence | |
542 | $ mkcommit ROOT |
|
542 | $ mkcommit ROOT | |
543 | $ mkcommit A0 |
|
543 | $ mkcommit A0 | |
544 | $ hg commit --amend -m "A1" |
|
544 | $ hg commit --amend -m "A1" | |
545 | $ hg log --hidden -G |
|
545 | $ hg log --hidden -G | |
546 | @ changeset: 2:fdf9bde5129a |
|
546 | @ changeset: 2:fdf9bde5129a | |
547 | | tag: tip |
|
547 | | tag: tip | |
548 | | parent: 0:ea207398892e |
|
548 | | parent: 0:ea207398892e | |
549 | | user: test |
|
549 | | user: test | |
550 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
550 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
551 | | summary: A1 |
|
551 | | summary: A1 | |
552 | | |
|
552 | | | |
553 | | x changeset: 1:471f378eab4c |
|
553 | | x changeset: 1:471f378eab4c | |
554 | |/ user: test |
|
554 | |/ user: test | |
555 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
555 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
556 | | summary: A0 |
|
556 | | summary: A0 | |
557 | | |
|
557 | | | |
558 | o changeset: 0:ea207398892e |
|
558 | o changeset: 0:ea207398892e | |
559 | user: test |
|
559 | user: test | |
560 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
560 | date: Thu Jan 01 00:00:00 1970 +0000 | |
561 | summary: ROOT |
|
561 | summary: ROOT | |
562 |
|
562 | |||
563 | $ hg update --hidden 'desc(A0)' |
|
563 | $ hg update --hidden 'desc(A0)' | |
564 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
564 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
565 | $ hg commit --amend -m "A2" |
|
565 | $ hg commit --amend -m "A2" | |
566 | $ hg log --hidden -G |
|
566 | $ hg log --hidden -G | |
567 | @ changeset: 3:65b757b745b9 |
|
567 | @ changeset: 3:65b757b745b9 | |
568 | | tag: tip |
|
568 | | tag: tip | |
569 | | parent: 0:ea207398892e |
|
569 | | parent: 0:ea207398892e | |
570 | | user: test |
|
570 | | user: test | |
571 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
571 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
572 | | instability: content-divergent |
|
572 | | instability: content-divergent | |
573 | | summary: A2 |
|
573 | | summary: A2 | |
574 | | |
|
574 | | | |
575 | | o changeset: 2:fdf9bde5129a |
|
575 | | o changeset: 2:fdf9bde5129a | |
576 | |/ parent: 0:ea207398892e |
|
576 | |/ parent: 0:ea207398892e | |
577 | | user: test |
|
577 | | user: test | |
578 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
578 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
579 | | instability: content-divergent |
|
579 | | instability: content-divergent | |
580 | | summary: A1 |
|
580 | | summary: A1 | |
581 | | |
|
581 | | | |
582 | | x changeset: 1:471f378eab4c |
|
582 | | x changeset: 1:471f378eab4c | |
583 | |/ user: test |
|
583 | |/ user: test | |
584 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
584 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
585 | | summary: A0 |
|
585 | | summary: A0 | |
586 | | |
|
586 | | | |
587 | o changeset: 0:ea207398892e |
|
587 | o changeset: 0:ea207398892e | |
588 | user: test |
|
588 | user: test | |
589 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
589 | date: Thu Jan 01 00:00:00 1970 +0000 | |
590 | summary: ROOT |
|
590 | summary: ROOT | |
591 |
|
591 | |||
592 | $ hg commit --amend -m 'A3' |
|
592 | $ hg commit --amend -m 'A3' | |
593 | $ hg log --hidden -G |
|
593 | $ hg log --hidden -G | |
594 | @ changeset: 4:019fadeab383 |
|
594 | @ changeset: 4:019fadeab383 | |
595 | | tag: tip |
|
595 | | tag: tip | |
596 | | parent: 0:ea207398892e |
|
596 | | parent: 0:ea207398892e | |
597 | | user: test |
|
597 | | user: test | |
598 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
598 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
599 | | instability: content-divergent |
|
599 | | instability: content-divergent | |
600 | | summary: A3 |
|
600 | | summary: A3 | |
601 | | |
|
601 | | | |
602 | | x changeset: 3:65b757b745b9 |
|
602 | | x changeset: 3:65b757b745b9 | |
603 | |/ parent: 0:ea207398892e |
|
603 | |/ parent: 0:ea207398892e | |
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: A2 |
|
606 | | summary: A2 | |
607 | | |
|
607 | | | |
608 | | o changeset: 2:fdf9bde5129a |
|
608 | | o changeset: 2:fdf9bde5129a | |
609 | |/ parent: 0:ea207398892e |
|
609 | |/ parent: 0:ea207398892e | |
610 | | user: test |
|
610 | | user: test | |
611 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
611 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
612 | | instability: content-divergent |
|
612 | | instability: content-divergent | |
613 | | summary: A1 |
|
613 | | summary: A1 | |
614 | | |
|
614 | | | |
615 | | x changeset: 1:471f378eab4c |
|
615 | | x changeset: 1:471f378eab4c | |
616 | |/ user: test |
|
616 | |/ user: test | |
617 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
617 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
618 | | summary: A0 |
|
618 | | summary: A0 | |
619 | | |
|
619 | | | |
620 | o changeset: 0:ea207398892e |
|
620 | o changeset: 0:ea207398892e | |
621 | user: test |
|
621 | user: test | |
622 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
622 | date: Thu Jan 01 00:00:00 1970 +0000 | |
623 | summary: ROOT |
|
623 | summary: ROOT | |
624 |
|
624 | |||
625 |
|
625 | |||
626 | Check templates |
|
626 | Check templates | |
627 | --------------- |
|
627 | --------------- | |
628 |
|
628 | |||
629 | $ hg up 'desc(A0)' --hidden |
|
629 | $ hg up 'desc(A0)' --hidden | |
630 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
630 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
631 |
|
631 | |||
632 | Predecessors template should show current revision as it is the working copy |
|
632 | Predecessors template should show current revision as it is the working copy | |
633 | $ hg tlog |
|
633 | $ hg tlog | |
634 | o 019fadeab383 |
|
634 | o 019fadeab383 | |
635 | | Predecessors: 1:471f378eab4c |
|
635 | | Predecessors: 1:471f378eab4c | |
636 | | semi-colon: 1:471f378eab4c |
|
636 | | semi-colon: 1:471f378eab4c | |
637 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
637 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
638 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
638 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
639 | | o fdf9bde5129a |
|
639 | | o fdf9bde5129a | |
640 | |/ Predecessors: 1:471f378eab4c |
|
640 | |/ Predecessors: 1:471f378eab4c | |
641 | | semi-colon: 1:471f378eab4c |
|
641 | | semi-colon: 1:471f378eab4c | |
642 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
642 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
643 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
643 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
644 | | @ 471f378eab4c |
|
644 | | @ 471f378eab4c | |
645 | |/ Successors: 2:fdf9bde5129a; 4:019fadeab383 |
|
645 | |/ Successors: 2:fdf9bde5129a; 4:019fadeab383 | |
646 | | multi-line: 2:fdf9bde5129a |
|
646 | | multi-line: 2:fdf9bde5129a | |
647 | | multi-line: 4:019fadeab383 |
|
647 | | multi-line: 4:019fadeab383 | |
648 | | json: [["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]] |
|
648 | | json: [["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]] | |
649 | o ea207398892e |
|
649 | o ea207398892e | |
650 |
|
650 | |||
651 | $ hg fatelog |
|
651 | $ hg fatelog | |
652 | o 019fadeab383 |
|
652 | o 019fadeab383 | |
653 | | |
|
653 | | | |
654 | | o fdf9bde5129a |
|
654 | | o fdf9bde5129a | |
655 | |/ |
|
655 | |/ | |
656 | | @ 471f378eab4c |
|
656 | | @ 471f378eab4c | |
657 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); |
|
657 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); | |
658 | o ea207398892e |
|
658 | o ea207398892e | |
659 |
|
659 | |||
660 | $ hg up 'desc(A1)' |
|
660 | $ hg up 'desc(A1)' | |
661 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
661 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
662 |
|
662 | |||
663 | Predecessors template should not show predecessors as they are not displayed in |
|
663 | Predecessors template should not show predecessors as they are not displayed in | |
664 | the log |
|
664 | the log | |
665 | $ hg tlog |
|
665 | $ hg tlog | |
666 | o 019fadeab383 |
|
666 | o 019fadeab383 | |
667 | | |
|
667 | | | |
668 | | @ fdf9bde5129a |
|
668 | | @ fdf9bde5129a | |
669 | |/ |
|
669 | |/ | |
670 | o ea207398892e |
|
670 | o ea207398892e | |
671 |
|
671 | |||
672 |
|
672 | |||
673 | $ hg fatelog |
|
673 | $ hg fatelog | |
674 | o 019fadeab383 |
|
674 | o 019fadeab383 | |
675 | | |
|
675 | | | |
676 | | @ fdf9bde5129a |
|
676 | | @ fdf9bde5129a | |
677 | |/ |
|
677 | |/ | |
678 | o ea207398892e |
|
678 | o ea207398892e | |
679 |
|
679 | |||
680 | Predecessors template should the predecessors as we force their display with |
|
680 | Predecessors template should the predecessors as we force their display with | |
681 | --hidden |
|
681 | --hidden | |
682 | $ hg tlog --hidden |
|
682 | $ hg tlog --hidden | |
683 | o 019fadeab383 |
|
683 | o 019fadeab383 | |
684 | | Predecessors: 3:65b757b745b9 |
|
684 | | Predecessors: 3:65b757b745b9 | |
685 | | semi-colon: 3:65b757b745b9 |
|
685 | | semi-colon: 3:65b757b745b9 | |
686 | | json: ["65b757b745b935093c87a2bccd877521cccffcbd"] |
|
686 | | json: ["65b757b745b935093c87a2bccd877521cccffcbd"] | |
687 | | map: 3:65b757b745b935093c87a2bccd877521cccffcbd |
|
687 | | map: 3:65b757b745b935093c87a2bccd877521cccffcbd | |
688 | | x 65b757b745b9 |
|
688 | | x 65b757b745b9 | |
689 | |/ Predecessors: 1:471f378eab4c |
|
689 | |/ Predecessors: 1:471f378eab4c | |
690 | | semi-colon: 1:471f378eab4c |
|
690 | | semi-colon: 1:471f378eab4c | |
691 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
691 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
692 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
692 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
693 | | Successors: 4:019fadeab383 |
|
693 | | Successors: 4:019fadeab383 | |
694 | | multi-line: 4:019fadeab383 |
|
694 | | multi-line: 4:019fadeab383 | |
695 | | json: [["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]] |
|
695 | | json: [["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]] | |
696 | | @ fdf9bde5129a |
|
696 | | @ fdf9bde5129a | |
697 | |/ Predecessors: 1:471f378eab4c |
|
697 | |/ Predecessors: 1:471f378eab4c | |
698 | | semi-colon: 1:471f378eab4c |
|
698 | | semi-colon: 1:471f378eab4c | |
699 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
699 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
700 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
700 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
701 | | x 471f378eab4c |
|
701 | | x 471f378eab4c | |
702 | |/ Successors: 2:fdf9bde5129a; 3:65b757b745b9 |
|
702 | |/ Successors: 2:fdf9bde5129a; 3:65b757b745b9 | |
703 | | multi-line: 2:fdf9bde5129a |
|
703 | | multi-line: 2:fdf9bde5129a | |
704 | | multi-line: 3:65b757b745b9 |
|
704 | | multi-line: 3:65b757b745b9 | |
705 | | json: [["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], ["65b757b745b935093c87a2bccd877521cccffcbd"]] |
|
705 | | json: [["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], ["65b757b745b935093c87a2bccd877521cccffcbd"]] | |
706 | o ea207398892e |
|
706 | o ea207398892e | |
707 |
|
707 | |||
708 |
|
708 | |||
709 | $ hg fatelog --hidden |
|
709 | $ hg fatelog --hidden | |
710 | o 019fadeab383 |
|
710 | o 019fadeab383 | |
711 | | |
|
711 | | | |
712 | | x 65b757b745b9 |
|
712 | | x 65b757b745b9 | |
713 | |/ Obsfate: rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); |
|
713 | |/ Obsfate: rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000); | |
714 | | @ fdf9bde5129a |
|
714 | | @ fdf9bde5129a | |
715 | |/ |
|
715 | |/ | |
716 | | x 471f378eab4c |
|
716 | | x 471f378eab4c | |
717 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); |
|
717 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); | |
718 | o ea207398892e |
|
718 | o ea207398892e | |
719 |
|
719 | |||
720 |
|
720 | |||
721 | $ hg fatelogjson --hidden |
|
721 | $ hg fatelogjson --hidden | |
722 | o 019fadeab383 |
|
722 | o 019fadeab383 | |
723 | | |
|
723 | | | |
724 | | x 65b757b745b9 |
|
724 | | x 65b757b745b9 | |
725 | |/ Obsfate: [{"markers": [["65b757b745b935093c87a2bccd877521cccffcbd", ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]}] |
|
725 | |/ Obsfate: [{"markers": [["65b757b745b935093c87a2bccd877521cccffcbd", ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]}] | |
726 | | @ fdf9bde5129a |
|
726 | | @ fdf9bde5129a | |
727 | |/ |
|
727 | |/ | |
728 | | x 471f378eab4c |
|
728 | | x 471f378eab4c | |
729 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"]}, {"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["65b757b745b935093c87a2bccd877521cccffcbd"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["65b757b745b935093c87a2bccd877521cccffcbd"]}] |
|
729 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"]}, {"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["65b757b745b935093c87a2bccd877521cccffcbd"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["65b757b745b935093c87a2bccd877521cccffcbd"]}] | |
730 | o ea207398892e |
|
730 | o ea207398892e | |
731 |
|
731 | |||
732 |
|
732 | |||
733 | Test templates with amended + folded commit |
|
733 | Test templates with amended + folded commit | |
734 | =========================================== |
|
734 | =========================================== | |
735 |
|
735 | |||
736 | Test setup |
|
736 | Test setup | |
737 | ---------- |
|
737 | ---------- | |
738 |
|
738 | |||
739 | $ hg init $TESTTMP/templates-local-amend-fold |
|
739 | $ hg init $TESTTMP/templates-local-amend-fold | |
740 | $ cd $TESTTMP/templates-local-amend-fold |
|
740 | $ cd $TESTTMP/templates-local-amend-fold | |
741 | $ mkcommit ROOT |
|
741 | $ mkcommit ROOT | |
742 | $ mkcommit A0 |
|
742 | $ mkcommit A0 | |
743 | $ mkcommit B0 |
|
743 | $ mkcommit B0 | |
744 | $ hg commit --amend -m "B1" |
|
744 | $ hg commit --amend -m "B1" | |
745 | $ hg log --hidden -G |
|
745 | $ hg log --hidden -G | |
746 | @ changeset: 3:b7ea6d14e664 |
|
746 | @ changeset: 3:b7ea6d14e664 | |
747 | | tag: tip |
|
747 | | tag: tip | |
748 | | parent: 1:471f378eab4c |
|
748 | | parent: 1:471f378eab4c | |
749 | | user: test |
|
749 | | user: test | |
750 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
750 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
751 | | summary: B1 |
|
751 | | summary: B1 | |
752 | | |
|
752 | | | |
753 | | x changeset: 2:0dec01379d3b |
|
753 | | x changeset: 2:0dec01379d3b | |
754 | |/ user: test |
|
754 | |/ user: test | |
755 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
755 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
756 | | summary: B0 |
|
756 | | summary: B0 | |
757 | | |
|
757 | | | |
758 | o changeset: 1:471f378eab4c |
|
758 | o changeset: 1:471f378eab4c | |
759 | | user: test |
|
759 | | user: test | |
760 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
760 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
761 | | summary: A0 |
|
761 | | summary: A0 | |
762 | | |
|
762 | | | |
763 | o changeset: 0:ea207398892e |
|
763 | o changeset: 0:ea207398892e | |
764 | user: test |
|
764 | user: test | |
765 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
765 | date: Thu Jan 01 00:00:00 1970 +0000 | |
766 | summary: ROOT |
|
766 | summary: ROOT | |
767 |
|
767 | |||
768 | # Simulate a fold |
|
768 | # Simulate a fold | |
769 | $ hg up -r "desc(ROOT)" |
|
769 | $ hg up -r "desc(ROOT)" | |
770 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
770 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
771 | $ echo "A0" > A0 |
|
771 | $ echo "A0" > A0 | |
772 | $ echo "B0" > B0 |
|
772 | $ echo "B0" > B0 | |
773 | $ hg commit -A -m "C0" |
|
773 | $ hg commit -A -m "C0" | |
774 | adding A0 |
|
774 | adding A0 | |
775 | adding B0 |
|
775 | adding B0 | |
776 | created new head |
|
776 | created new head | |
777 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"` |
|
777 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"` | |
778 | obsoleted 1 changesets |
|
778 | obsoleted 1 changesets | |
779 | $ hg debugobsolete `getid "desc(B1)"` `getid "desc(C0)"` |
|
779 | $ hg debugobsolete `getid "desc(B1)"` `getid "desc(C0)"` | |
780 | obsoleted 1 changesets |
|
780 | obsoleted 1 changesets | |
781 |
|
781 | |||
782 | $ hg log --hidden -G |
|
782 | $ hg log --hidden -G | |
783 | @ changeset: 4:eb5a0daa2192 |
|
783 | @ changeset: 4:eb5a0daa2192 | |
784 | | tag: tip |
|
784 | | tag: tip | |
785 | | parent: 0:ea207398892e |
|
785 | | parent: 0:ea207398892e | |
786 | | user: test |
|
786 | | user: test | |
787 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
787 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
788 | | summary: C0 |
|
788 | | summary: C0 | |
789 | | |
|
789 | | | |
790 | | x changeset: 3:b7ea6d14e664 |
|
790 | | x changeset: 3:b7ea6d14e664 | |
791 | | | parent: 1:471f378eab4c |
|
791 | | | parent: 1:471f378eab4c | |
792 | | | user: test |
|
792 | | | user: test | |
793 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
793 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
794 | | | summary: B1 |
|
794 | | | summary: B1 | |
795 | | | |
|
795 | | | | |
796 | | | x changeset: 2:0dec01379d3b |
|
796 | | | x changeset: 2:0dec01379d3b | |
797 | | |/ user: test |
|
797 | | |/ user: test | |
798 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
798 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
799 | | | summary: B0 |
|
799 | | | summary: B0 | |
800 | | | |
|
800 | | | | |
801 | | x changeset: 1:471f378eab4c |
|
801 | | x changeset: 1:471f378eab4c | |
802 | |/ user: test |
|
802 | |/ user: test | |
803 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
803 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
804 | | summary: A0 |
|
804 | | summary: A0 | |
805 | | |
|
805 | | | |
806 | o changeset: 0:ea207398892e |
|
806 | o changeset: 0:ea207398892e | |
807 | user: test |
|
807 | user: test | |
808 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
808 | date: Thu Jan 01 00:00:00 1970 +0000 | |
809 | summary: ROOT |
|
809 | summary: ROOT | |
810 |
|
810 | |||
811 | Check templates |
|
811 | Check templates | |
812 | --------------- |
|
812 | --------------- | |
813 |
|
813 | |||
814 | $ hg up 'desc(A0)' --hidden |
|
814 | $ hg up 'desc(A0)' --hidden | |
815 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
815 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
816 |
|
816 | |||
817 | Predecessors template should show current revision as it is the working copy |
|
817 | Predecessors template should show current revision as it is the working copy | |
818 | $ hg tlog |
|
818 | $ hg tlog | |
819 | o eb5a0daa2192 |
|
819 | o eb5a0daa2192 | |
820 | | Predecessors: 1:471f378eab4c |
|
820 | | Predecessors: 1:471f378eab4c | |
821 | | semi-colon: 1:471f378eab4c |
|
821 | | semi-colon: 1:471f378eab4c | |
822 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
822 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
823 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
823 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
824 | | @ 471f378eab4c |
|
824 | | @ 471f378eab4c | |
825 | |/ Successors: 4:eb5a0daa2192 |
|
825 | |/ Successors: 4:eb5a0daa2192 | |
826 | | multi-line: 4:eb5a0daa2192 |
|
826 | | multi-line: 4:eb5a0daa2192 | |
827 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
827 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
828 | o ea207398892e |
|
828 | o ea207398892e | |
829 |
|
829 | |||
830 |
|
830 | |||
831 | $ hg fatelog |
|
831 | $ hg fatelog | |
832 | o eb5a0daa2192 |
|
832 | o eb5a0daa2192 | |
833 | | |
|
833 | | | |
834 | | @ 471f378eab4c |
|
834 | | @ 471f378eab4c | |
835 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
835 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
836 | o ea207398892e |
|
836 | o ea207398892e | |
837 |
|
837 | |||
838 | $ hg up 'desc(B0)' --hidden |
|
838 | $ hg up 'desc(B0)' --hidden | |
839 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
839 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
840 |
|
840 | |||
841 | Predecessors template should both predecessors as they are visible |
|
841 | Predecessors template should both predecessors as they are visible | |
842 | $ hg tlog |
|
842 | $ hg tlog | |
843 | o eb5a0daa2192 |
|
843 | o eb5a0daa2192 | |
844 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c |
|
844 | | Predecessors: 2:0dec01379d3b 1:471f378eab4c | |
845 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c |
|
845 | | semi-colon: 2:0dec01379d3b; 1:471f378eab4c | |
846 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
846 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"] | |
847 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
847 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
848 | | @ 0dec01379d3b |
|
848 | | @ 0dec01379d3b | |
849 | | | Successors: 4:eb5a0daa2192 |
|
849 | | | Successors: 4:eb5a0daa2192 | |
850 | | | multi-line: 4:eb5a0daa2192 |
|
850 | | | multi-line: 4:eb5a0daa2192 | |
851 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
851 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
852 | | x 471f378eab4c |
|
852 | | x 471f378eab4c | |
853 | |/ Successors: 4:eb5a0daa2192 |
|
853 | |/ Successors: 4:eb5a0daa2192 | |
854 | | multi-line: 4:eb5a0daa2192 |
|
854 | | multi-line: 4:eb5a0daa2192 | |
855 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
855 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
856 | o ea207398892e |
|
856 | o ea207398892e | |
857 |
|
857 | |||
858 |
|
858 | |||
859 | $ hg fatelog |
|
859 | $ hg fatelog | |
860 | o eb5a0daa2192 |
|
860 | o eb5a0daa2192 | |
861 | | |
|
861 | | | |
862 | | @ 0dec01379d3b |
|
862 | | @ 0dec01379d3b | |
863 | | | Obsfate: rewritten using amend as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
863 | | | Obsfate: rewritten using amend as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
864 | | x 471f378eab4c |
|
864 | | x 471f378eab4c | |
865 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
865 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
866 | o ea207398892e |
|
866 | o ea207398892e | |
867 |
|
867 | |||
868 | $ hg up 'desc(B1)' --hidden |
|
868 | $ hg up 'desc(B1)' --hidden | |
869 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
869 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
870 |
|
870 | |||
871 | Predecessors template should both predecessors as they are visible |
|
871 | Predecessors template should both predecessors as they are visible | |
872 | $ hg tlog |
|
872 | $ hg tlog | |
873 | o eb5a0daa2192 |
|
873 | o eb5a0daa2192 | |
874 | | Predecessors: 1:471f378eab4c 3:b7ea6d14e664 |
|
874 | | Predecessors: 1:471f378eab4c 3:b7ea6d14e664 | |
875 | | semi-colon: 1:471f378eab4c; 3:b7ea6d14e664 |
|
875 | | semi-colon: 1:471f378eab4c; 3:b7ea6d14e664 | |
876 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"] |
|
876 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"] | |
877 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07 |
|
877 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07 | |
878 | | @ b7ea6d14e664 |
|
878 | | @ b7ea6d14e664 | |
879 | | | Successors: 4:eb5a0daa2192 |
|
879 | | | Successors: 4:eb5a0daa2192 | |
880 | | | multi-line: 4:eb5a0daa2192 |
|
880 | | | multi-line: 4:eb5a0daa2192 | |
881 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
881 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
882 | | x 471f378eab4c |
|
882 | | x 471f378eab4c | |
883 | |/ Successors: 4:eb5a0daa2192 |
|
883 | |/ Successors: 4:eb5a0daa2192 | |
884 | | multi-line: 4:eb5a0daa2192 |
|
884 | | multi-line: 4:eb5a0daa2192 | |
885 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
885 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
886 | o ea207398892e |
|
886 | o ea207398892e | |
887 |
|
887 | |||
888 |
|
888 | |||
889 | $ hg fatelog |
|
889 | $ hg fatelog | |
890 | o eb5a0daa2192 |
|
890 | o eb5a0daa2192 | |
891 | | |
|
891 | | | |
892 | | @ b7ea6d14e664 |
|
892 | | @ b7ea6d14e664 | |
893 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
893 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
894 | | x 471f378eab4c |
|
894 | | x 471f378eab4c | |
895 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
895 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
896 | o ea207398892e |
|
896 | o ea207398892e | |
897 |
|
897 | |||
898 | $ hg up 'desc(C0)' |
|
898 | $ hg up 'desc(C0)' | |
899 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
899 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
900 |
|
900 | |||
901 | Predecessors template should show no predecessors as they are both non visible |
|
901 | Predecessors template should show no predecessors as they are both non visible | |
902 | $ hg tlog |
|
902 | $ hg tlog | |
903 | @ eb5a0daa2192 |
|
903 | @ eb5a0daa2192 | |
904 | | |
|
904 | | | |
905 | o ea207398892e |
|
905 | o ea207398892e | |
906 |
|
906 | |||
907 |
|
907 | |||
908 | $ hg fatelog |
|
908 | $ hg fatelog | |
909 | @ eb5a0daa2192 |
|
909 | @ eb5a0daa2192 | |
910 | | |
|
910 | | | |
911 | o ea207398892e |
|
911 | o ea207398892e | |
912 |
|
912 | |||
913 | Predecessors template should show all predecessors as we force their display |
|
913 | Predecessors template should show all predecessors as we force their display | |
914 | with --hidden |
|
914 | with --hidden | |
915 | $ hg tlog --hidden |
|
915 | $ hg tlog --hidden | |
916 | @ eb5a0daa2192 |
|
916 | @ eb5a0daa2192 | |
917 | | Predecessors: 1:471f378eab4c 3:b7ea6d14e664 |
|
917 | | Predecessors: 1:471f378eab4c 3:b7ea6d14e664 | |
918 | | semi-colon: 1:471f378eab4c; 3:b7ea6d14e664 |
|
918 | | semi-colon: 1:471f378eab4c; 3:b7ea6d14e664 | |
919 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"] |
|
919 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"] | |
920 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07 |
|
920 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07 | |
921 | | x b7ea6d14e664 |
|
921 | | x b7ea6d14e664 | |
922 | | | Predecessors: 2:0dec01379d3b |
|
922 | | | Predecessors: 2:0dec01379d3b | |
923 | | | semi-colon: 2:0dec01379d3b |
|
923 | | | semi-colon: 2:0dec01379d3b | |
924 | | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
924 | | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] | |
925 | | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
925 | | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
926 | | | Successors: 4:eb5a0daa2192 |
|
926 | | | Successors: 4:eb5a0daa2192 | |
927 | | | multi-line: 4:eb5a0daa2192 |
|
927 | | | multi-line: 4:eb5a0daa2192 | |
928 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
928 | | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
929 | | | x 0dec01379d3b |
|
929 | | | x 0dec01379d3b | |
930 | | |/ Successors: 3:b7ea6d14e664 |
|
930 | | |/ Successors: 3:b7ea6d14e664 | |
931 | | | multi-line: 3:b7ea6d14e664 |
|
931 | | | multi-line: 3:b7ea6d14e664 | |
932 | | | json: [["b7ea6d14e664bdc8922221f7992631b50da3fb07"]] |
|
932 | | | json: [["b7ea6d14e664bdc8922221f7992631b50da3fb07"]] | |
933 | | x 471f378eab4c |
|
933 | | x 471f378eab4c | |
934 | |/ Successors: 4:eb5a0daa2192 |
|
934 | |/ Successors: 4:eb5a0daa2192 | |
935 | | multi-line: 4:eb5a0daa2192 |
|
935 | | multi-line: 4:eb5a0daa2192 | |
936 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] |
|
936 | | json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]] | |
937 | o ea207398892e |
|
937 | o ea207398892e | |
938 |
|
938 | |||
939 |
|
939 | |||
940 | $ hg fatelog --hidden |
|
940 | $ hg fatelog --hidden | |
941 | @ eb5a0daa2192 |
|
941 | @ eb5a0daa2192 | |
942 | | |
|
942 | | | |
943 | | x b7ea6d14e664 |
|
943 | | x b7ea6d14e664 | |
944 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
944 | | | Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
945 | | | x 0dec01379d3b |
|
945 | | | x 0dec01379d3b | |
946 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000); |
|
946 | | |/ Obsfate: rewritten using amend as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000); | |
947 | | x 471f378eab4c |
|
947 | | x 471f378eab4c | |
948 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); |
|
948 | |/ Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000); | |
949 | o ea207398892e |
|
949 | o ea207398892e | |
950 |
|
950 | |||
951 |
|
951 | |||
952 | $ hg fatelogjson --hidden |
|
952 | $ hg fatelogjson --hidden | |
953 | @ eb5a0daa2192 |
|
953 | @ eb5a0daa2192 | |
954 | | |
|
954 | | | |
955 | | x b7ea6d14e664 |
|
955 | | x b7ea6d14e664 | |
956 | | | Obsfate: [{"markers": [["b7ea6d14e664bdc8922221f7992631b50da3fb07", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
956 | | | Obsfate: [{"markers": [["b7ea6d14e664bdc8922221f7992631b50da3fb07", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] | |
957 | | | x 0dec01379d3b |
|
957 | | | x 0dec01379d3b | |
958 | | |/ Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["b7ea6d14e664bdc8922221f7992631b50da3fb07"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["b7ea6d14e664bdc8922221f7992631b50da3fb07"]}] |
|
958 | | |/ Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["b7ea6d14e664bdc8922221f7992631b50da3fb07"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["b7ea6d14e664bdc8922221f7992631b50da3fb07"]}] | |
959 | | x 471f378eab4c |
|
959 | | x 471f378eab4c | |
960 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] |
|
960 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}] | |
961 | o ea207398892e |
|
961 | o ea207398892e | |
962 |
|
962 | |||
963 |
|
963 | |||
964 | Test template with pushed and pulled obs markers |
|
964 | Test template with pushed and pulled obs markers | |
965 | ================================================ |
|
965 | ================================================ | |
966 |
|
966 | |||
967 | Test setup |
|
967 | Test setup | |
968 | ---------- |
|
968 | ---------- | |
969 |
|
969 | |||
970 | $ hg init $TESTTMP/templates-local-remote-markers-1 |
|
970 | $ hg init $TESTTMP/templates-local-remote-markers-1 | |
971 | $ cd $TESTTMP/templates-local-remote-markers-1 |
|
971 | $ cd $TESTTMP/templates-local-remote-markers-1 | |
972 | $ mkcommit ROOT |
|
972 | $ mkcommit ROOT | |
973 | $ mkcommit A0 |
|
973 | $ mkcommit A0 | |
974 | $ hg clone $TESTTMP/templates-local-remote-markers-1 $TESTTMP/templates-local-remote-markers-2 |
|
974 | $ hg clone $TESTTMP/templates-local-remote-markers-1 $TESTTMP/templates-local-remote-markers-2 | |
975 | updating to branch default |
|
975 | updating to branch default | |
976 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
976 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
977 | $ cd $TESTTMP/templates-local-remote-markers-2 |
|
977 | $ cd $TESTTMP/templates-local-remote-markers-2 | |
978 | $ hg log --hidden -G |
|
978 | $ hg log --hidden -G | |
979 | @ changeset: 1:471f378eab4c |
|
979 | @ changeset: 1:471f378eab4c | |
980 | | tag: tip |
|
980 | | tag: tip | |
981 | | user: test |
|
981 | | user: test | |
982 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
982 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
983 | | summary: A0 |
|
983 | | summary: A0 | |
984 | | |
|
984 | | | |
985 | o changeset: 0:ea207398892e |
|
985 | o changeset: 0:ea207398892e | |
986 | user: test |
|
986 | user: test | |
987 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
987 | date: Thu Jan 01 00:00:00 1970 +0000 | |
988 | summary: ROOT |
|
988 | summary: ROOT | |
989 |
|
989 | |||
990 | $ cd $TESTTMP/templates-local-remote-markers-1 |
|
990 | $ cd $TESTTMP/templates-local-remote-markers-1 | |
991 | $ hg commit --amend -m "A1" |
|
991 | $ hg commit --amend -m "A1" | |
992 | $ hg commit --amend -m "A2" |
|
992 | $ hg commit --amend -m "A2" | |
993 | $ hg log --hidden -G |
|
993 | $ hg log --hidden -G | |
994 | @ changeset: 3:7a230b46bf61 |
|
994 | @ changeset: 3:7a230b46bf61 | |
995 | | tag: tip |
|
995 | | tag: tip | |
996 | | parent: 0:ea207398892e |
|
996 | | parent: 0:ea207398892e | |
997 | | user: test |
|
997 | | user: test | |
998 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
998 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
999 | | summary: A2 |
|
999 | | summary: A2 | |
1000 | | |
|
1000 | | | |
1001 | | x changeset: 2:fdf9bde5129a |
|
1001 | | x changeset: 2:fdf9bde5129a | |
1002 | |/ parent: 0:ea207398892e |
|
1002 | |/ parent: 0:ea207398892e | |
1003 | | user: test |
|
1003 | | user: test | |
1004 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1004 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1005 | | summary: A1 |
|
1005 | | summary: A1 | |
1006 | | |
|
1006 | | | |
1007 | | x changeset: 1:471f378eab4c |
|
1007 | | x changeset: 1:471f378eab4c | |
1008 | |/ user: test |
|
1008 | |/ user: test | |
1009 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1009 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1010 | | summary: A0 |
|
1010 | | summary: A0 | |
1011 | | |
|
1011 | | | |
1012 | o changeset: 0:ea207398892e |
|
1012 | o changeset: 0:ea207398892e | |
1013 | user: test |
|
1013 | user: test | |
1014 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1014 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1015 | summary: ROOT |
|
1015 | summary: ROOT | |
1016 |
|
1016 | |||
1017 | $ cd $TESTTMP/templates-local-remote-markers-2 |
|
1017 | $ cd $TESTTMP/templates-local-remote-markers-2 | |
1018 | $ hg pull |
|
1018 | $ hg pull | |
1019 | pulling from $TESTTMP/templates-local-remote-markers-1 (glob) |
|
1019 | pulling from $TESTTMP/templates-local-remote-markers-1 (glob) | |
1020 | searching for changes |
|
1020 | searching for changes | |
1021 | adding changesets |
|
1021 | adding changesets | |
1022 | adding manifests |
|
1022 | adding manifests | |
1023 | adding file changes |
|
1023 | adding file changes | |
1024 | added 1 changesets with 0 changes to 1 files (+1 heads) |
|
1024 | added 1 changesets with 0 changes to 1 files (+1 heads) | |
1025 | 2 new obsolescence markers |
|
1025 | 2 new obsolescence markers | |
1026 | obsoleted 1 changesets |
|
1026 | obsoleted 1 changesets | |
1027 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
1027 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
1028 | $ hg log --hidden -G |
|
1028 | $ hg log --hidden -G | |
1029 | o changeset: 2:7a230b46bf61 |
|
1029 | o changeset: 2:7a230b46bf61 | |
1030 | | tag: tip |
|
1030 | | tag: tip | |
1031 | | parent: 0:ea207398892e |
|
1031 | | parent: 0:ea207398892e | |
1032 | | user: test |
|
1032 | | user: test | |
1033 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1033 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1034 | | summary: A2 |
|
1034 | | summary: A2 | |
1035 | | |
|
1035 | | | |
1036 | | @ changeset: 1:471f378eab4c |
|
1036 | | @ changeset: 1:471f378eab4c | |
1037 | |/ user: test |
|
1037 | |/ user: test | |
1038 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1038 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1039 | | summary: A0 |
|
1039 | | summary: A0 | |
1040 | | |
|
1040 | | | |
1041 | o changeset: 0:ea207398892e |
|
1041 | o changeset: 0:ea207398892e | |
1042 | user: test |
|
1042 | user: test | |
1043 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1043 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1044 | summary: ROOT |
|
1044 | summary: ROOT | |
1045 |
|
1045 | |||
1046 |
|
1046 | |||
1047 | $ hg debugobsolete |
|
1047 | $ hg debugobsolete | |
1048 | 471f378eab4c5e25f6c77f785b27c936efb22874 fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1048 | 471f378eab4c5e25f6c77f785b27c936efb22874 fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} | |
1049 | fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 7a230b46bf61e50b30308c6cfd7bd1269ef54702 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} |
|
1049 | fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 7a230b46bf61e50b30308c6cfd7bd1269ef54702 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} | |
1050 |
|
1050 | |||
1051 | Check templates |
|
1051 | Check templates | |
1052 | --------------- |
|
1052 | --------------- | |
1053 |
|
1053 | |||
1054 | Predecessors template should show current revision as it is the working copy |
|
1054 | Predecessors template should show current revision as it is the working copy | |
1055 | $ hg tlog |
|
1055 | $ hg tlog | |
1056 | o 7a230b46bf61 |
|
1056 | o 7a230b46bf61 | |
1057 | | Predecessors: 1:471f378eab4c |
|
1057 | | Predecessors: 1:471f378eab4c | |
1058 | | semi-colon: 1:471f378eab4c |
|
1058 | | semi-colon: 1:471f378eab4c | |
1059 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1059 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
1060 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1060 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
1061 | | @ 471f378eab4c |
|
1061 | | @ 471f378eab4c | |
1062 | |/ Successors: 2:7a230b46bf61 |
|
1062 | |/ Successors: 2:7a230b46bf61 | |
1063 | | multi-line: 2:7a230b46bf61 |
|
1063 | | multi-line: 2:7a230b46bf61 | |
1064 | | json: [["7a230b46bf61e50b30308c6cfd7bd1269ef54702"]] |
|
1064 | | json: [["7a230b46bf61e50b30308c6cfd7bd1269ef54702"]] | |
1065 | o ea207398892e |
|
1065 | o ea207398892e | |
1066 |
|
1066 | |||
1067 |
|
1067 | |||
1068 | $ hg fatelog |
|
1068 | $ hg fatelog | |
1069 | o 7a230b46bf61 |
|
1069 | o 7a230b46bf61 | |
1070 | | |
|
1070 | | | |
1071 | | @ 471f378eab4c |
|
1071 | | @ 471f378eab4c | |
1072 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); |
|
1072 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); | |
1073 | o ea207398892e |
|
1073 | o ea207398892e | |
1074 |
|
1074 | |||
1075 | $ hg up 'desc(A2)' |
|
1075 | $ hg up 'desc(A2)' | |
1076 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1076 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1077 |
|
1077 | |||
1078 | Predecessors template should show no predecessors as they are non visible |
|
1078 | Predecessors template should show no predecessors as they are non visible | |
1079 | $ hg tlog |
|
1079 | $ hg tlog | |
1080 | @ 7a230b46bf61 |
|
1080 | @ 7a230b46bf61 | |
1081 | | |
|
1081 | | | |
1082 | o ea207398892e |
|
1082 | o ea207398892e | |
1083 |
|
1083 | |||
1084 |
|
1084 | |||
1085 | $ hg fatelog |
|
1085 | $ hg fatelog | |
1086 | @ 7a230b46bf61 |
|
1086 | @ 7a230b46bf61 | |
1087 | | |
|
1087 | | | |
1088 | o ea207398892e |
|
1088 | o ea207398892e | |
1089 |
|
1089 | |||
1090 | Predecessors template should show all predecessors as we force their display |
|
1090 | Predecessors template should show all predecessors as we force their display | |
1091 | with --hidden |
|
1091 | with --hidden | |
1092 | $ hg tlog --hidden |
|
1092 | $ hg tlog --hidden | |
1093 | @ 7a230b46bf61 |
|
1093 | @ 7a230b46bf61 | |
1094 | | Predecessors: 1:471f378eab4c |
|
1094 | | Predecessors: 1:471f378eab4c | |
1095 | | semi-colon: 1:471f378eab4c |
|
1095 | | semi-colon: 1:471f378eab4c | |
1096 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1096 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
1097 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1097 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
1098 | | x 471f378eab4c |
|
1098 | | x 471f378eab4c | |
1099 | |/ Successors: 2:7a230b46bf61 |
|
1099 | |/ Successors: 2:7a230b46bf61 | |
1100 | | multi-line: 2:7a230b46bf61 |
|
1100 | | multi-line: 2:7a230b46bf61 | |
1101 | | json: [["7a230b46bf61e50b30308c6cfd7bd1269ef54702"]] |
|
1101 | | json: [["7a230b46bf61e50b30308c6cfd7bd1269ef54702"]] | |
1102 | o ea207398892e |
|
1102 | o ea207398892e | |
1103 |
|
1103 | |||
1104 |
|
1104 | |||
1105 | $ hg fatelog --hidden |
|
1105 | $ hg fatelog --hidden | |
1106 | @ 7a230b46bf61 |
|
1106 | @ 7a230b46bf61 | |
1107 | | |
|
1107 | | | |
1108 | | x 471f378eab4c |
|
1108 | | x 471f378eab4c | |
1109 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); |
|
1109 | |/ Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000); | |
1110 | o ea207398892e |
|
1110 | o ea207398892e | |
1111 |
|
1111 | |||
1112 |
|
1112 | |||
1113 | Test template with obsmarkers cycle |
|
1113 | Test template with obsmarkers cycle | |
1114 | =================================== |
|
1114 | =================================== | |
1115 |
|
1115 | |||
1116 | Test setup |
|
1116 | Test setup | |
1117 | ---------- |
|
1117 | ---------- | |
1118 |
|
1118 | |||
1119 | $ hg init $TESTTMP/templates-local-cycle |
|
1119 | $ hg init $TESTTMP/templates-local-cycle | |
1120 | $ cd $TESTTMP/templates-local-cycle |
|
1120 | $ cd $TESTTMP/templates-local-cycle | |
1121 | $ mkcommit ROOT |
|
1121 | $ mkcommit ROOT | |
1122 | $ mkcommit A0 |
|
1122 | $ mkcommit A0 | |
1123 | $ mkcommit B0 |
|
1123 | $ mkcommit B0 | |
1124 | $ hg up -r 0 |
|
1124 | $ hg up -r 0 | |
1125 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1125 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1126 | $ mkcommit C0 |
|
1126 | $ mkcommit C0 | |
1127 | created new head |
|
1127 | created new head | |
1128 |
|
1128 | |||
1129 | Create the cycle |
|
1129 | Create the cycle | |
1130 |
|
1130 | |||
1131 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(B0)"` |
|
1131 | $ hg debugobsolete `getid "desc(A0)"` `getid "desc(B0)"` | |
1132 | obsoleted 1 changesets |
|
1132 | obsoleted 1 changesets | |
1133 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"` |
|
1133 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"` | |
1134 | obsoleted 1 changesets |
|
1134 | obsoleted 1 changesets | |
1135 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(A0)"` |
|
1135 | $ hg debugobsolete `getid "desc(B0)"` `getid "desc(A0)"` | |
1136 |
|
1136 | |||
1137 | Check templates |
|
1137 | Check templates | |
1138 | --------------- |
|
1138 | --------------- | |
1139 |
|
1139 | |||
1140 | $ hg tlog |
|
1140 | $ hg tlog | |
1141 | @ f897c6137566 |
|
1141 | @ f897c6137566 | |
1142 | | |
|
1142 | | | |
1143 | o ea207398892e |
|
1143 | o ea207398892e | |
1144 |
|
1144 | |||
1145 |
|
1145 | |||
1146 | $ hg fatelog |
|
1146 | $ hg fatelog | |
1147 | @ f897c6137566 |
|
1147 | @ f897c6137566 | |
1148 | | |
|
1148 | | | |
1149 | o ea207398892e |
|
1149 | o ea207398892e | |
1150 |
|
1150 | |||
1151 |
|
1151 | |||
1152 | $ hg up -r "desc(B0)" --hidden |
|
1152 | $ hg up -r "desc(B0)" --hidden | |
1153 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1153 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1154 | $ hg tlog |
|
1154 | $ hg tlog | |
1155 | o f897c6137566 |
|
1155 | o f897c6137566 | |
1156 | | Predecessors: 2:0dec01379d3b |
|
1156 | | Predecessors: 2:0dec01379d3b | |
1157 | | semi-colon: 2:0dec01379d3b |
|
1157 | | semi-colon: 2:0dec01379d3b | |
1158 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1158 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] | |
1159 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1159 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
1160 | | @ 0dec01379d3b |
|
1160 | | @ 0dec01379d3b | |
1161 | | | Predecessors: 1:471f378eab4c |
|
1161 | | | Predecessors: 1:471f378eab4c | |
1162 | | | semi-colon: 1:471f378eab4c |
|
1162 | | | semi-colon: 1:471f378eab4c | |
1163 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1163 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
1164 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1164 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
1165 | | | Successors: 3:f897c6137566; 1:471f378eab4c |
|
1165 | | | Successors: 3:f897c6137566; 1:471f378eab4c | |
1166 | | | multi-line: 3:f897c6137566 |
|
1166 | | | multi-line: 3:f897c6137566 | |
1167 | | | multi-line: 1:471f378eab4c |
|
1167 | | | multi-line: 1:471f378eab4c | |
1168 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] |
|
1168 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] | |
1169 | | x 471f378eab4c |
|
1169 | | x 471f378eab4c | |
1170 | |/ Predecessors: 2:0dec01379d3b |
|
1170 | |/ Predecessors: 2:0dec01379d3b | |
1171 | | semi-colon: 2:0dec01379d3b |
|
1171 | | semi-colon: 2:0dec01379d3b | |
1172 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1172 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] | |
1173 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1173 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
1174 | | Successors: 2:0dec01379d3b |
|
1174 | | Successors: 2:0dec01379d3b | |
1175 | | multi-line: 2:0dec01379d3b |
|
1175 | | multi-line: 2:0dec01379d3b | |
1176 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] |
|
1176 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] | |
1177 | o ea207398892e |
|
1177 | o ea207398892e | |
1178 |
|
1178 | |||
1179 |
|
1179 | |||
1180 | $ hg fatelog |
|
1180 | $ hg fatelog | |
1181 | o f897c6137566 |
|
1181 | o f897c6137566 | |
1182 | | |
|
1182 | | | |
1183 | | @ 0dec01379d3b |
|
1183 | | @ 0dec01379d3b | |
1184 | | | Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000); rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000); |
|
1184 | | | Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000); rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000); | |
1185 | | x 471f378eab4c |
|
1185 | | x 471f378eab4c | |
1186 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000); |
|
1186 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000); | |
1187 | o ea207398892e |
|
1187 | o ea207398892e | |
1188 |
|
1188 | |||
1189 |
|
1189 | |||
1190 | $ hg up -r "desc(A0)" --hidden |
|
1190 | $ hg up -r "desc(A0)" --hidden | |
1191 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1191 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1192 | $ hg tlog |
|
1192 | $ hg tlog | |
1193 | o f897c6137566 |
|
1193 | o f897c6137566 | |
1194 | | Predecessors: 1:471f378eab4c |
|
1194 | | Predecessors: 1:471f378eab4c | |
1195 | | semi-colon: 1:471f378eab4c |
|
1195 | | semi-colon: 1:471f378eab4c | |
1196 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1196 | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
1197 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1197 | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
1198 | | @ 471f378eab4c |
|
1198 | | @ 471f378eab4c | |
1199 | |/ |
|
1199 | |/ | |
1200 | o ea207398892e |
|
1200 | o ea207398892e | |
1201 |
|
1201 | |||
1202 |
|
1202 | |||
1203 | $ hg fatelog |
|
1203 | $ hg fatelog | |
1204 | o f897c6137566 |
|
1204 | o f897c6137566 | |
1205 | | |
|
1205 | | | |
1206 | | @ 471f378eab4c |
|
1206 | | @ 471f378eab4c | |
1207 | |/ Obsfate: pruned; |
|
1207 | |/ Obsfate: pruned; | |
1208 | o ea207398892e |
|
1208 | o ea207398892e | |
1209 |
|
1209 | |||
1210 |
|
1210 | |||
1211 | $ hg up -r "desc(ROOT)" --hidden |
|
1211 | $ hg up -r "desc(ROOT)" --hidden | |
1212 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1212 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1213 | $ hg tlog |
|
1213 | $ hg tlog | |
1214 | o f897c6137566 |
|
1214 | o f897c6137566 | |
1215 | | |
|
1215 | | | |
1216 | @ ea207398892e |
|
1216 | @ ea207398892e | |
1217 |
|
1217 | |||
1218 |
|
1218 | |||
1219 | $ hg fatelog |
|
1219 | $ hg fatelog | |
1220 | o f897c6137566 |
|
1220 | o f897c6137566 | |
1221 | | |
|
1221 | | | |
1222 | @ ea207398892e |
|
1222 | @ ea207398892e | |
1223 |
|
1223 | |||
1224 |
|
1224 | |||
1225 | $ hg tlog --hidden |
|
1225 | $ hg tlog --hidden | |
1226 | o f897c6137566 |
|
1226 | o f897c6137566 | |
1227 | | Predecessors: 2:0dec01379d3b |
|
1227 | | Predecessors: 2:0dec01379d3b | |
1228 | | semi-colon: 2:0dec01379d3b |
|
1228 | | semi-colon: 2:0dec01379d3b | |
1229 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1229 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] | |
1230 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1230 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
1231 | | x 0dec01379d3b |
|
1231 | | x 0dec01379d3b | |
1232 | | | Predecessors: 1:471f378eab4c |
|
1232 | | | Predecessors: 1:471f378eab4c | |
1233 | | | semi-colon: 1:471f378eab4c |
|
1233 | | | semi-colon: 1:471f378eab4c | |
1234 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1234 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
1235 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1235 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
1236 | | | Successors: 3:f897c6137566; 1:471f378eab4c |
|
1236 | | | Successors: 3:f897c6137566; 1:471f378eab4c | |
1237 | | | multi-line: 3:f897c6137566 |
|
1237 | | | multi-line: 3:f897c6137566 | |
1238 | | | multi-line: 1:471f378eab4c |
|
1238 | | | multi-line: 1:471f378eab4c | |
1239 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] |
|
1239 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] | |
1240 | | x 471f378eab4c |
|
1240 | | x 471f378eab4c | |
1241 | |/ Predecessors: 2:0dec01379d3b |
|
1241 | |/ Predecessors: 2:0dec01379d3b | |
1242 | | semi-colon: 2:0dec01379d3b |
|
1242 | | semi-colon: 2:0dec01379d3b | |
1243 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1243 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] | |
1244 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1244 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
1245 | | Successors: 2:0dec01379d3b |
|
1245 | | Successors: 2:0dec01379d3b | |
1246 | | multi-line: 2:0dec01379d3b |
|
1246 | | multi-line: 2:0dec01379d3b | |
1247 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] |
|
1247 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] | |
1248 | @ ea207398892e |
|
1248 | @ ea207398892e | |
1249 |
|
1249 | |||
1250 | Test template with split + divergence with cycles |
|
1250 | Test template with split + divergence with cycles | |
1251 | ================================================= |
|
1251 | ================================================= | |
1252 |
|
1252 | |||
1253 | $ hg log -G |
|
1253 | $ hg log -G | |
1254 | o changeset: 3:f897c6137566 |
|
1254 | o changeset: 3:f897c6137566 | |
1255 | | tag: tip |
|
1255 | | tag: tip | |
1256 | | parent: 0:ea207398892e |
|
1256 | | parent: 0:ea207398892e | |
1257 | | user: test |
|
1257 | | user: test | |
1258 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1258 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1259 | | summary: C0 |
|
1259 | | summary: C0 | |
1260 | | |
|
1260 | | | |
1261 | @ changeset: 0:ea207398892e |
|
1261 | @ changeset: 0:ea207398892e | |
1262 | user: test |
|
1262 | user: test | |
1263 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1263 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1264 | summary: ROOT |
|
1264 | summary: ROOT | |
1265 |
|
1265 | |||
1266 | $ hg up |
|
1266 | $ hg up | |
1267 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1267 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1268 |
|
1268 | |||
1269 | Create a commit with three files |
|
1269 | Create a commit with three files | |
1270 | $ touch A B C |
|
1270 | $ touch A B C | |
1271 | $ hg commit -A -m "Add A,B,C" A B C |
|
1271 | $ hg commit -A -m "Add A,B,C" A B C | |
1272 |
|
1272 | |||
1273 | Split it |
|
1273 | Split it | |
1274 | $ hg up 3 |
|
1274 | $ hg up 3 | |
1275 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
1275 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
1276 | $ touch A |
|
1276 | $ touch A | |
1277 | $ hg commit -A -m "Add A,B,C" A |
|
1277 | $ hg commit -A -m "Add A,B,C" A | |
1278 | created new head |
|
1278 | created new head | |
1279 |
|
1279 | |||
1280 | $ touch B |
|
1280 | $ touch B | |
1281 | $ hg commit -A -m "Add A,B,C" B |
|
1281 | $ hg commit -A -m "Add A,B,C" B | |
1282 |
|
1282 | |||
1283 | $ touch C |
|
1283 | $ touch C | |
1284 | $ hg commit -A -m "Add A,B,C" C |
|
1284 | $ hg commit -A -m "Add A,B,C" C | |
1285 |
|
1285 | |||
1286 | $ hg log -G |
|
1286 | $ hg log -G | |
1287 | @ changeset: 7:ba2ed02b0c9a |
|
1287 | @ changeset: 7:ba2ed02b0c9a | |
1288 | | tag: tip |
|
1288 | | tag: tip | |
1289 | | user: test |
|
1289 | | user: test | |
1290 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1290 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1291 | | summary: Add A,B,C |
|
1291 | | summary: Add A,B,C | |
1292 | | |
|
1292 | | | |
1293 | o changeset: 6:4a004186e638 |
|
1293 | o changeset: 6:4a004186e638 | |
1294 | | user: test |
|
1294 | | user: test | |
1295 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1295 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1296 | | summary: Add A,B,C |
|
1296 | | summary: Add A,B,C | |
1297 | | |
|
1297 | | | |
1298 | o changeset: 5:dd800401bd8c |
|
1298 | o changeset: 5:dd800401bd8c | |
1299 | | parent: 3:f897c6137566 |
|
1299 | | parent: 3:f897c6137566 | |
1300 | | user: test |
|
1300 | | user: test | |
1301 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1301 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1302 | | summary: Add A,B,C |
|
1302 | | summary: Add A,B,C | |
1303 | | |
|
1303 | | | |
1304 | | o changeset: 4:9bd10a0775e4 |
|
1304 | | o changeset: 4:9bd10a0775e4 | |
1305 | |/ user: test |
|
1305 | |/ user: test | |
1306 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1306 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1307 | | summary: Add A,B,C |
|
1307 | | summary: Add A,B,C | |
1308 | | |
|
1308 | | | |
1309 | o changeset: 3:f897c6137566 |
|
1309 | o changeset: 3:f897c6137566 | |
1310 | | parent: 0:ea207398892e |
|
1310 | | parent: 0:ea207398892e | |
1311 | | user: test |
|
1311 | | user: test | |
1312 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1312 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1313 | | summary: C0 |
|
1313 | | summary: C0 | |
1314 | | |
|
1314 | | | |
1315 | o changeset: 0:ea207398892e |
|
1315 | o changeset: 0:ea207398892e | |
1316 | user: test |
|
1316 | user: test | |
1317 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1317 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1318 | summary: ROOT |
|
1318 | summary: ROOT | |
1319 |
|
1319 | |||
1320 | $ hg debugobsolete `getid "4"` `getid "5"` `getid "6"` `getid "7"` |
|
1320 | $ hg debugobsolete `getid "4"` `getid "5"` `getid "6"` `getid "7"` | |
1321 | obsoleted 1 changesets |
|
1321 | obsoleted 1 changesets | |
1322 | $ hg log -G |
|
1322 | $ hg log -G | |
1323 | @ changeset: 7:ba2ed02b0c9a |
|
1323 | @ changeset: 7:ba2ed02b0c9a | |
1324 | | tag: tip |
|
1324 | | tag: tip | |
1325 | | user: test |
|
1325 | | user: test | |
1326 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1326 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1327 | | summary: Add A,B,C |
|
1327 | | summary: Add A,B,C | |
1328 | | |
|
1328 | | | |
1329 | o changeset: 6:4a004186e638 |
|
1329 | o changeset: 6:4a004186e638 | |
1330 | | user: test |
|
1330 | | user: test | |
1331 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1331 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1332 | | summary: Add A,B,C |
|
1332 | | summary: Add A,B,C | |
1333 | | |
|
1333 | | | |
1334 | o changeset: 5:dd800401bd8c |
|
1334 | o changeset: 5:dd800401bd8c | |
1335 | | parent: 3:f897c6137566 |
|
1335 | | parent: 3:f897c6137566 | |
1336 | | user: test |
|
1336 | | user: test | |
1337 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1337 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1338 | | summary: Add A,B,C |
|
1338 | | summary: Add A,B,C | |
1339 | | |
|
1339 | | | |
1340 | o changeset: 3:f897c6137566 |
|
1340 | o changeset: 3:f897c6137566 | |
1341 | | parent: 0:ea207398892e |
|
1341 | | parent: 0:ea207398892e | |
1342 | | user: test |
|
1342 | | user: test | |
1343 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1343 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1344 | | summary: C0 |
|
1344 | | summary: C0 | |
1345 | | |
|
1345 | | | |
1346 | o changeset: 0:ea207398892e |
|
1346 | o changeset: 0:ea207398892e | |
1347 | user: test |
|
1347 | user: test | |
1348 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1348 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1349 | summary: ROOT |
|
1349 | summary: ROOT | |
1350 |
|
1350 | |||
1351 | Diverge one of the splitted commit |
|
1351 | Diverge one of the splitted commit | |
1352 |
|
1352 | |||
1353 | $ hg up 6 |
|
1353 | $ hg up 6 | |
1354 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1354 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1355 | $ hg commit --amend -m "Add only B" |
|
1355 | $ hg commit --amend -m "Add only B" | |
1356 |
|
1356 | |||
1357 | $ hg up 6 --hidden |
|
1357 | $ hg up 6 --hidden | |
1358 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1358 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1359 | $ hg commit --amend -m "Add B only" |
|
1359 | $ hg commit --amend -m "Add B only" | |
1360 |
|
1360 | |||
1361 | $ hg log -G |
|
1361 | $ hg log -G | |
1362 | @ changeset: 9:0b997eb7ceee |
|
1362 | @ changeset: 9:0b997eb7ceee | |
1363 | | tag: tip |
|
1363 | | tag: tip | |
1364 | | parent: 5:dd800401bd8c |
|
1364 | | parent: 5:dd800401bd8c | |
1365 | | user: test |
|
1365 | | user: test | |
1366 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1366 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1367 | | instability: content-divergent |
|
1367 | | instability: content-divergent | |
1368 | | summary: Add B only |
|
1368 | | summary: Add B only | |
1369 | | |
|
1369 | | | |
1370 | | o changeset: 8:b18bc8331526 |
|
1370 | | o changeset: 8:b18bc8331526 | |
1371 | |/ parent: 5:dd800401bd8c |
|
1371 | |/ parent: 5:dd800401bd8c | |
1372 | | user: test |
|
1372 | | user: test | |
1373 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1373 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1374 | | instability: content-divergent |
|
1374 | | instability: content-divergent | |
1375 | | summary: Add only B |
|
1375 | | summary: Add only B | |
1376 | | |
|
1376 | | | |
1377 | | o changeset: 7:ba2ed02b0c9a |
|
1377 | | o changeset: 7:ba2ed02b0c9a | |
1378 | | | user: test |
|
1378 | | | user: test | |
1379 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1379 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1380 | | | instability: orphan, content-divergent |
|
1380 | | | instability: orphan, content-divergent | |
1381 | | | summary: Add A,B,C |
|
1381 | | | summary: Add A,B,C | |
1382 | | | |
|
1382 | | | | |
1383 | | x changeset: 6:4a004186e638 |
|
1383 | | x changeset: 6:4a004186e638 | |
1384 | |/ user: test |
|
1384 | |/ user: test | |
1385 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1385 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1386 | | summary: Add A,B,C |
|
1386 | | summary: Add A,B,C | |
1387 | | |
|
1387 | | | |
1388 | o changeset: 5:dd800401bd8c |
|
1388 | o changeset: 5:dd800401bd8c | |
1389 | | parent: 3:f897c6137566 |
|
1389 | | parent: 3:f897c6137566 | |
1390 | | user: test |
|
1390 | | user: test | |
1391 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1391 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1392 | | instability: content-divergent |
|
1392 | | instability: content-divergent | |
1393 | | summary: Add A,B,C |
|
1393 | | summary: Add A,B,C | |
1394 | | |
|
1394 | | | |
1395 | o changeset: 3:f897c6137566 |
|
1395 | o changeset: 3:f897c6137566 | |
1396 | | parent: 0:ea207398892e |
|
1396 | | parent: 0:ea207398892e | |
1397 | | user: test |
|
1397 | | user: test | |
1398 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1398 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1399 | | summary: C0 |
|
1399 | | summary: C0 | |
1400 | | |
|
1400 | | | |
1401 | o changeset: 0:ea207398892e |
|
1401 | o changeset: 0:ea207398892e | |
1402 | user: test |
|
1402 | user: test | |
1403 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1403 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1404 | summary: ROOT |
|
1404 | summary: ROOT | |
1405 |
|
1405 | |||
1406 |
|
1406 | |||
1407 | Check templates |
|
1407 | Check templates | |
1408 | --------------- |
|
1408 | --------------- | |
1409 |
|
1409 | |||
1410 | $ hg tlog |
|
1410 | $ hg tlog | |
1411 | @ 0b997eb7ceee |
|
1411 | @ 0b997eb7ceee | |
1412 | | Predecessors: 6:4a004186e638 |
|
1412 | | Predecessors: 6:4a004186e638 | |
1413 | | semi-colon: 6:4a004186e638 |
|
1413 | | semi-colon: 6:4a004186e638 | |
1414 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1414 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] | |
1415 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1415 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace | |
1416 | | o b18bc8331526 |
|
1416 | | o b18bc8331526 | |
1417 | |/ Predecessors: 6:4a004186e638 |
|
1417 | |/ Predecessors: 6:4a004186e638 | |
1418 | | semi-colon: 6:4a004186e638 |
|
1418 | | semi-colon: 6:4a004186e638 | |
1419 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1419 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] | |
1420 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1420 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace | |
1421 | | o ba2ed02b0c9a |
|
1421 | | o ba2ed02b0c9a | |
1422 | | | |
|
1422 | | | | |
1423 | | x 4a004186e638 |
|
1423 | | x 4a004186e638 | |
1424 | |/ Successors: 8:b18bc8331526; 9:0b997eb7ceee |
|
1424 | |/ Successors: 8:b18bc8331526; 9:0b997eb7ceee | |
1425 | | multi-line: 8:b18bc8331526 |
|
1425 | | multi-line: 8:b18bc8331526 | |
1426 | | multi-line: 9:0b997eb7ceee |
|
1426 | | multi-line: 9:0b997eb7ceee | |
1427 | | json: [["b18bc8331526a22cbb1801022bd1555bf291c48b"], ["0b997eb7ceeee06200a02f8aab185979092d514e"]] |
|
1427 | | json: [["b18bc8331526a22cbb1801022bd1555bf291c48b"], ["0b997eb7ceeee06200a02f8aab185979092d514e"]] | |
1428 | o dd800401bd8c |
|
1428 | o dd800401bd8c | |
1429 | | |
|
1429 | | | |
1430 | o f897c6137566 |
|
1430 | o f897c6137566 | |
1431 | | |
|
1431 | | | |
1432 | o ea207398892e |
|
1432 | o ea207398892e | |
1433 |
|
1433 | |||
1434 | $ hg fatelog |
|
1434 | $ hg fatelog | |
1435 | @ 0b997eb7ceee |
|
1435 | @ 0b997eb7ceee | |
1436 | | |
|
1436 | | | |
1437 | | o b18bc8331526 |
|
1437 | | o b18bc8331526 | |
1438 | |/ |
|
1438 | |/ | |
1439 | | o ba2ed02b0c9a |
|
1439 | | o ba2ed02b0c9a | |
1440 | | | |
|
1440 | | | | |
1441 | | x 4a004186e638 |
|
1441 | | x 4a004186e638 | |
1442 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000); |
|
1442 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000); | |
1443 | o dd800401bd8c |
|
1443 | o dd800401bd8c | |
1444 | | |
|
1444 | | | |
1445 | o f897c6137566 |
|
1445 | o f897c6137566 | |
1446 | | |
|
1446 | | | |
1447 | o ea207398892e |
|
1447 | o ea207398892e | |
1448 |
|
1448 | |||
1449 | $ hg tlog --hidden |
|
1449 | $ hg tlog --hidden | |
1450 | @ 0b997eb7ceee |
|
1450 | @ 0b997eb7ceee | |
1451 | | Predecessors: 6:4a004186e638 |
|
1451 | | Predecessors: 6:4a004186e638 | |
1452 | | semi-colon: 6:4a004186e638 |
|
1452 | | semi-colon: 6:4a004186e638 | |
1453 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1453 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] | |
1454 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1454 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace | |
1455 | | o b18bc8331526 |
|
1455 | | o b18bc8331526 | |
1456 | |/ Predecessors: 6:4a004186e638 |
|
1456 | |/ Predecessors: 6:4a004186e638 | |
1457 | | semi-colon: 6:4a004186e638 |
|
1457 | | semi-colon: 6:4a004186e638 | |
1458 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] |
|
1458 | | json: ["4a004186e63889f20cb16434fcbd72220bd1eace"] | |
1459 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace |
|
1459 | | map: 6:4a004186e63889f20cb16434fcbd72220bd1eace | |
1460 | | o ba2ed02b0c9a |
|
1460 | | o ba2ed02b0c9a | |
1461 | | | Predecessors: 4:9bd10a0775e4 |
|
1461 | | | Predecessors: 4:9bd10a0775e4 | |
1462 | | | semi-colon: 4:9bd10a0775e4 |
|
1462 | | | semi-colon: 4:9bd10a0775e4 | |
1463 | | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1463 | | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1464 | | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1464 | | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1465 | | x 4a004186e638 |
|
1465 | | x 4a004186e638 | |
1466 | |/ Predecessors: 4:9bd10a0775e4 |
|
1466 | |/ Predecessors: 4:9bd10a0775e4 | |
1467 | | semi-colon: 4:9bd10a0775e4 |
|
1467 | | semi-colon: 4:9bd10a0775e4 | |
1468 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1468 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1469 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1469 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1470 | | Successors: 8:b18bc8331526; 9:0b997eb7ceee |
|
1470 | | Successors: 8:b18bc8331526; 9:0b997eb7ceee | |
1471 | | multi-line: 8:b18bc8331526 |
|
1471 | | multi-line: 8:b18bc8331526 | |
1472 | | multi-line: 9:0b997eb7ceee |
|
1472 | | multi-line: 9:0b997eb7ceee | |
1473 | | json: [["b18bc8331526a22cbb1801022bd1555bf291c48b"], ["0b997eb7ceeee06200a02f8aab185979092d514e"]] |
|
1473 | | json: [["b18bc8331526a22cbb1801022bd1555bf291c48b"], ["0b997eb7ceeee06200a02f8aab185979092d514e"]] | |
1474 | o dd800401bd8c |
|
1474 | o dd800401bd8c | |
1475 | | Predecessors: 4:9bd10a0775e4 |
|
1475 | | Predecessors: 4:9bd10a0775e4 | |
1476 | | semi-colon: 4:9bd10a0775e4 |
|
1476 | | semi-colon: 4:9bd10a0775e4 | |
1477 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1477 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1478 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1478 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1479 | | x 9bd10a0775e4 |
|
1479 | | x 9bd10a0775e4 | |
1480 | |/ Successors: 5:dd800401bd8c 6:4a004186e638 7:ba2ed02b0c9a |
|
1480 | |/ Successors: 5:dd800401bd8c 6:4a004186e638 7:ba2ed02b0c9a | |
1481 | | multi-line: 5:dd800401bd8c 6:4a004186e638 7:ba2ed02b0c9a |
|
1481 | | multi-line: 5:dd800401bd8c 6:4a004186e638 7:ba2ed02b0c9a | |
1482 | | json: [["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"]] |
|
1482 | | json: [["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"]] | |
1483 | o f897c6137566 |
|
1483 | o f897c6137566 | |
1484 | | Predecessors: 2:0dec01379d3b |
|
1484 | | Predecessors: 2:0dec01379d3b | |
1485 | | semi-colon: 2:0dec01379d3b |
|
1485 | | semi-colon: 2:0dec01379d3b | |
1486 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1486 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] | |
1487 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1487 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
1488 | | x 0dec01379d3b |
|
1488 | | x 0dec01379d3b | |
1489 | | | Predecessors: 1:471f378eab4c |
|
1489 | | | Predecessors: 1:471f378eab4c | |
1490 | | | semi-colon: 1:471f378eab4c |
|
1490 | | | semi-colon: 1:471f378eab4c | |
1491 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] |
|
1491 | | | json: ["471f378eab4c5e25f6c77f785b27c936efb22874"] | |
1492 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 |
|
1492 | | | map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 | |
1493 | | | Successors: 3:f897c6137566; 1:471f378eab4c |
|
1493 | | | Successors: 3:f897c6137566; 1:471f378eab4c | |
1494 | | | multi-line: 3:f897c6137566 |
|
1494 | | | multi-line: 3:f897c6137566 | |
1495 | | | multi-line: 1:471f378eab4c |
|
1495 | | | multi-line: 1:471f378eab4c | |
1496 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] |
|
1496 | | | json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]] | |
1497 | | x 471f378eab4c |
|
1497 | | x 471f378eab4c | |
1498 | |/ Predecessors: 2:0dec01379d3b |
|
1498 | |/ Predecessors: 2:0dec01379d3b | |
1499 | | semi-colon: 2:0dec01379d3b |
|
1499 | | semi-colon: 2:0dec01379d3b | |
1500 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] |
|
1500 | | json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"] | |
1501 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 |
|
1501 | | map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 | |
1502 | | Successors: 2:0dec01379d3b |
|
1502 | | Successors: 2:0dec01379d3b | |
1503 | | multi-line: 2:0dec01379d3b |
|
1503 | | multi-line: 2:0dec01379d3b | |
1504 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] |
|
1504 | | json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]] | |
1505 | o ea207398892e |
|
1505 | o ea207398892e | |
1506 |
|
1506 | |||
1507 | $ hg fatelog --hidden |
|
1507 | $ hg fatelog --hidden | |
1508 | @ 0b997eb7ceee |
|
1508 | @ 0b997eb7ceee | |
1509 | | |
|
1509 | | | |
1510 | | o b18bc8331526 |
|
1510 | | o b18bc8331526 | |
1511 | |/ |
|
1511 | |/ | |
1512 | | o ba2ed02b0c9a |
|
1512 | | o ba2ed02b0c9a | |
1513 | | | |
|
1513 | | | | |
1514 | | x 4a004186e638 |
|
1514 | | x 4a004186e638 | |
1515 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000); |
|
1515 | |/ Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000); | |
1516 | o dd800401bd8c |
|
1516 | o dd800401bd8c | |
1517 | | |
|
1517 | | | |
1518 | | x 9bd10a0775e4 |
|
1518 | | x 9bd10a0775e4 | |
1519 | |/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a by test (at 1970-01-01 00:00 +0000); |
|
1519 | |/ Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a by test (at 1970-01-01 00:00 +0000); | |
1520 | o f897c6137566 |
|
1520 | o f897c6137566 | |
1521 | | |
|
1521 | | | |
1522 | | x 0dec01379d3b |
|
1522 | | x 0dec01379d3b | |
1523 | | | Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000); rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000); |
|
1523 | | | Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000); rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000); | |
1524 | | x 471f378eab4c |
|
1524 | | x 471f378eab4c | |
1525 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000); |
|
1525 | |/ Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000); | |
1526 | o ea207398892e |
|
1526 | o ea207398892e | |
1527 |
|
1527 | |||
1528 | $ hg fatelogjson --hidden |
|
1528 | $ hg fatelogjson --hidden | |
1529 | @ 0b997eb7ceee |
|
1529 | @ 0b997eb7ceee | |
1530 | | |
|
1530 | | | |
1531 | | o b18bc8331526 |
|
1531 | | o b18bc8331526 | |
1532 | |/ |
|
1532 | |/ | |
1533 | | o ba2ed02b0c9a |
|
1533 | | o ba2ed02b0c9a | |
1534 | | | |
|
1534 | | | | |
1535 | | x 4a004186e638 |
|
1535 | | x 4a004186e638 | |
1536 | |/ Obsfate: [{"markers": [["4a004186e63889f20cb16434fcbd72220bd1eace", ["b18bc8331526a22cbb1801022bd1555bf291c48b"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["b18bc8331526a22cbb1801022bd1555bf291c48b"]}, {"markers": [["4a004186e63889f20cb16434fcbd72220bd1eace", ["0b997eb7ceeee06200a02f8aab185979092d514e"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["0b997eb7ceeee06200a02f8aab185979092d514e"]}] |
|
1536 | |/ Obsfate: [{"markers": [["4a004186e63889f20cb16434fcbd72220bd1eace", ["b18bc8331526a22cbb1801022bd1555bf291c48b"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["b18bc8331526a22cbb1801022bd1555bf291c48b"]}, {"markers": [["4a004186e63889f20cb16434fcbd72220bd1eace", ["0b997eb7ceeee06200a02f8aab185979092d514e"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["0b997eb7ceeee06200a02f8aab185979092d514e"]}] | |
1537 | o dd800401bd8c |
|
1537 | o dd800401bd8c | |
1538 | | |
|
1538 | | | |
1539 | | x 9bd10a0775e4 |
|
1539 | | x 9bd10a0775e4 | |
1540 | |/ Obsfate: [{"markers": [["9bd10a0775e478708cada5f176ec6de654359ce7", ["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"]}] |
|
1540 | |/ Obsfate: [{"markers": [["9bd10a0775e478708cada5f176ec6de654359ce7", ["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"]}] | |
1541 | o f897c6137566 |
|
1541 | o f897c6137566 | |
1542 | | |
|
1542 | | | |
1543 | | x 0dec01379d3b |
|
1543 | | x 0dec01379d3b | |
1544 | | | Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["f897c6137566320b081514b4c7227ecc3d384b39"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["f897c6137566320b081514b4c7227ecc3d384b39"]}, {"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["471f378eab4c5e25f6c77f785b27c936efb22874"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["471f378eab4c5e25f6c77f785b27c936efb22874"]}] |
|
1544 | | | Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["f897c6137566320b081514b4c7227ecc3d384b39"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["f897c6137566320b081514b4c7227ecc3d384b39"]}, {"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["471f378eab4c5e25f6c77f785b27c936efb22874"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["471f378eab4c5e25f6c77f785b27c936efb22874"]}] | |
1545 | | x 471f378eab4c |
|
1545 | | x 471f378eab4c | |
1546 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]}] |
|
1546 | |/ Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]}] | |
1547 | o ea207398892e |
|
1547 | o ea207398892e | |
1548 |
|
1548 | |||
1549 | $ hg up --hidden 4 |
|
1549 | $ hg up --hidden 4 | |
1550 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1550 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1551 | $ hg rebase -r 7 -d 8 --config extensions.rebase= |
|
1551 | $ hg rebase -r 7 -d 8 --config extensions.rebase= | |
1552 | rebasing 7:ba2ed02b0c9a "Add A,B,C" |
|
1552 | rebasing 7:ba2ed02b0c9a "Add A,B,C" | |
1553 | $ hg tlog |
|
1553 | $ hg tlog | |
1554 | o eceed8f98ffc |
|
1554 | o eceed8f98ffc | |
1555 | | Predecessors: 4:9bd10a0775e4 |
|
1555 | | Predecessors: 4:9bd10a0775e4 | |
1556 | | semi-colon: 4:9bd10a0775e4 |
|
1556 | | semi-colon: 4:9bd10a0775e4 | |
1557 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1557 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1558 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1558 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1559 | | o 0b997eb7ceee |
|
1559 | | o 0b997eb7ceee | |
1560 | | | Predecessors: 4:9bd10a0775e4 |
|
1560 | | | Predecessors: 4:9bd10a0775e4 | |
1561 | | | semi-colon: 4:9bd10a0775e4 |
|
1561 | | | semi-colon: 4:9bd10a0775e4 | |
1562 | | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1562 | | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1563 | | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1563 | | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1564 | o | b18bc8331526 |
|
1564 | o | b18bc8331526 | |
1565 | |/ Predecessors: 4:9bd10a0775e4 |
|
1565 | |/ Predecessors: 4:9bd10a0775e4 | |
1566 | | semi-colon: 4:9bd10a0775e4 |
|
1566 | | semi-colon: 4:9bd10a0775e4 | |
1567 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1567 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1568 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1568 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1569 | o dd800401bd8c |
|
1569 | o dd800401bd8c | |
1570 | | Predecessors: 4:9bd10a0775e4 |
|
1570 | | Predecessors: 4:9bd10a0775e4 | |
1571 | | semi-colon: 4:9bd10a0775e4 |
|
1571 | | semi-colon: 4:9bd10a0775e4 | |
1572 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] |
|
1572 | | json: ["9bd10a0775e478708cada5f176ec6de654359ce7"] | |
1573 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 |
|
1573 | | map: 4:9bd10a0775e478708cada5f176ec6de654359ce7 | |
1574 | | @ 9bd10a0775e4 |
|
1574 | | @ 9bd10a0775e4 | |
1575 | |/ Successors: 5:dd800401bd8c 9:0b997eb7ceee 10:eceed8f98ffc; 5:dd800401bd8c 8:b18bc8331526 10:eceed8f98ffc |
|
1575 | |/ Successors: 5:dd800401bd8c 9:0b997eb7ceee 10:eceed8f98ffc; 5:dd800401bd8c 8:b18bc8331526 10:eceed8f98ffc | |
1576 | | multi-line: 5:dd800401bd8c 9:0b997eb7ceee 10:eceed8f98ffc |
|
1576 | | multi-line: 5:dd800401bd8c 9:0b997eb7ceee 10:eceed8f98ffc | |
1577 | | multi-line: 5:dd800401bd8c 8:b18bc8331526 10:eceed8f98ffc |
|
1577 | | multi-line: 5:dd800401bd8c 8:b18bc8331526 10:eceed8f98ffc | |
1578 | | json: [["dd800401bd8c79d815329277739e433e883f784e", "0b997eb7ceeee06200a02f8aab185979092d514e", "eceed8f98ffc4186032e29a6542ab98888ebf68d"], ["dd800401bd8c79d815329277739e433e883f784e", "b18bc8331526a22cbb1801022bd1555bf291c48b", "eceed8f98ffc4186032e29a6542ab98888ebf68d"]] |
|
1578 | | json: [["dd800401bd8c79d815329277739e433e883f784e", "0b997eb7ceeee06200a02f8aab185979092d514e", "eceed8f98ffc4186032e29a6542ab98888ebf68d"], ["dd800401bd8c79d815329277739e433e883f784e", "b18bc8331526a22cbb1801022bd1555bf291c48b", "eceed8f98ffc4186032e29a6542ab98888ebf68d"]] | |
1579 | o f897c6137566 |
|
1579 | o f897c6137566 | |
1580 | | |
|
1580 | | | |
1581 | o ea207398892e |
|
1581 | o ea207398892e | |
1582 |
|
1582 | |||
1583 |
|
1583 | |||
1584 | $ hg fatelog |
|
1584 | $ hg fatelog | |
1585 | o eceed8f98ffc |
|
1585 | o eceed8f98ffc | |
1586 | | |
|
1586 | | | |
1587 | | o 0b997eb7ceee |
|
1587 | | o 0b997eb7ceee | |
1588 | | | |
|
1588 | | | | |
1589 | o | b18bc8331526 |
|
1589 | o | b18bc8331526 | |
1590 | |/ |
|
1590 | |/ | |
1591 | o dd800401bd8c |
|
1591 | o dd800401bd8c | |
1592 | | |
|
1592 | | | |
1593 | | @ 9bd10a0775e4 |
|
1593 | | @ 9bd10a0775e4 | |
1594 | |/ Obsfate: split using amend, rebase as 5:dd800401bd8c, 9:0b997eb7ceee, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); split using amend, rebase as 5:dd800401bd8c, 8:b18bc8331526, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); |
|
1594 | |/ Obsfate: split using amend, rebase as 5:dd800401bd8c, 9:0b997eb7ceee, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); split using amend, rebase as 5:dd800401bd8c, 8:b18bc8331526, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); | |
1595 | o f897c6137566 |
|
1595 | o f897c6137566 | |
1596 | | |
|
1596 | | | |
1597 | o ea207398892e |
|
1597 | o ea207398892e | |
1598 |
|
1598 | |||
1599 | Test templates with pruned commits |
|
1599 | Test templates with pruned commits | |
1600 | ================================== |
|
1600 | ================================== | |
1601 |
|
1601 | |||
1602 | Test setup |
|
1602 | Test setup | |
1603 | ---------- |
|
1603 | ---------- | |
1604 |
|
1604 | |||
1605 | $ hg init $TESTTMP/templates-local-prune |
|
1605 | $ hg init $TESTTMP/templates-local-prune | |
1606 | $ cd $TESTTMP/templates-local-prune |
|
1606 | $ cd $TESTTMP/templates-local-prune | |
1607 | $ mkcommit ROOT |
|
1607 | $ mkcommit ROOT | |
1608 | $ mkcommit A0 |
|
1608 | $ mkcommit A0 | |
1609 | $ hg debugobsolete --record-parent `getid "."` |
|
1609 | $ hg debugobsolete --record-parent `getid "."` | |
1610 | obsoleted 1 changesets |
|
1610 | obsoleted 1 changesets | |
1611 |
|
1611 | |||
1612 | Check output |
|
1612 | Check output | |
1613 | ------------ |
|
1613 | ------------ | |
1614 |
|
1614 | |||
1615 | $ hg up "desc(A0)" --hidden |
|
1615 | $ hg up "desc(A0)" --hidden | |
1616 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1616 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1617 | $ hg tlog |
|
1617 | $ hg tlog | |
1618 | @ 471f378eab4c |
|
1618 | @ 471f378eab4c | |
1619 | | |
|
1619 | | | |
1620 | o ea207398892e |
|
1620 | o ea207398892e | |
1621 |
|
1621 | |||
1622 | $ hg fatelog |
|
1622 | $ hg fatelog | |
1623 | @ 471f378eab4c |
|
1623 | @ 471f378eab4c | |
1624 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
1624 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); | |
1625 | o ea207398892e |
|
1625 | o ea207398892e | |
1626 |
|
1626 | |||
1627 | $ hg fatelog -v |
|
1627 | $ hg fatelog -v | |
1628 | @ 471f378eab4c |
|
1628 | @ 471f378eab4c | |
1629 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
1629 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); | |
1630 | o ea207398892e |
|
1630 | o ea207398892e | |
1631 |
|
1631 | |||
1632 | Test templates with multiple pruned commits |
|
1632 | Test templates with multiple pruned commits | |
1633 | =========================================== |
|
1633 | =========================================== | |
1634 |
|
1634 | |||
1635 | Test setup |
|
1635 | Test setup | |
1636 | ---------- |
|
1636 | ---------- | |
1637 |
|
1637 | |||
1638 | $ hg init $TESTTMP/multiple-local-prune |
|
1638 | $ hg init $TESTTMP/multiple-local-prune | |
1639 | $ cd $TESTTMP/multiple-local-prune |
|
1639 | $ cd $TESTTMP/multiple-local-prune | |
1640 | $ mkcommit ROOT |
|
1640 | $ mkcommit ROOT | |
1641 | $ mkcommit A0 |
|
1641 | $ mkcommit A0 | |
1642 | $ hg commit --amend -m "A1" |
|
1642 | $ hg commit --amend -m "A1" | |
1643 | $ hg debugobsolete --record-parent `getid "."` |
|
1643 | $ hg debugobsolete --record-parent `getid "."` | |
1644 | obsoleted 1 changesets |
|
1644 | obsoleted 1 changesets | |
1645 |
|
1645 | |||
1646 | $ hg up -r "desc(A0)" --hidden |
|
1646 | $ hg up -r "desc(A0)" --hidden | |
1647 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1647 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1648 | $ hg commit --amend -m "A2" |
|
1648 | $ hg commit --amend -m "A2" | |
1649 | $ hg debugobsolete --record-parent `getid "."` |
|
1649 | $ hg debugobsolete --record-parent `getid "."` | |
1650 | obsoleted 1 changesets |
|
1650 | obsoleted 1 changesets | |
1651 |
|
1651 | |||
1652 | Check output |
|
1652 | Check output | |
1653 | ------------ |
|
1653 | ------------ | |
1654 |
|
1654 | |||
1655 | $ hg up "desc(A0)" --hidden |
|
1655 | $ hg up "desc(A0)" --hidden | |
1656 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1656 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1657 | $ hg tlog |
|
1657 | $ hg tlog | |
1658 | @ 471f378eab4c |
|
1658 | @ 471f378eab4c | |
1659 | | |
|
1659 | | | |
1660 | o ea207398892e |
|
1660 | o ea207398892e | |
1661 |
|
1661 | |||
1662 | # todo: the obsfate output is not ideal |
|
1662 | # todo: the obsfate output is not ideal | |
1663 | $ hg fatelog |
|
1663 | $ hg fatelog | |
1664 | @ 471f378eab4c |
|
1664 | @ 471f378eab4c | |
1665 | | Obsfate: pruned; |
|
1665 | | Obsfate: pruned; | |
1666 | o ea207398892e |
|
1666 | o ea207398892e | |
1667 |
|
1667 | |||
1668 | $ hg fatelog -v --hidden |
|
1668 | $ hg fatelog -v --hidden | |
1669 | x 65b757b745b9 |
|
1669 | x 65b757b745b9 | |
1670 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
1670 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); | |
1671 | | x fdf9bde5129a |
|
1671 | | x fdf9bde5129a | |
1672 | |/ Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
1672 | |/ Obsfate: pruned by test (at 1970-01-01 00:00 +0000); | |
1673 | | @ 471f378eab4c |
|
1673 | | @ 471f378eab4c | |
1674 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); |
|
1674 | |/ Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000); | |
1675 | o ea207398892e |
|
1675 | o ea207398892e | |
1676 |
|
1676 | |||
1677 |
|
1677 | |||
1678 | Test templates with splitted and pruned commit |
|
1678 | Test templates with splitted and pruned commit | |
1679 | ============================================== |
|
1679 | ============================================== | |
1680 |
|
1680 | |||
1681 | $ hg init $TESTTMP/templates-local-split-prune |
|
1681 | $ hg init $TESTTMP/templates-local-split-prune | |
1682 | $ cd $TESTTMP/templates-local-split-prune |
|
1682 | $ cd $TESTTMP/templates-local-split-prune | |
1683 | $ mkcommit ROOT |
|
1683 | $ mkcommit ROOT | |
1684 | $ echo 42 >> a |
|
1684 | $ echo 42 >> a | |
1685 | $ echo 43 >> b |
|
1685 | $ echo 43 >> b | |
1686 | $ hg commit -A -m "A0" |
|
1686 | $ hg commit -A -m "A0" | |
1687 | adding a |
|
1687 | adding a | |
1688 | adding b |
|
1688 | adding b | |
1689 | $ hg log --hidden -G |
|
1689 | $ hg log --hidden -G | |
1690 | @ changeset: 1:471597cad322 |
|
1690 | @ changeset: 1:471597cad322 | |
1691 | | tag: tip |
|
1691 | | tag: tip | |
1692 | | user: test |
|
1692 | | user: test | |
1693 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1693 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1694 | | summary: A0 |
|
1694 | | summary: A0 | |
1695 | | |
|
1695 | | | |
1696 | o changeset: 0:ea207398892e |
|
1696 | o changeset: 0:ea207398892e | |
1697 | user: test |
|
1697 | user: test | |
1698 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1698 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1699 | summary: ROOT |
|
1699 | summary: ROOT | |
1700 |
|
1700 | |||
1701 | # Simulate split |
|
1701 | # Simulate split | |
1702 | $ hg up -r "desc(ROOT)" |
|
1702 | $ hg up -r "desc(ROOT)" | |
1703 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
1703 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
1704 | $ echo 42 >> a |
|
1704 | $ echo 42 >> a | |
1705 | $ hg commit -A -m "A1" |
|
1705 | $ hg commit -A -m "A1" | |
1706 | adding a |
|
1706 | adding a | |
1707 | created new head |
|
1707 | created new head | |
1708 | $ echo 43 >> b |
|
1708 | $ echo 43 >> b | |
1709 | $ hg commit -A -m "A2" |
|
1709 | $ hg commit -A -m "A2" | |
1710 | adding b |
|
1710 | adding b | |
1711 | $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"` |
|
1711 | $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"` | |
1712 | obsoleted 1 changesets |
|
1712 | obsoleted 1 changesets | |
1713 |
|
1713 | |||
1714 | # Simulate prune |
|
1714 | # Simulate prune | |
1715 | $ hg debugobsolete --record-parent `getid "."` |
|
1715 | $ hg debugobsolete --record-parent `getid "."` | |
1716 | obsoleted 1 changesets |
|
1716 | obsoleted 1 changesets | |
1717 |
|
1717 | |||
1718 | $ hg log --hidden -G |
|
1718 | $ hg log --hidden -G | |
1719 | @ changeset: 3:0d0ef4bdf70e |
|
1719 | @ changeset: 3:0d0ef4bdf70e | |
1720 | | tag: tip |
|
1720 | | tag: tip | |
1721 | | user: test |
|
1721 | | user: test | |
1722 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1722 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1723 | | summary: A2 |
|
1723 | | summary: A2 | |
1724 | | |
|
1724 | | | |
1725 | o changeset: 2:617adc3a144c |
|
1725 | o changeset: 2:617adc3a144c | |
1726 | | parent: 0:ea207398892e |
|
1726 | | parent: 0:ea207398892e | |
1727 | | user: test |
|
1727 | | user: test | |
1728 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1728 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1729 | | summary: A1 |
|
1729 | | summary: A1 | |
1730 | | |
|
1730 | | | |
1731 | | x changeset: 1:471597cad322 |
|
1731 | | x changeset: 1:471597cad322 | |
1732 | |/ user: test |
|
1732 | |/ user: test | |
1733 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1733 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1734 | | summary: A0 |
|
1734 | | summary: A0 | |
1735 | | |
|
1735 | | | |
1736 | o changeset: 0:ea207398892e |
|
1736 | o changeset: 0:ea207398892e | |
1737 | user: test |
|
1737 | user: test | |
1738 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1738 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1739 | summary: ROOT |
|
1739 | summary: ROOT | |
1740 |
|
1740 | |||
1741 | Check templates |
|
1741 | Check templates | |
1742 | --------------- |
|
1742 | --------------- | |
1743 |
|
1743 | |||
1744 | $ hg up 'desc("A0")' --hidden |
|
1744 | $ hg up 'desc("A0")' --hidden | |
1745 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1745 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1746 |
|
1746 | |||
1747 | # todo: the obsfate output is not ideal |
|
1747 | # todo: the obsfate output is not ideal | |
1748 | $ hg fatelog |
|
1748 | $ hg fatelog | |
1749 | o 617adc3a144c |
|
1749 | o 617adc3a144c | |
1750 | | |
|
1750 | | | |
1751 | | @ 471597cad322 |
|
1751 | | @ 471597cad322 | |
1752 | |/ Obsfate: pruned; |
|
1752 | |/ Obsfate: pruned; | |
1753 | o ea207398892e |
|
1753 | o ea207398892e | |
1754 |
|
1754 | |||
1755 | $ hg up -r 'desc("A2")' --hidden |
|
1755 | $ hg up -r 'desc("A2")' --hidden | |
1756 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1756 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1757 |
|
1757 | |||
1758 | $ hg fatelog --hidden |
|
1758 | $ hg fatelog --hidden | |
1759 | @ 0d0ef4bdf70e |
|
1759 | @ 0d0ef4bdf70e | |
1760 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); |
|
1760 | | Obsfate: pruned by test (at 1970-01-01 00:00 +0000); | |
1761 | o 617adc3a144c |
|
1761 | o 617adc3a144c | |
1762 | | |
|
1762 | | | |
1763 | | x 471597cad322 |
|
1763 | | x 471597cad322 | |
1764 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000); |
|
1764 | |/ Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000); | |
1765 | o ea207398892e |
|
1765 | o ea207398892e | |
1766 |
|
1766 |
General Comments 0
You need to be logged in to leave comments.
Login now