sha1dc: initial implementation of Python extension
A future change will use this when available to avoid sha1 collision
issues until we can get moved to something else.
Differential Revision: https://phab.mercurial-scm.org/D7815
sha1dc: import latest version from github
After the recent SHA1 news, the attacks are serious enough we should
be more proactive. This code will at least allow detection of attacks
early. It's already widely deployed in Git.
This is git revision
855827c583bc30645ba427885caa40c5b81764d2 of the
sha1collisiondetection repo[0], with most of the files omitted. A
follow-up change will introduce Python bindings for this code.
0: https://github.com/cr-marcstevens/sha1collisiondetection
Differential Revision: https://phab.mercurial-scm.org/D7814
transaction: add a `hasfinalize` method
The method allow code to check if an existing callback exists. It allow them to
skip potentially expensive setup for a callback.
Differential Revision: https://phab.mercurial-scm.org/D7832
changelog: fix the diverted opener to accept more kwargs
The current code prevent the use of `atomictemp` file with the changelog
opener. I do not see a good reason for this limitation.
Differential Revision: https://phab.mercurial-scm.org/D7831
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