stack: use repo.revs() instead of revsetlang.formatspec() + scmutil.revrange()
Using scmutil.revrange() it's possible to use multiple revsets at the same
time, but we're not using that functionality in stack.
I thought maybe that function could be used to make stack definition
customizable (by combining various parts into one set), but scmutil.revrange()
gives the union of all provided revsets, which is not very useful in stack's
case (we want "and" between parts, not "or").
merge: back out changeset
a4ca0610c754 (parents order when grafting a merge)
Turns out it's not enough to just swap parents, because when we do, there are
unexpected bad side effects, such as a tracked file becoming untracked. These
side effects need more code to be handled properly, but it's not written yet.
Let's back this feature out from stable for now and some day implement it on
default instead.
rust-hgpath: replace all paths and filenames with HgPath/HgPathBuf
Differential Revision: https://phab.mercurial-scm.org/D6774
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