Debian Codegraph @

relnotes/4.6

raw
1 # Mercurial 4.6 (2017-11-30)
2
3
4 ## Mercurial 4.6 release
5
6 ### New Features
7
8 #### pullbundles
9
10 Pullbundles allow the server to answer client requests using pre-built bundles. This is different from the existing clonebundle feature:
11
12 - pullbundles can be used for both the initial clone and later pull operations
13 - pullbundles can be used incrementally, i.e. to cover the changes up to the start of the current month as one bundle and the remaining changes as second bundle
14 - the bundle is transferred inline as part of the existing connection without a secondary server
15
16 Pullbundles are only used for clients running Mercurial 4.6 as well.
17
18 #### push
19
20 If 'server.streamunbundle' option is enabled, the server will directly apply the changes send by the changes. This avoids potentially large temporary files on the server side. It can also prevent concurrent pushes.
21
22 #### notify extension
23
24 The 'maxdiffstat' option can be used to truncate long file lists similar to 'maxdiff' for the patch part of the email.
25
26 #### hgweb
27
28 hgweb now shows date and user for operations that resulted in obsolete commit(s). For unstable commits, it shows the exact reason why they are considered unstable.
29
30 `Server:` header is now configurable using `web.server-header` option.
31
32 #### templates
33
34 A new template keyword 'reporoot' which shows the root directory of the current repository.
35 A new template function 'mailmap' which maps author fields based on values in a .mailmap file.
36
37
38 ### Backwards Compatibility Changes
39
40 - Support for connecting to Mercurial servers older than 0.9.1 has been removed.
41
42 - Working-directory commands now respect "-X PATTERN" no matter if PATTERN matches explicitly-specified FILEs. For example, "hg add foo -X foo" no longer add the file "foo".
43
44 - Support for the experimental manifestv2 format has been removed, as it was never completed and failed to meet expectations.
45
46 - '{' in output filename passed to archive/cat/export is taken as a start of a template expression.
47
48 - The HTTP wire protocol server no longer accepts the "cmd" argument to control which command to run via HTTP POST bodies. The "cmd" argument must be specified on the URL query string.
49
50 - Hgweb no longer reads form data in POST requests from multipart/form-data and application/x-www-form-urlencoded requests. Arguments should be specified as URL path components or in the query string in the URL instead.
51
52 - Query string shorts in hgweb like "?cs=@" have been removed. Use URLs of the form "/:cmd" instead.
53
54 - The HTTP client no longer accepts text/plain and application/hg-changegroup Content-Type values as a valid Mercurial command response. These should only be encountered on pre 1.0 Mercurial servers.
55
56 ### Performance Improvements
57
58 - 'hg manifest --all' is likely slower due to changing its implementation to respect storage interface boundaries. If you are impacted by this regression in a meaningful way, please make noise on the development mailing list and it can be dealt with.
59
60 - 'hg diff' is much faster for larger repositories. 40% improvements have been reported. Other operations using diffs like hgweb also benefit.
61
62 ### Bug Fixes
63
64 - grep: fixes erroneous output of grep in forward order (Bts:issue3885)
65 - dirstate: drop explicit files that shouldn't match (BC) (Bts:issue4679)
66 - procutil: rewrite popen() as a subprocess.Popen wrapper (Bts:issue4746) (API)
67 - bookmarks: test for exchanging long bookmark names (Bts:issue5165)
68 - templater: drop symbols which should be overridden by new 'ctx' (Bts:issue5612)
69 - clone: updates the help text for hg clone -{r,b} (Bts:issue5654)
70 - bundle: updates the help text for hg bundle (Bts:issue5744)
71 - histedit: make histedit's commands accept revsets (Bts:issue5746)
72 - releasenotes: replace abort with warning while parsing (Bts:issue5775)
73 - context: skip path conflicts by default when clearing unknown file (Bts:issue5776)
74 - templatekw: switch most of showlist template keywords to new API (Bts:issue5779)
75 - rebase: do not consider extincts for divergence detection (Bts:issue5782)
76 - revert: use an exact matcher in interactive diff selection (Bts:issue5789)
77 - subrepo: don't attempt to share remote sources (Bts:issue5793)
78 - lfs: respect narrowmatcher when testing to add 'lfs' requirement (Bts:issue5794)
79 - showconfig: allow multiple section.name selectors (Bts:issue5797)
80 - annotate: do not poorly split lines at CR (Bts:issue5798)
81 - convert: avoid closing ui.fout in subversion code (Bts:issue5807)
82 - setdiscovery: back out changeset 5cfdf6137af8 (Bts:issue5809)
83 - fsmonitor: layer on another hack in bser.c for os.stat() compat (Bts:issue5811)
84 - notify: access the initial revision on an unfiltered repository (Bts:issue5821)
85 - rebase: fix issue 5494 also with --collapse
86 - date: fixed a bug in parsing months like 'Feb 2018', 'Apr 2018'
87 - diffhelper: rename module to avoid conflicts with ancient C module (Bts:issue5846)
88 - infinitepush: ensure fileindex bookmarks use '/' separators (Bts:issue5840)
89 - import: fix crash on --exact check of empty commit (Bts:issue5702)
90 - hgweb: reuse body file object when hgwebdir calls hgweb (Bts:issue5851)
91 - debugcolor: fix crash by empty styles (Bts:issue5856)
92 - hgweb: discard Content-Type header for 304 responses (Bts:issue5844)
93 - hgweb: allow Content-Security-Policy header on 304 responses (Bts:issue5844)
94 - paper: don't register click handlers with inline javascript (Bts:issue5812)
95 - httppeer: detect redirect to URL without query string (Bts:issue5860)
96 - filelog: don't crash on invalid copy metadata (Bts:issue5748)
97
98
99 ### New experimental features
100
101 Each release there are lot of new features added which are hidden under the EXPERIMENTAL tag as the behavior may change in future or the feature is not complete yet. The experimental features added in this cycle are:
102
103 #### narrow extension
104
105 Allows to create clones which fetch history data for only a subset of files. This experimental extension is now distributed with Mercurial.
106
107 #### remotenames extension
108
109 Shows `remotebookmarks` and `remotebranches` in the UI. This experimental extension is now distributed with Mercurial.
110
111 #### infinitepush extension
112
113 Allows to store some pushes in a remote blob store on the server and to serve commits from remote blob store. The revisions are stored on disk or in everstore, the metadata are stored in sql or on disk. This experimental extension is now distributed with Mercurial.
114
115 #### fix extension
116
117 Allows to rewrite file content in changesets or working copy. For example, automatically applying formatting fixes to modified lines of code. This experimental extension is now distributed with Mercurial.
118
119 #### lfs extension
120
121 An alternative to the largefiles extension, which uses the git-lfs protocol. This experimental extension is now distributed with Mercurial.
122
123 ### Other notable features
124
125 - revset: parse error now shows a hint where the error occurred
126 - templates: parse error now shows a hint where the error occured
127 - forget: new '--dry-run' and '--interactive' flags
128 - copyfile: preserve stat info (mtime, etc.) when doing copies/renames
129 - bundle2 format is documented and can be found using 'hg help internals.bundle2'
130 - patch: implement a new worddiff algorithm
131 - util: whitelist apfs for hardlink support
132 - children: support specifying revision by revset
133 - filemerge: support passing labels to external merge tools
134 - heads: add support for specifying branches by revset
135 - annotate: add support for template keywords and functions depending on ctx
136 - bookmarks: write bookmarks file deterministically
137 - rebase: introduce support for automatically rebasing orphan changes
138 - patches: release the GIL while applying the patch
139
140 ### API Changes
141
142 - Content from mercurial.hgweb.protocol has been moved to mercurial.wireprotoserver.
143
144 - Content from mercurial.sshserver has been moved into mercurial.wireprotoserver.
145
146 - sshserver no longers looks for wire protocol command handlers in methods named `do_<command>`. Use `@wireproto.wireprotocommand` to declare wire protocol command handler functions.
147
148 - Log-related utility functions has been renamed as follows:
149
150 - cmdutil.loglimit -> logcmdutil.getlimit
151
152 - cmdutil.diffordiffstat -> logcmdutil.diffordiffstat
153
154 - cmdutil._changesetlabels -> logcmdutil.changesetlabels
155
156 - cmdutil.changeset_printer -> logcmdutil.changesetprinter
157
158 - cmdutil.jsonchangeset = logcmdutil.jsonchangeset
159
160 - cmdutil.changeset_templater -> logcmdutil.changesettemplater
161
162 - cmdutil.logtemplatespec -> logcmdutil.templatespec
163
164 - cmdutil.makelogtemplater -> logcmdutil.maketemplater
165
166 - cmdutil.show_changeset -> logcmdutil.changesetdisplayer
167
168 - cmdutil.getlogrevs -> logcmdutil.getrevs
169
170 - cmdutil.getloglinerangerevs -> logcmdutil.getlinerangerevs
171
172 - cmdutil.displaygraph -> logcmdutil.displaygraph
173
174 - cmdutil.graphlog -> logcmdutil.graphlog
175
176 - cmdutil.checkunsupportedgraphflags -> logcmdutil.checkunsupportedgraphflags
177
178 - cmdutil.graphrevs -> logcmdutil.graphrevs
179
180 - cmdutil._makenofollowlogfilematcher -> logcmdutil._makenofollowfilematcher
181
182 - The following deprecated methods have been removed from context, with replacements:
183
184 - unstable() -> orphan()
185
186 - bumped() -> phasedivergent()
187
188 - divergent() -> contentdivergent()
189
190 - troubled() -> isunstable()
191
192 - troubles() -> instabilities()
193
194 - The following deprecated methods have been removed from obsolete, with replacements:
195
196 - _addprecursors() -> _addpredecessors()
197
198 - obsstore.precursors -> obsstore.predecessors
199
200 - allprecursors() -> obsutil.allprecursors()
201
202 - allsuccessors() -> obsutil.allsuccessors()
203
204 - marker() -> obsutil.marker
205
206 - getmarkers() -> obsutil.getmarkers()
207
208 - exclusivemarkers() -> obsutil.exclusivemarkers()
209
210 - foreground() -> obsutil.foreground()
211
212 - successorssets() -> obsutil.successorsset()
213
214 - unstable() -> orphan()
215
216 - bumped() -> phasedivergent()
217
218 - divergent() -> contentdivergent()
219
220 - The following deprecated methods have been removed from obsutil: `marker.precnode()` and `allprecursors()`. Use `marker.prednode()` and `allpredecessors()` instead.
221
222 - `beginparentchange()` and `endparentchange()` have been replaced by the `parentchange` context manager.
223
224 - The deprecated `localrepo.walk()` has been removed, and replaced by `repo[node].walk()`.
225
226 - The following deprecated methods have been removed from bookmarks: `__setitem__()`, `__delitem__()`, `update()`, and `recordchange()`. Use `bookmarks.applychanges()` instead.
227
228 - The `cmdutil._revertprefetch()` hook point for prefetching stored files has been replaced by the command agnostic `cmdutil._prefetchfiles()`. The new function takes a list of files, instead of a list of lists of files.
229
230 - `sshpeer.sshpeer.__init__` now receives arguments describing an existing connection instead of creating a connection itself.
231
232 - `sshpeer.sshpeer` renamed to `sshpeer.sshv1peer`.
233
234 - `wireproto.pushres` and `wireproto.pusherr` now explicitly track stdio output.
235
236 - `redirect()` and `restore()` have been removed from the wire protocol handler interface. Use `mayberedirectstdio()` instead.
237
238 - The `_client()` method of the wire protocol handler interface has been renamed to `client()`.
239
240 - Wire protocol command handlers now return a `wireprototypes.bytesresponse` instead of a raw bytes instance. Protocol handlers will continue handling bytes instances. However, any extensions wrapping wire protocol commands will need to handle the new type.
241
242 - SSH protocol handler now advertises its name internally as "ssh-v1" instead of "ssh."
243
244 - File prefetching is now handled by registering a callback with `scmutil.fileprefetchhooks`.
245
246 - HTTP protocol handlers now advertises its internal name as "http-v1" instead of "http".
247
248 - `context.basectx` no longer implements `__int__`. Context instances will no longer cast to ints. Consumers should call `ctx.rev()` instead.
249
250 - `templatekw.showdict()` and `showlist()` are deprecated in favor of new `(context, mapping)` API. Switch the keyword function to new API and use `templatekw.compatdict()` and `compatlist()` instead.
251
252 - `hgweb_mod.perms` and `wireproto.permissions` have been removed. Wire protocol commands should declare their required permissions in the `@wireprotocommand` decorator.
253
254 - The WSGI request object no longer exposes a `form` attribute containing parsed query string data. Use the `qsparams` attribute instead.
255
256 - `hgweb.hgweb_mod.permhooks` no longer take a `wsgirequest` instance as an argument.
257
258 - hgweb `@webcommand` functions must use the new response object passed in via "web.res" to initiate sending of a response. The hgweb WSGI application will no longer start sending the response automatically.
259
260 - Various helper functions in hgweb.webutil no longer accept a templater instance. Access the templater through the "web" argument instead.
261
262 - Various functions in hgweb.webutil now take a modern request object instead of "wsgirequest".
263
264 - `@webcommand` functions now only receive a single argument. The request and templater instances can be accessed via the "req" and "templater" attributes of the first argument. Note that the request object is different from previous Mercurial releases and consumers of the previous "req" 2nd argument will need updating to use the new API.
265
266 - The old "wsgirequest" class for handling everything WSGI in hgweb has been replaced by separate request and response types. Various high-level functions in the hgweb WSGI applications now receive these new types as arguments instead of the old "wsgirequest" type.
267
268 - The `render(mapping)` method of the templater has been renamed to `renderdefault(mapping)`.
269
270 - `httppeer.httppeer.__init__` now takes additional arguments. Instances should be obtained by calling `httppeer.instance()` or `httppeer.makepeer()` instead.
271
272 - The templater is no longer callable. Use `templater.generate(t, mapping)` instead of `templater(t, **pycompat.strkwargs(mapping))`.
273
274 - `templatekw._showlist()` is deprecated in favor of `templateutil._showcompatlist()`, which takes `context` in place of `templ`.
275
276 - Several generic string helper functions have been moved to utils.stringutil module.
277
278 - The `util.Abort` alias has been removed. Use `error.Abort`.
279
280 - `merge.update()` and `merge.applyupdates()` now return a class with named attributes instead of a tuple. Switch consumers to access elements by name instead of by offset.
281
282 - Utility functions related to process/executable management have been moved to utils.procutil module.
283
284 - localrepo.localrepository.featuresetupfuncs has been renamed to localrepo.featuresetupfuncs.
285
286 - localrepo.localrepository.filterpats was renamed to localrepo.localrepository._filterpats.
287
288 - Template filters should declare input data type and/or catch `AttributeError`, `ValueError`, `TypeError`, etc. as needed. See the doc of "registrar.templatefilters" for details.
289
290 - "wireproto" module no longer re-exports various types used to define responses to wire protocol commands. Access these types from the "wireprototypes" module.
291
292 - `filelog.parsemeta()` and `filelog.packmeta()` have been moved to the revlog module.
293
294 - `procutil.popen()` no longer supports text mode I/O.
295
296 - `hook.hook()` and `hook.runhooks()` may return a negative integer to denote that the process was killed by signal.
297
298 - `filelog.filelog` is now a standalone class and doesn't inherit from revlog. Instead, it wraps a revlog instance at `self._revlog`. This change was made in an attempt to formalize storage APIs and prevent revlog implementation details leaking through to callers.
299
300 - The `fp` argument is removed from `cmdutil.export()`. Use `cmdutil.exportfile()` instead.
301
302 - `cmdutil.export()` takes a formatter as an argument.
303
304 - `patch.extract()` is now a context manager. Callers no longer have to worry about deleting the temporary file it creates, as the file is tied to the lifetime of the context manager.
305
306 - The wire protocol peer's `iterbatch()` for bulk executing commands has been removed. Use `peer.commandexecutor()` instead.
307
308
309 ## More notes to sort into the above
310
311 ### core
312 - cmdutil: make node parameter of makefileobj() mandatory (API)
313 - cmdutil: pass ctx to makefilename() in place of repo/node pair (API)
314 - cmdutil: pass ctx to makefileobj() in place of repo/node pair (API)
315 - cmdutil: pass in parsed patch to tryimportone() (API)
316 - cmdutil: split functions of log-like commands to new module (API)
317 - context: drop support for changeid='' (API)
318 - context: move handling of filtering error to revsymbol() (API)
319 - context: move reuse of context object to repo.__getitem__ (API)
320 - context: remove unwanted assignments in basectx.__new__() (API)
321 - filelog: declare that filelog implements a storage interface
322 - repo: remove now-unused changectx() method (API)
323 - revlog: make shortest() take a full binary nodeid (API)
324 - revset: drop support for posttreebuilthook() (API)
325 - revset: pass in lookup function instead of repo (API)
326 - templater: complain about invalid application of '%' operator (BC)
327 - transaction: add a name and a __repr__ implementation (API)
328 - wireproto: move gboptsmap to wireprototypes and rename (API)
329 - wireproto: move value encoding functions to wireprototypes (API)
330 - wireproto: move version 1 peer functionality to standalone module (API)
331 - wireproto: remove unused proto argument from supportedcompengines (API)
332 - wireproto: rename wireproto to wireprotov1server (API)
333 - wireprotoserver: rename getfile() to forwardpayload() (API)
334
335 ### unsorted
336 - addbranchrevs: no longer accept revset as "revs" (API)
337 - addremove: remove dry_run, similarity from scmutil.addremove (API)
338 - bundle2: make source a mandatory argument for bundle2.applybundle() (API)
339 - localrepo: drop "remote" argument from lookupbranch() (API)
340 - mdiff: add a config option to use xdiff algorithm
341 - revsymbol: stop delegating to repo.__getitem__ for unhandled symbols (API)
342 - templatekw: fix return type of {succsandmarkers} (BC)
343 - templater: complain about invalid application of '%' operator (BC)
344 - cmdutil: make node parameter of makefileobj() mandatory (API)
345 - cmdutil: pass ctx to makefilename() in place of repo/node pair (API)
346 - cmdutil: pass ctx to makefileobj() in place of repo/node pair (API)
347 - cmdutil: pass in parsed patch to tryimportone() (API)
348 - cmdutil: split functions of log-like commands to new module (API)
349 - context: drop support for changeid='' (API)
350 - context: move handling of filtering error to revsymbol() (API)
351 - context: move reuse of context object to repo.__getitem__ (API)
352 - context: remove unwanted assignments in basectx.__new__() (API)
353 - peer: scatter module to the wind (API)
354 - procutil: drop unused 'newlines' option from popen*() (API)
355 - procutil: make explainexit() simply return a message (API)
356 - registrar: replace "cmdtype" with an intent-based mechanism (API)
357 - revlog: make shortest() take a full binary nodeid (API)
358 - revset: drop support for posttreebuilthook() (API)
359 - revset: pass in lookup function instead of repo (API)
360 - revsymbol: stop delegating to repo.__getitem__ for unhandled symbols (API)
361 - scmutil: make revpair() return context objects (API)
362 - transaction: add a name and a __repr__ implementation (API)
363 - wireproto: move gboptsmap to wireprototypes and rename (API)
364 - wireproto: move value encoding functions to wireprototypes (API)
365 - wireproto: move version 1 peer functionality to standalone module (API)
366 - wireproto: remove unused proto argument from supportedcompengines (API)
367 - wireproto: rename wireproto to wireprotov1server (API)
368 - wireprotoserver: rename getfile() to forwardpayload() (API)