D4134: perf: call _generatechangelog() instead of group()

2018-08-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that we have a separate function for generating just the changelog bits, the perf command should call it so it gets more accurate behavior. This

D4136: changegroup: record changelogdone after fully consuming its data

2018-08-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Setting this as a side-effect of calling _close() is wonky. There's only one group for changelog data. So we can wait until after all data has been emitted

D4142: changegroup: extract _revisiondeltanormal() to standalone function

2018-08-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It wasn't accessing anything important on the cgpacker that warranted it being a method instead of a function. REPOSITORY rHG Mercurial REVISION DETAIL

D4108: index: extract a type for the nodetree

2018-08-06 Thread indygreg (Gregory Szorc)
indygreg added a comment. For the record, I'm not thrilled about queuing C code with known bugs. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4108 To: martinvonz, #hg-reviewers Cc: indygreg, yuja, mercurial-devel

D4126: absorb: remove sf alias for command

2018-08-06 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG80749ff64ef4: absorb: remove sf alias for command (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4126?vs=9993=10014

D4073: changegroup: rename "revlog" variables

2018-08-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY "revlog" shadows the module import. But more importantly, changegroup generation should be storage agnostic and not assume the existence of revlogs. Let's

D4074: changegroup: inline ellipsisdata()

2018-08-03 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY There's only one caller of it. I don't think it needs to exist as a standalone function. REPOSITORY rHG Mercurial REVISION DETAIL

D4155: changegroup: restore original behavior of _nextclrevtolocalrev

2018-08-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY https://phab.mercurial-scm.org/rHG0548f696795b6f30c32f11620ddc274a112260d3 accidentally changed the behavior of cgpacker._close(). The old behavior moved

D4136: changegroup: record changelogdone after fully consuming its data

2018-08-07 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10063. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4136?vs=10007=10063 REVISION DETAIL https://phab.mercurial-scm.org/D4136 AFFECTED FILES mercurial/changegroup.py CHANGE DETAILS diff --git

D4088: changegroup: move revision maps to cgpacker

2018-08-06 Thread indygreg (Gregory Szorc)
indygreg added subscribers: spectral, martinvonz, durin42. indygreg added inline comments. INLINE COMMENTS > changegroup.py:599-600 > +if self._nextclrevtolocalrev: > +self.clrevtolocalrev = self._nextclrevtolocalrev > +self._nextclrevtolocalrev.clear() >

D4144: changegroup: assign to proper attribute

2018-08-06 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG9134c4e46084: changegroup: assign to proper attribute (authored by indygreg, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D4144?vs=10019=10030#toc REPOSITORY rHG Mercurial

D3994: fastannotate: initial import from Facebook's hg-experimental

2018-08-07 Thread indygreg (Gregory Szorc)
indygreg added subscribers: yuja, indygreg. indygreg added a comment. I only looked at some of this code. Overall, my threshold for adding to core is low. I think we should land then iterate. I would **really** like to see functionality related to modifying the behavior of annotate

D4148: perf: add a command to benchmark linelog edits

2018-08-07 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > perf.py:904-912 > +random.seed(0) > +randint = random.randint > +currentlines = 0 > +ll = linelog.linelog() > +for rev in xrange(edits): > +a1 = randint(0, currentlines) > +a2 =

D4285: tests: conditionalize extension tests for extra extensions

2018-08-15 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY If extra extensions are loaded (e.g. via --extra-config-opt), the tests conditionalized in this commit fail in ways that are dependent on the extensions that

D4286: tests: add conditional output when simplestore extensions is loaded

2018-08-15 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This drops the number of failures with this extension to 3. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4286 AFFECTED FILES

D4283: webcommands: fix `@webcommand` decorator

2018-08-15 Thread indygreg (Gregory Szorc)
indygreg added a comment. This seems like a strict improvement. But the proper way to register web commands from extensions would be to go through the `registrar` API and have the extension loader look for a well-named symbol in each extension module that is loaded and hgweb would

D4286: tests: add conditional output when simplestore extensions is loaded

2018-08-15 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGe8532d00b729: tests: add conditional output when simplestore extensions is loaded (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4285: tests: conditionalize extension tests for extra extensions

2018-08-15 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGf2e645dc6a67: tests: conditionalize extension tests for extra extensions (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4307: dagutil: remove internalize() and internalizeall()

2018-08-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The previous commit removed the last consumer. .. api:: removed internalize() and internalizeall() from dagutil Use .rev(node) on storage objects to

D4305: dagutil: remove externalize() and externalizeall()

2018-08-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY They are unused after the previous commit. .. api:: externalize() and externalizeall() removed from dagutil Use .node() on a storage primitive to

D4303: exchange: don't use dagutil

2018-08-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We were only using it for simple node -> rev and parent revision lookups. These are exposed via the storage interface and we don't need to go through dagutil.

D4306: setdiscovery: don't use dagutil for node -> rev conversion

2018-08-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The node -> rev conversion is possible using standard storage APIs and doesn't need to involve the dagutil module. REPOSITORY rHG Mercurial REVISION DETAIL

D4304: setdiscovery: don't use dagutil for rev -> node conversions

2018-08-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We don't need to use dagutil to perform a simple rev -> node conversion. I haven't measured, but the new code is likely faster, as we avoid extra function

D4309: dagutil: remove nodeset()

2018-08-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY AFAICT this was unused since the code was introduced by https://phab.mercurial-scm.org/rHGcb98fed5249517b558fa07c7d0414c14cdfe4e4d in 2011! REPOSITORY rHG

D4310: setdiscovery: don't use dagutil to compute heads

2018-08-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is a relatively trivial operation to perform. We don't need to use dagutil. This brings us one step closer to eliminating dagutil. We still need

D4308: debugcommands: use a revset instead of dagutil

2018-08-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY All this code was doing was finding the nodes that are heads from the ancestors of an input set. This can easily be expressed with a revset without having to

D4302: rebase: call _dorebase() properly

2018-08-16 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This fixes a regression from https://phab.mercurial-scm.org/rHGe9e742bd0501c02d9a59a7829068117bee8c4674 where we failed to pass all necessary arguments to

D4302: rebase: call _dorebase() properly

2018-08-16 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG06baaf43c959: rebase: call _dorebase() properly (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4302?vs=10395=10396

D4064: changegroup: move close() from narrow

2018-08-06 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG75d6139e69f9: changegroup: move close() from narrow (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4064?vs=9804=9946

D4063: changegroup: move revchunk() from narrow

2018-08-06 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG66cf046ef60f: changegroup: move revchunk() from narrow (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4063?vs=9803=9944

D4065: changegroup: move _sortgroup() from narrow

2018-08-06 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc9315bc578bc: changegroup: move _sortgroup() from narrow (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4065?vs=9805=9945

D3991: absorb: import extension from Facebook's hg-experimental

2018-08-06 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. I'm fine taking this as-is. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3991 To: durin42, #hg-reviewers, indygreg Cc: indygreg, mercurial-devel

D4126: absorb: remove sf alias for command

2018-08-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I'm not even sure what it is supposed to stand for. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4126 AFFECTED FILES

D4127: changegroup: rename _packtreemanifests and adjust comment

2018-08-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Follow-up from review comments in https://phab.mercurial-scm.org/D4081. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4127

D4127: changegroup: rename _packtreemanifests and adjust comment

2018-08-06 Thread indygreg (Gregory Szorc)
indygreg abandoned this revision. indygreg added a comment. https://phab.mercurial-scm.org/D4124 is the better solution here. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4127 To: indygreg, #hg-reviewers Cc: mercurial-devel

D4225: repository: formalize interfaces for revision deltas and requests

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that we've sufficiently abstracted how revision deltas are produced in changegroup code, we can now start the process of formalizing that as part of the

D4231: mail: always fall back to iso-8859-1 if us-ascii won't work (BC)

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. This seems reasonable to me. It's only changing the email that is displayed. So I don't think we need to scrutinize this too much. REPOSITORY rHG Mercurial REVISION DETAIL

D4213: changegroup: differentiate between fulltext and diff based deltas

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG39b8277e2115: changegroup: differentiate between fulltext and diff based deltas (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4216: changegroup: capture base node instead of rev in delta request

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGd0d197ab0646: changegroup: capture base node instead of rev in delta request (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4209: changegroup: move manifest chunk emission to generate()

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc921ad9cae08: changegroup: move manifest chunk emission to generate() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4217: changegroup: invert conditional and dedent

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG0b5f534df82a: changegroup: invert conditional and dedent (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4215: changegroup: introduce requests to define delta generation

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGe793e11e1462: changegroup: introduce requests to define delta generation (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4210: changegroup: move file chunk emission to generate()

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc4a2d19d393a: changegroup: move file chunk emission to generate() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4208: changegroup: move size tracking and end of manifests to generate()

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG2ebdd265fe8c: changegroup: move size tracking and end of manifests to generate() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4214: changegroup: refactor delta parent code

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGef3d3a2f9aa5: changegroup: refactor delta parent code (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4214?vs=10208=10237

D4207: changegroup: emit delta group close chunk outside of deltagroup()

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGfcdab6629dde: changegroup: emit delta group close chunk outside of deltagroup() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4205: changegroup: pass all state into group()

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8c84f1ef949e: changegroup: pass all state into group() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4205?vs=10199=10229

D4206: changegroup: extract cgpacker.group() to standalone function

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. indygreg marked an inline comment as done. Closed by commit rHG9e8eb2b444e5: changegroup: extract cgpacker.group() to standalone function (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE

D4211: changegroup: emit revisiondelta instances from deltagroup()

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGd662959dc881: changegroup: emit revisiondelta instances from deltagroup() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4212: changegroup: minor cleanups to deltagroup()

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGad9eccedb379: changegroup: minor cleanups to deltagroup() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4224: changegroup: move node sorting into deltagroup()

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The 3 callers of deltagroup() all sort nodes and convert to integer revs immediately before calling deltagroup(). Stepping back a bit, aside from the

D4227: repository: remove storedeltachains from ifilestorage

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The ifilestorage interface was bootstrapped from requirements of callers outside the storage implementation (revlogs). I believe we even made some members

D4226: repository: establish API for emitting revision deltas

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY With our revision delta and revision delta request interfaces defined, it is now time to define a method on storage interfaces for using them. So far, the

D4206: changegroup: extract cgpacker.group() to standalone function

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg marked an inline comment as done. indygreg added inline comments. INLINE COMMENTS > durin42 wrote in changegroup.py:690 > nit: bytes > > (follow-up please, to avoid turnaround time issues) I rewrite the docstring later in the series. I was trying to optimize for review by not

D4209: changegroup: move manifest chunk emission to generate()

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > durin42 wrote in changegroup.py:879 > nit: this shadows the dir() builtin, which makes me a bit uncomfortable - > send a followup? > > ("tree" maybe?) This bothered me as well. I will happily submit a follow-up. Will tack it at the end of my

D4235: changegroup: rename dir to tree to avoid shadowing a built-in

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4235 AFFECTED FILES mercurial/changegroup.py CHANGE DETAILS diff --git a/mercurial/changegroup.py

D4214: changegroup: refactor delta parent code

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg added a comment. It is a hard problem because the server can't make any assumptions about what nodes the receiver has! So you either need the client to transmit the set of nodes it has. Without that, the best the server can do is encode a delta against a revision in the same delta

D4226: repository: establish API for emitting revision deltas

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg added a comment. There //might// be room to structure this as a pair of APIs: build delta requests and generate them. But I'm having a difficult time reconciling how ellipsis mode would fit in and how callbacks would work A benefit of having a pair of functions is that the

D4236: repository: remove candelta() from ifileindex

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY candelta() was previously called by changegroup code. With delta generation moved to the storage API, there are no more external consumers of this method and

D3955: mail: modernize check for Python-with-TLS

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. I think this utility function should live in `sslutil.py`. INLINE COMMENTS > mail.py:85-92 > +def _pyhastls(): > +"""Returns true iff Python has TLS support, false otherwise.""" >

D3953: mail: fix _encode to be more correct on Python 3

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added inline comments. This revision is now accepted and ready to land. INLINE COMMENTS > mail.py:249-254 > def _encode(ui, s, charsets): > '''Returns (converted) string, charset tuple. > Finds out best charset by cycling through sendcharsets

D4220: tests: fix Python3 issues in Python one-liners in test-patchbomb.t

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. Adding `# skip-blame` in flight. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4220 To: durin42, #hg-reviewers, indygreg Cc: indygreg, mercurial-devel

D4138: changegroup: pull _fileheader out of cgpacker

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG227ebd88ce5e: changegroup: pull _fileheader out of cgpacker (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4141: changegroup: inline _revchunk() into group()

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa3105433ecc4: changegroup: inline _revchunk() into group() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4140: changegroup: pass mfdicts properly

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGfbbda9ff3deb: changegroup: pass mfdicts properly (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4140?vs=10011=10147

D4142: changegroup: extract _revisiondeltanormal() to standalone function

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGd85b0d81112b: changegroup: extract _revisiondeltanormal() to standalone function (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4139: changegroup: pass sorted revisions into group() (API)

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG037debbf869c: changegroup: pass sorted revisions into group() (API) (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4193: changegroup: pass clrevtolocalrev to each group

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY clrevtolocalrev is a per-changegroup group mapping revisions to aid with shallow clone. Back when this functionality was implemented in an extension, this

D4190: changegroup: track changelog to manifest revision map explicitly

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, self._nextclrevtolocalrev was only populated as part of the changelog lookup callback. But cgpacker._close() was looking at

D4187: changegroup: move part of _revisiondeltanarrow into group()

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now all the logic for determining which delta generation code is called lives in a single function. REPOSITORY rHG Mercurial REVISION DETAIL

D4196: changegroup: make _revisiondeltanarrow() a standalone function

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It doesn't require any state on the packer. Everything impacting behavior is passed in as a function. So split it out, just like what was done for

D4197: changegroup: invert conditional and dedent

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I don't like seeing code that visually resembles the pyramid of doom. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4197

D4199: changegroup: inline _prune() into call sites

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The functionality is pretty simple. As a bonus, _prune() had special code for the manifest case. We can now exclude this check from the file call site.

D4191: changegroup: define linknodes callbacks in generatefiles()

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is how it is done everywhere else. But the logic here is a bit more complex because shallow clone needs to reference the original linknode

D4198: changegroup: inline _packmanifests() into generatemanifests()

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It is relatively small. Every other generate*() calls group() directly. So the new code is consistent. REPOSITORY rHG Mercurial REVISION DETAIL

D4194: changegroup: inline _close()

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that it doesn't clear self._clrevtolocalrev on every invocation and is a simple one-liner that calls another function, we can do away with this method and

D4189: changegroup: remove _clnodetorev

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY cgpacker._clnodetorev is a glorified cache/index of changelog nodes to revision numbers. I'm not sure why it exists. Maybe performance? But its presence

D4188: changegroup: rename _fullnodes to _fullclnodes

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY So it is obvious which nodes we are talking about. And sneak in a docs change to reflect that this variable is a set. REPOSITORY rHG Mercurial REVISION

D4186: changegroup: populate _clnodetorev as part of changelog linknode lookup

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The thing that matters is that self._clnodetorev is populated with changesets that are being sent. Back when this code was in an extension, it wasn't possible

D4195: changegroup: pass state into _revisiondeltanarrow

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY After this, the method no longer accesses self and be split into a standalone function. REPOSITORY rHG Mercurial REVISION DETAIL

D4192: changegroup: combine _generatefiles() into generatefiles()

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY These were split out in https://phab.mercurial-scm.org/rHGa06aab274aef44ed121a1bd96e907e323c45438a as part of moving the narrow code into core. They don't need

D4133: changegroup: factor changelog chunk generation into own function

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGf7228c907ef4: changegroup: factor changelog chunk generation into own function (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4137: changegroup: factor changelogdone into an argument

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG4a202bccafcf: changegroup: factor changelogdone into an argument (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4132: changegroup: pass function to resolve delta parents into constructor

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG87b737b78bd0: changegroup: pass function to resolve delta parents into constructor (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4135: changegroup: key off changelogdone

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGd2ab0db89465: changegroup: key off changelogdone (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4135?vs=10006=10142

D4136: changegroup: record changelogdone after fully consuming its data

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG6d726d1b08cb: changegroup: record changelogdone after fully consuming its data (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4134: perf: call _generatechangelog() instead of group()

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa1f694779b2f: perf: call _generatechangelog() instead of group() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4155: changegroup: restore original behavior of _nextclrevtolocalrev

2018-08-09 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG4f06e0360bad: changegroup: restore original behavior of _nextclrevtolocalrev (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4229: patchbomb: don't unintentionally duplicate headers

2018-08-09 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. Eww. But I got nothing better that doesn't involve reconstructing the message instance :/ REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4229 To:

D4271: changegroup: rename mfs to manifests

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY In the name of readability. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4271 AFFECTED FILES mercurial/changegroup.py CHANGE

D4274: manifest: remove addgroup() from manifestlog and imanifestlog

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY addgroup() is part of the storage interface for manifests. Unfortunately, we don't yet have a formal storage interface for manifests. (One will be established

D4272: changegroup: change topics during generation

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Changegroup generation and consumption currently uses different sets of topics. Generation uses "bundling" and consumption uses the name of the thing being

D4273: repository: clarify role of imanifestlog

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Looking at the implementation of manifest.manifestlog, it is highly tailored towards servicing the root manifest. So clarify that in the interface docstring.

D4269: changegroup: call rev() on manifestlog instance

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY rev() is part of the imanifestlog interface and should be used instead of using the private revlog instance, which is an implementation detail. REPOSITORY

D4279: manifest: use rev() instead of nodemap.__contains__

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY nodemap is an implementation detail of revlogs and isn't appropriate to expose on the manifest storage API. While revlogs don't have a __contains__, they do

D4276: manifest: rename dir argument and attribute to tree

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY dir shadows a built-in. We use it throughout the manifest code, which is unfortunate. This commit updates just manifestrevlog to be more well behaved.

D4275: manifest: set appropriate cache entry when clearing _dirlogcache()

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY manifestrevlog applies to any manifest, not just the root manifest. Resetting the cache and populating its root entry with self is not correct when the

D4278: manifest: rename manifestlog._treeinmem to ._treemanifests

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Not sure what "inmem" was supposed to indicate. This object is an interface to manifest data on disk as well as "in memory" (assuming that's what "inmem"

D4277: manifest: add getstorage() to manifestlog and use it globally

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It is a common pattern to obtain a directory manifest storage instance (a manifestrevlog) by going through manifestlog._revlog.dirlog(). Why access to

D4270: changegroup: clean up changelog callback

2018-08-13 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY changelog.read() calls changelog.changelogrevion() then turns it into a tuple. Let's call changelogrevision() directly and used named attributes to make code

<    6   7   8   9   10   11   12   13   14   15   >