Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 12:06:31 -0400] rev 38987
absorb: port partway to Python 3
Use pycompat.maplist() in the one place that matters and use the
default iterator of a dict instead of iterkeys().
Two new tests pass on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D4174
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sat, 04 Aug 2018 21:31:46 -0400] rev 38986
localrepo: better error when a repo exists but we lack permissions
Claiming "repository foo not found" when the repository does exist
causes confusion regularly ("where is the typo?").
Differential Revision: https://phab.mercurial-scm.org/D4122
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 11:32:16 -0700] rev 38985
changegroup: extract _revisiondeltanormal() to standalone function
It wasn't accessing anything important on the cgpacker that warranted
it being a method instead of a function.
Differential Revision: https://phab.mercurial-scm.org/D4142
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 11:13:25 -0700] rev 38984
changegroup: inline _revchunk() into group()
_revchunk() was pretty minimal. I think having all the code for
generating data composing the changegroup in one function makes
things easier to understand.
As part of the refactor, we now call the _revisiondelta* functions
explicitly. This paves the road to refactor their argument
signatures.
Differential Revision: https://phab.mercurial-scm.org/D4141
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 11:06:22 -0700] rev 38983
changegroup: pass mfdicts properly
With the narrow code part of core, the hacky pass-argument-via-
attribute-on-self can be accomplished with a regular function
argument.
Differential Revision: https://phab.mercurial-scm.org/D4140
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 06 Aug 2018 11:33:05 -0700] rev 38982
changegroup: pass sorted revisions into group() (API)
Currently, group() receives a list of nodes and calls _sortgroup()
to sort them and turn them into revs. Since the sorting behavior
varies depending on the type of data being transferred, I think it
makes sense to perform the sorting before group() is invoked.
This commit extracts _sortgroup() to a pair of standalone functions.
It then moves the calling of these functions to the 3 call sites of
group(). group() now receives an iterable of revs instead of nodes.
Differential Revision: https://phab.mercurial-scm.org/D4139
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 18:40:41 -0700] rev 38981
changegroup: pull _fileheader out of cgpacker
It doesn't need any state from the packer.
Differential Revision: https://phab.mercurial-scm.org/D4138