rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths
This change is a direct consequence of this discussion on the mailing list:
https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-August/133574.html
The implementations of `HgPath` and `HgPathBuf` are, for the most part, taken
directly from `OsStr` and `OsString` respectively from the standard library.
What this change does *not* yet do is implement the Windows MBCS to WTF8
conversion, but it lays the basis for a very flexible interface for paths.
Differential Revision: https://phab.mercurial-scm.org/D6773
wireprototypes: clarify documentation of getbundle argument types
It seems like it was a mix of what the Python code would see and what
was sent over the wire. I've tried to clarify both the type seen in
Python and how it's transmitted.
Differential Revision: https://phab.mercurial-scm.org/D6871
merge: respect parents order when using `graft` on a merge, this time for real
See
a4ca0610c754.
potherp1 is a boolean variable that means "pother is ctx.p1", and parents is
naturally [ctx.p1, ctx.p2].
pctx is always removed from parents, so if pctx is parents[0], then we end up
using parents[1] as pother. To be true to its name, potherp1 should then be
True only when pctx is at parents[1].
py3: don't double-convert "opts" to bytes
The "opts" are already converted to bytes at the beginning of the
function. Doing it twice results in a crash, which makes
test-uncommit.t fail. The extra call was added recently, in
ff1ff2aae132 (uncommit: add support to modify the commit message and
date, 2019-09-07). test-uncommit.t passes again after this patch.
Differential Revision: https://phab.mercurial-scm.org/D6864
py3: byte-prefix sanitisation regexes in phabricator.py
So it doesn't die with "TypeError: cannot use a string pattern on a bytes-like
object".
Differential Revision: https://phab.mercurial-scm.org/D6863
py3: pass a bytestring into querydrev instead of a string that'll TypeError
This was a regression I introduced in
c19d259fd6ad. When the string gets to
the memoryview in _tokenize under py3 it'll die.
Differential Revision: https://phab.mercurial-scm.org/D6869
py3: add test demonstrating TypeError when phabsending skips unchanged commits
Skipping can currently only happen with `--no-amend`, so this isn't a usual
configuration.
Differential Revision: https://phab.mercurial-scm.org/D6868