revlog: reorder a conditionnal about revlogio
if we are using REVLOGV0, we will not use a rust based index. This small line
movement make it clearer.
Differential Revision: https://phab.mercurial-scm.org/D7830
rebase: delete seemingly unnecessary needupdate()
This seemed to be about checking that the user hasn't updated away
when we asked them to resolve merge conflicts. These days we call
`cmdutil.checkunfinished()` and refuse to update, so the user
shouldn't be able to get into this state.
`test-rebase-interruptions.t` actually has some tests where it
disables the rebase extension in order to be allowed to do some of
these updates. That still passes, but I wouldn't personally haved
cared if that failed.
Differential Revision: https://phab.mercurial-scm.org/D7825
workingctx: move setparents() logic from localrepo to mirror overlayworkingctx
It would be nice to later be able to call `wctx.setparents()` whether
`wctx` is a `workingctx` or an `overlayworkingctx`.
Differential Revision: https://phab.mercurial-scm.org/D7823
overlayworkginctx: implement a setparents() to mirror dirstate.setparents()
This lets us make the in-memory and on-disk code a bit more
similar. I'll soon also implement setparents() on the regular
workingctx.
Differential Revision: https://phab.mercurial-scm.org/D7822
overlayworkingctx: default branch to base context's branch
This matches what the dirstate does (it reuses working copy parent's
branch unless told otherwise). By moving the default out of
`rebase.commitmemorynode()`, it will let us clean that up better
later.
Differential Revision: https://phab.mercurial-scm.org/D7821
grep: speed up `hg grep --all-files some/path` by using ctx.matches(match)
ctx.matches(match) avoids walking unintersting parts of the tree when
using tree manifests. That can make a very big difference when
grepping in a small subset of the tree (2.0s -> 0.7s in my case, but
can of course be made more extreme by picking a smaller subset of
files).
Differential Revision: https://phab.mercurial-scm.org/D7820
py3: byteify the opener option to use `rust.index` to allow Rust revlogs
It looks like this corresponds to the byteified key written in localrepo in
8042856c90b6.
Differential Revision: https://phab.mercurial-scm.org/D7818
graft: use revset for intersecting with ancestor set
This addresses a TODO added in
a1381eea7c7d (graft: do not use
`.remove` on a smart set (regression), 2014-04-28).
Differential Revision: https://phab.mercurial-scm.org/D7806
graft: don't remove from a list in a loop
This addresses a TODO added in
a1381eea7c7d (graft: do not use
`.remove` on a smart set (regression), 2014-04-28). I couldn't measure
any speedup.
Differential Revision: https://phab.mercurial-scm.org/D7805