templatefuncs: add regexp search() function that extracts substring
This can be used to extract an issue number from a commit message, for
example:
{search(r'\(issue([0-9]*)\)', desc) % '{1}'}
rust: changed Graph.parents to return [Revision; 2]
This will allow for simple iteration on parent revisions,
such as:
for parent in graph.parents(rev)?.iter().cloned()
This seems to be a zero overhead abstraction once built in
release mode.
Differential Revision: https://phab.mercurial-scm.org/D5415
rust: improved docstring
In the previous wording, rustfmt wanted to cut at the == which is not very
readable in my taste.
Differential Revision: https://phab.mercurial-scm.org/D5414
revset: move subscript relation functions to its own dict
This will help adding more relation functions in extensions.
We skip short names (that consist of one letter) while raising
UnknownIdentifier because such names cannot be suggested anyway: the similarity
cutoff in dispatch._getsimilar() is currently 0.6.
py3: teach run-tests.py to handle exe with spaces when --local isn't specified
This was the reason that no amount of quoting worked in test-hghave.t.
`os.popen()` needed to be swapped out because while the added quoting around
line 3124 worked on py3, it failed on py2. See
38d51371792b. The problem with
`os.system()` was wrongly splitting the command on the space in 'Program Files',
regardless of quoting. It looks like there are a few other instances of
`os.system()` in core code, so presumably those should be replaced?
rust: adapted hg-core tests for iteration over Result
Now AncestorsIterator iters on Result<Revision, GraphError>
win32: close the handles associated with a spawned child process
Probably not a big deal because at this point, the call is only used when
spawning a daemonized server. In that case, the parent process goes away first,
so it won't prevent the child from being cleaned up.