##// END OF EJS Templates
largefiles: properly pass kwargs into url.open...
largefiles: properly pass kwargs into url.open The url.open function has acquired a lot of kwargs over the years. When running `hg import http://example.com/hg/diff/1`, since at least a708e1e4d7a8 in March, 2018, the calling sites for url.open try to pass a `sendaccept` parameter that largefiles' override doesn't accept. Currently that stack traces something like this: Traceback (most recent call last): File "/tmp/hgtests.sv744r5t/install/bin/hg", line 59, in <module> dispatch.run() File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 143, in run status = dispatch(req) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 245, in dispatch status = _rundispatch(req) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 289, in _rundispatch ret = _runcatch(req) or 0 File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 465, in _runcatch return _callcatch(ui, _runcatchfunc) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 475, in _callcatch return scmutil.callcatch(ui, func) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/scmutil.py", line 155, in callcatch return func() File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 455, in _runcatchfunc return _dispatch(req) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 1259, in _dispatch lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 913, in runcommand ret = _runcommand(ui, options, cmd, d) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 1270, in _runcommand return cmdfunc() File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 1256, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/util.py", line 1867, in check return func(*args, **kwargs) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/commands.py", line 4184, in import_ patchfile = hg.openpath(ui, patchurl, sendaccept=False) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/hg.py", line 181, in openpath return url.open(ui, path, sendaccept=sendaccept) TypeError: openlargefile() got an unexpected keyword argument 'sendaccept' So, just accept and pass along any kwargs of the overridden function.

File last commit:

r47182:1c667958 merge default
r47202:32da5891 stable
Show More
5.7
70 lines | 2.9 KiB | application/x-troff | GroffLexer
== New Features ==
* There is a new config section for templates used by hg commands. It
is called `[command-templates]`. Some existing config options have
been deprecated in favor of config options in the new
section. These are: `ui.logtemplate` to `command-templates.log`,
`ui.graphnodetemplate` to `command-templates.graphnode`,
`ui.mergemarkertemplate` to `command-templates.mergemarker`,
`ui.pre-merge-tool-output-template` to
`command-templates.pre-merge-tool-output`.
* There is a new set of config options for the template used for the
one-line commit summary displayed by various commands, such as `hg
rebase`. The main one is `command-templates.oneline-summary`. That
can be overridden per command with
`command-templates.oneline-summary.<command>`, where `<command>`
can be e.g. `rebase`. As part of this effort, the default format
from `hg rebase` was reorganized a bit.
* `hg strip`, from the strip extension, is now a core command, `hg
debugstrip`. The extension remains for compatibility.
* `hg diff` and `hg extdiff` now support `--from <rev>` and `--to <rev>`
arguments as clearer alternatives to `-r <revs>`. `-r <revs>` has been
deprecated.
* The memory footprint per changeset during pull/unbundle
operations has been further reduced.
* There is a new internal merge tool called `internal:mergediff` (can
be set as the value for the `merge` config in the `[ui]`
section). It resolves merges the same was as `internal:merge` and
`internal:merge3`, but it shows conflicts differently. Instead of
showing 2 or 3 snapshots of the conflicting pieces of code, it
shows one snapshot and a diff. This may be useful when at least one
side of the conflict is similar to the base. The new marker style
is also supported by "premerge" as
`merge-tools.<tool>.premerge=keep-mergediff`.
* External hooks are now called with `HGPLAIN=1` preset. This has the side
effect of ignoring aliases, templates, revsetaliases, and a few other config
options in any `hg` command spawned by the hook. The previous behavior
can be restored by setting HGPLAINEXCEPT appropriately in the parent process.
See `hg help environment` for the list of items, and how to set it.
* The `branchmap` cache is updated more intelligently and can be
significantly faster for repositories with many branches and changesets.
== New Experimental Features ==
* `experimental.single-head-per-branch:public-changes-only` can be used
restrict the single head check to public revision. This is useful for
overlay repository that have both a publishing and non-publishing view
of the same storage.
== Bug Fixes ==
== Backwards Compatibility Changes ==
* `--force-lock` and `--force-wlock` options on `hg debuglock` command are
renamed to `--force-free-lock` and `--force-free-wlock` respectively.
== Internal API Changes ==