changelog: add a `branch` method, bypassing changectx
The only way to access the branch of a changeset is currently to
create a changectx object and access its `branch()` method. Creating
a new Python object is costly and has a huge impact on code doing
heavy access to `branch()` (like branchmap).
This change introduces a new method on changelog that allows direct
access to the branch of a revision. See the next changeset for impact.
branchmap: pass revision insteads of changectx to the update function
Creation of changectx objects is very slow, and they are not very
useful. We are going to drop them. The first step is to change the
function argument type.
perf: add perfbranchmap command
The command times the update of a branchmap from its nearest subset
or from scratch.
clfilter: enforce hidden filtering on all repository accesses
We ensure all repositores created through `mercurial.hg.repository`
are "hidden" filtered. This is an even stronger enforcement than
5bb610f87d1d.
Citing Matt's response to changeset
5bb610f87d1d installing filtering
in dispatch:
> Unfortunately, this means that code that doesn't go through dispatch (ie all
> those crazy misguided people using Mercurial as a library) are going to see
> these hidden changesets.
>
> Might be better to instead install the filter in localrepo construction by
> default and disable it in dispatch.
archival: avoid touching deprecated gzip name attribute
The existing workaround didn't work when no filename was specified.
If running in a context with warnings enabled and subsecond mtime it gave a
warning:
DeprecationWarning: use the name attribute
archival: pass integer to struct.pack int field instead of float
If running in a context with warnings enabled and subsecond mtime it gave a
warning:
DeprecationWarning: integer argument expected, got float
largefiles: fix update from a merge with removed files
A situation with this case could happen after interrupting an update. Update
would fail with:
abort: No such file or directory: $TESTTMP/f/.hglf/sub2/large6
Update from a merge without using clean is not possible anyway, so this patch
takes a step in the right direction so it gets as far as reporting the right
error.
largefiles: fix revert removing a largefile from a merge
Before revert could fail with:
abort: .hglf/large@
33fdd332ec64: not found in manifest!
The LookupError will now be caught and handled correctly.