histedit: drop fallback to empty string from rendertemplate()
AFAICT, `cmdutil.rendertemplate()` always returns bytes (never
e.g. `None`), so we don't need to fall back to empty
(byte-)string. The fallback has been there since the code was added in
11c076786d56 (histedit: add templating support to histedit's rule file
generation, 2019-01-29).
Differential Revision: https://phab.mercurial-scm.org/D9244
phases: convert registernew users to use revision sets
Differential Revision: https://phab.mercurial-scm.org/D9233
phases: allow registration and boundary advancement with revision sets
The core internals either use revision sets already or can trivially use
them. Use the new interface in cg1unpacker.apply to avoid materializing
the list of all new nodes as it is normally just a revision range. This
avoids about 67 Bytes / changeset on AMD64 in peak RSS.
Differential Revision: https://phab.mercurial-scm.org/D9232
revlog: extend addgroup() with callback for duplicates
The addgroup() interface currently doesn't allow the caller to keep
track of duplicated nodes except by looking at the returned node list.
Add an optional second callback for this purpose and change the return
type to a boolean. This allows follow-up changes to use more efficient
storage for the node list in places that are memory-sensitive.
Differential Revision: https://phab.mercurial-scm.org/D9231
tags: add safety check for len(record) while reading hgtagsfnodescache
I am trying to fix a breakage where somehow we end up getting a node of 12
length from `getfnode()`. Understanding the hgtagsfnodescache code, it seems
highly unlikely that it can happen unless one of `mctx.readfast().get()` or
`ctx.filenode()` is returning a node of 12 length.
For safety, I think it's better to add a check to make sure that record which we
are parsing is of same length we are expecting otherwise we consider that as
invalid record.
Differential Revision: https://phab.mercurial-scm.org/D9169
procutil: allow to specify arbitrary stdin bytes to runbgcommand
For automatic clonebundles generation I need to pass arbitrary large amount of
data to the process (eg: common nodes, target nodes).
I am updating the `runbgcommand` to allow for this. Previously not stdin input
was possible, now, one can provide raw bytes and they will be feed to the
command through an unnamed temporary files.
Differential Revision: https://phab.mercurial-scm.org/D9212
clonebundle: move the manifest filename to a constant
I am about to add more reference to it, so I would rather have it an explicit
constant. This allow to unify various call too.
Differential Revision: https://phab.mercurial-scm.org/D9209