Micha Wiedenmann <mw-u2@posteo.de> [Thu, 19 Mar 2020 16:06:24 +0100] rev 44589
ui: use "procutil.shellsplit" to parse command
A commandline containing a space ('"C:\\Program Files\\bar.exe" "..."')
must not simply split at whitespace, instead quoting has to be taken into
account. Use "shlex.split()" to parse it instead.
This can improve the error message if we fail to launch a user
configured
editor which does not exist. Consider
[ui]
editor = "C:\Program Files\editor\editor.exe"
where the path does not exist. "hg histedit" currently aborts with
> Abort: edit failed: Program exited with status 1
here "Program" is not part of the message but the name of the program
that failed (i.e. `basename("C:\\Program ")`). With this change the message
instead reads
> Abort: edit failed: C:\Program Files\editor\editor.exe exited with
> status 1
which is also not ideal since infact "cmd.exe" exited with code 1, not
the editor. But the real error message ("File not found") gets swallowed by
`procutil` and including the correct path improves the error message
nevertheless.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Mar 2020 11:02:07 -0500] rev 44588
phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Per Augie's request. Like regular revsets, the result is the union of all given
specs. Unlike regular revsets, these don't resolve in parent -> child order,
and should be specified as such on the command line.
This change invalidated a previous test using an empty `hg phabread`, so it has
been switched to `hg debugcallconduit` to preserve that coverage.
Differential Revision: https://phab.mercurial-scm.org/D8233
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Mar 2020 11:00:00 -0500] rev 44587
phabricator: add a helper function to convert DREVSPECs to a DREV dict list
Prep work for allowing multiple DREVSPECs to various commands, and properly
validating the input.
Differential Revision: https://phab.mercurial-scm.org/D8232
Yuya Nishihara <yuya@tcha.org> [Fri, 20 Mar 2020 17:18:14 +0900] rev 44586
merge with stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 19 Mar 2020 14:54:10 -0400] rev 44585
tests: avoid logging a commit with a Unicode character in test-phabricator.t
The previous output was generated on Windows, and should have been wrapped in
`HGENCODING=utf-8` like it is earlier in the test. It's simpler to just avoid
it. I only noticed the output change when I got around to running it on a Mac.
Differential Revision: https://phab.mercurial-scm.org/D8303
Martin von Zweigbergk <martinvonz@google.com> [Fri, 13 Mar 2020 12:16:20 -0700] rev 44584
fix: mark -r as advanced
See the previous patch for reasoning. I planned to even mark it
deprecated, but someone (timeless?) on the #mercurial IRC channel said
they sometimes wanted to use `-r` with its existing semantics.
Differential Revision: https://phab.mercurial-scm.org/D8288
Martin von Zweigbergk <martinvonz@google.com> [Fri, 13 Mar 2020 12:16:00 -0700] rev 44583
fix: add a -s option to format a revision and its descendants
`hg fix -r abc123` will format that commit but not its
descendants. That seems expected given the option name (`-r`), but
it's very rarely what the user wants to do. The problem is that any
descendants of that commit will not be formatted, leaving them as
orphans that are hard to evolve. They are hard to evolve because the
new parent will have formatting changes that the orphan doesn't have.
I talked to Danny Hooper (who wrote most of the fix extension) about
the problem and we agreed that deprecating `-r` in favor of a new `-s`
argument (mimicing rebase's `-s`) would be a good way of reducing the
risk that users end up with these hard-to-evolve orphans. So that's
what this patch implements.
Differential Revision: https://phab.mercurial-scm.org/D8287
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 16:32:01 -0800] rev 44582
fix: move handling of --all into getrevstofix() for consistency
Differential Revision: https://phab.mercurial-scm.org/D8286
Raphaël Gomès <rgomes@octobus.net> [Wed, 18 Mar 2020 14:26:47 +0100] rev 44581
rust-status: add trace-level logging for Rust status fallback for debugging
The added `log` crate is already a sub-dependency.
Differential Revision: https://phab.mercurial-scm.org/D8300
Augie Fackler <augie@google.com> [Wed, 18 Mar 2020 15:08:14 -0400] rev 44580
hg: make _local() behave consistently on Python 3.8 (issue6287)
Python 3.8 makes os.path.isfile quietly eat "path invalid" errors and
return False instead of allowing the exception to propagate. Given
that this is a change from 2018 (sigh) and it's mentioned in the
release notes (double sigh) we're definitely too late to complain to
Python about the behavior change, so open-code part of
os.path.isfile() in this method so we can catch invalid-path errors
and handle them appropriately. I confirmed that posixpath and ntpath
both delegate to genericpath, which uses os.stat() under the covers.
Differential Revision: https://phab.mercurial-scm.org/D8302
Augie Fackler <augie@google.com> [Tue, 17 Mar 2020 17:26:05 -0400] rev 44579
remotefilelog: add fake heads() method that allows viewing a file in hgweb
As best I can discern, this is not going to hurt anything, but it'll
cause a couple of options to exist in the UI that are
nonsensical. That seems fine, given the nature of remotefilelog.
Differential Revision: https://phab.mercurial-scm.org/D8299
Augie Fackler <augie@google.com> [Tue, 17 Mar 2020 17:21:34 -0400] rev 44578
tests: add test for remotefilelog interactions with hgweb
It's not uncommon for hg users to rely on hgweb as a simple GUI and
history browser (I do this all the time on Mercurial), but we lack any
tests to ensure things keep working.
At present, this merely demonstrates the "view contents of a single
file" endpoint is broken. I'll fix that in a subsequent change.
Differential Revision: https://phab.mercurial-scm.org/D8298
Augie Fackler <augie@google.com> [Wed, 18 Mar 2020 12:03:27 -0400] rev 44577
phabricator: remove duplicated byteskwargs conversion
Fixes things on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D8301
Kyle Lippincott <spectral@google.com> [Tue, 17 Mar 2020 12:59:31 -0700] rev 44576
chistedit: support histedit.summary-template in curses histedit plan
Differential Revision: https://phab.mercurial-scm.org/D8296