branchcache: make entries a private attribute
Differential Revision: https://phab.mercurial-scm.org/D6155
branchcache: introduce hasbranch()
This will be used to check whether a branch exists or not. This will optimized
in future.
Differential Revision: https://phab.mercurial-scm.org/D6154
branchmap: drop branchcache.setdefault() (API)
All the callers are updated to call setdefault of branchcache.entries
Differential Revision: https://phab.mercurial-scm.org/D6153
branchcache: rename itervalues() to iterheads()
The itervalues() exists because branchcache() had a dict interface. Since it no
longer has a dict interface, it makes sense to have better function names.
If a person does not understand how branchcache stores info, it will be hard for
them to guess what itervalues() does.
Differential Revision: https://phab.mercurial-scm.org/D6152
branchmap: remove the dict interface from the branchcache class (API)
The current branchmap computation involves reading the whole branchmap from
disk, validating all the nodes even if they are not required. This leads to a
lot of time on repos which have large branchmap or a lot of branches. On large
repos, this can validate around 1000's of nodes.
On some operations, like finding whether a branch exists or not, we don't need
to validate all the nodes. Or updating heads for a single branch.
Before this patch, branchcache class was having dict interface and it was hard
to keep track of reads.
This patch removes the dict interface. Upcoming patches will implement lazy
loading and validation of data and implement better API's.
Differential Revision: https://phab.mercurial-scm.org/D6151
test-template: fix stdio mode on Windows
Otherwise, CBOR data would be corrupted. Spotted by Matt Harbison.
samplehgrcs: update the list of suggested extensions
Back in the day, this was color and pager, both of which are now
default. Churn isn't that popular, but the other four below
(obviously?) are.
samplehgrcs: clarify which lines should be uncommented
The original wording has confused at least one person. Hopefully it's
clearer this way.
https://stackoverflow.com/questions/
55288177/adding-hg-strip-to-hgrc-config-file