D4354: cmdutil: return a revlog from openrevlog() and split function

2018-08-22 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The filelog class is a wrapper around a revlog instance. I have plans to give manifests and the changelog a similar treatment. When filelog was ported away

D4357: debugcommands: use openstorage() in debugdata

2018-08-22 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Nothing we're doing here requires a revlog. So use openstorage(). .. bc:: `hg debugdata` no longer accepts the path to a revlog file. REPOSITORY rHG

D4355: debugcommands: use openstorage() in debugindexdot

2018-08-22 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY And add test coverage for changelog and manifests. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4355 AFFECTED FILES

D4269: changegroup: call rev() on manifestlog instance

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa79279a21b0a: changegroup: call rev() on manifestlog instance (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4227: repository: remove storedeltachains from ifilestorage

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG0a5b20c107a6: repository: remove storedeltachains from ifilestorage (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

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

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8b9b93bf70b1: changegroup: rename dir to tree to avoid shadowing a built-in (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4236: repository: remove candelta() from ifileindex

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG3682b49e0213: repository: remove candelta() from ifileindex (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4224: changegroup: move node sorting into deltagroup()

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG2646b8d66b7b: changegroup: move node sorting into deltagroup() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4268: manifest: rename dir to tree to avoid shadowing built-in

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG43387fd2aa1f: manifest: rename dir to tree to avoid shadowing built-in (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4271: changegroup: rename mfs to manifests

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGcc957b9dc335: changegroup: rename mfs to manifests (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4271?vs=10343=10518

D4226: repository: establish API for emitting revision deltas

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGb41d023a412a: repository: establish API for emitting revision deltas (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4225: repository: formalize interfaces for revision deltas and requests

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGb518d495a560: repository: formalize interfaces for revision deltas and requests (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

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

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGaad4b46e89bb: manifest: remove addgroup() from manifestlog and imanifestlog (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

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

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG1347bcf52d51: manifest: set appropriate cache entry when clearing _dirlogcache() (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4272: changegroup: change topics during generation

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG0617a700ef7b: changegroup: change topics during generation (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

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

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG73cf21b2e8a6: manifest: add getstorage() to manifestlog and use it globally (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4276: manifest: rename dir argument and attribute to tree

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG0d97530eb535: manifest: rename dir argument and attribute to tree (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4278: manifest: rename manifestlog._treeinmem to ._treemanifests

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG071f97d03acb: manifest: rename manifestlog._treeinmem to ._treemanifests (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4270: changegroup: clean up changelog callback

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG3634ed953a42: changegroup: clean up changelog callback (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4270?vs=10342=10517

D4273: repository: clarify role of imanifestlog

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG2af6b2d8d1d8: repository: clarify role of imanifestlog (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4273?vs=10345=10520

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

2018-08-22 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG61700d525a3b: manifest: use rev() instead of nodemap.__contains__ (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4389: manifest: change terminology for storage in context classes

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Storage may not be backed by revlogs. So it is wrong to refer to storage as "revlog" or use abbreviations like "rl." This commit replaces revlog terminology

D4387: manifest: make tree a public attribute

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY changegroup generation accesses this attribute. We should make it public and expose it on the interface. REPOSITORY rHG Mercurial REVISION DETAIL

D4390: perf: use storage API for resolving manifest node

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY lookup() isn't part of the storage API. And this code shouldn't be accessing manifestlog._revlog directly for the modern code base. So let's port it to the

D4388: manifest: don't go through revlog to access node symbols

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The revlog module re-exports some node.* symbols courtesy of importing them. Let's access the node.* symbols via our local import. REPOSITORY rHG Mercurial

D4386: manifest: proxy to revlog instance instead of inheriting

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, manifestrevlog inherited revlog.revlog and therefore exposed all its APIs. This inevitably resulted in consumers calling low-level revlog APIs.

D4391: perf: add function for obtaining manifest revision

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will use the modern API if available or fall back to the legacy direct revlog access case. Without this, the perf command won't work on all code bases.

D4392: manifest: use public API for obtaining storage object

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We should not be accessing private attributes on the manifestlog, since its behavior is governed by an interface. REPOSITORY rHG Mercurial REVISION DETAIL

D4393: manifest: rename manifestlog._revlog to _rootstore

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Because it may not be a revlog. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4393 AFFECTED FILES mercurial/manifest.py CHANGE

D4394: manifest: use fulltextcache instead of _fulltextcache

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY fulltextcache is part of the documented interface and is aliased to _fulltextcache. REPOSITORY rHG Mercurial REVISION DETAIL

D4395: tests: mark manifestfulltextcache as conditional on revlog store

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This file is currently specific to the revlog store. Other stores may not implement it. Mark it as such in test output. REPOSITORY rHG Mercurial

D4399: stringutil: teach pprint() to indent

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will make data structure dumping in various places a bit easier to read and diff. Since I wanted this for `hg debugwireproto` output, I added indentation

D4397: stringutil: refactor core of pprint so it emits chunks

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This commit splits the core of pprint() to a new function that is a generator of chunks instead of a function returning a single value. This will make it

D4398: stringutil: emit multiple chunks when pretty printing

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This avoids concatenating output inside pprintgen() itself. But the real reason for this is it will make it easier to add indentation, as we'll need to account

D4396: stringutil: teach pprint() to recognize generators

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Otherwise they get serialized as e.g. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4396 AFFECTED FILES

D4386: manifest: proxy to revlog instance instead of inheriting

2018-08-27 Thread indygreg (Gregory Szorc)
indygreg planned changes to this revision. indygreg added a comment. In https://phab.mercurial-scm.org/D4386#67436, @martinvonz wrote: > Adding proxies can be costly, but maybe performance only matters for the changelog? I can imagine `hg verify` being the command most affected by this

D3963: merge: mark file gets as CPU heavy

2018-07-17 Thread indygreg (Gregory Szorc)
indygreg added a subscriber: wlis. indygreg added a comment. CC @wlis since this change will impact Facebook. I'd also appreciate validation of my assertions in the commit message about the behavior of remotefilelog and working directory updates being more I/O than CPU/GIL bound. REPOSITORY

D3963: merge: mark file gets as CPU heavy

2018-07-17 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY In default installs, this has the effect of disabling the thread-based worker on Windows when manifesting files in the working directory. My measurements have

D3962: worker: ability to disable worker for CPU heavy tasks

2018-07-17 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The worker on Windows is implemented using a thread pool. If worker tasks are executing CPU bound code and holding onto the GIL, there will be non-substantial

D3961: worker: rename variable to reflect constant

2018-07-17 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/D3961 AFFECTED FILES mercurial/worker.py CHANGE DETAILS diff --git a/mercurial/worker.py

D3963: merge: mark file gets as not thread safe

2018-07-18 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 9624. indygreg edited the summary of this revision. indygreg retitled this revision from "merge: mark file gets as CPU heavy" to "merge: mark file gets as not thread safe". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D3962: worker: ability to disable thread unsafe tasks

2018-07-18 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 9623. indygreg edited the summary of this revision. indygreg retitled this revision from "worker: ability to disable worker for CPU heavy tasks" to "worker: ability to disable thread unsafe tasks". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D3943: scmutil: rewrite docstring for filecache

2018-07-13 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG3b072388ca78: scmutil: rewrite docstring for filecache (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3943?vs=9588=9589

D3932: tests: add test demonstrating phase loss when cloning (issue5939)

2018-07-13 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG2a227782e754: tests: add test demonstrating phase loss when cloning (issue5939) (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D3958: Allow to run setup.py with python 3 without a mercurial checkout

2018-07-16 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. I'm OK with this undocumented hack. And there are cases where we may want to test setup.py outside the context of a checkout as well. The important thing is end-users not running

D3958: Allow to run setup.py with python 3 without a mercurial checkout

2018-07-16 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGd5b31ae9cc0a: Allow to run setup.py with python 3 without a mercurial checkout (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D3963: merge: mark file gets as not thread safe

2018-07-19 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGbe4984261611: merge: mark file gets as not thread safe (issue5933) (authored by indygreg, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D3963?vs=9624=9631#toc REPOSITORY

D3961: worker: rename variable to reflect constant

2018-07-19 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG69ed2cff4277: worker: rename variable to reflect constant (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3961?vs=9619=9629

D3962: worker: ability to disable thread unsafe tasks

2018-07-19 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGef3838a47503: worker: ability to disable thread unsafe tasks (authored by indygreg, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D3962?vs=9623=9630#toc REPOSITORY rHG

D3966: configitems: restore alias for format.aggressivemergedeltas

2018-07-19 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/rHG913ca175c4ae040094cb1c5e292e6cf6168acc2d broke BC by dropping support for reading format.aggressivemergedeltas. Let's restore

D3966: configitems: restore alias for format.aggressivemergedeltas

2018-07-19 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGe90130af47ce: configitems: restore alias for format.aggressivemergedeltas (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4436: httppeer: expose capabilities for each command

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will help code using peers to sniff out exactly what servers support. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4436

D4442: internals: extract wire protocol version 2 commands to standalone doc

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY wireprotocol.txt is a bit long and unwieldy. I think splitting it up will help aid comprehension. Let's start by extracting wire protocol version 2 commands

D4438: httppeer: add TODO about delayed handling of ^C

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY When testing wire protocol v2 with large responses, I noticed that ^C doesn't result in immediate termination. I'm not sure what the root cause is. Let's add a

D4443: internals: extract frame-based protocol docs to own document

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY wireprotocol.txt is quite long and difficult to digest. The frame-based protocol is effectively a standalone concept (and could even be used outside of

D4439: wireprotov2peer: split responsedata handling into separate function

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY So we don't have so much logic inside an if/elif block. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4439 AFFECTED

D4441: wireprotov2peer: properly format errors

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY formatrichmessage() expects an iterable containing dicts with well-defined keys. We were passing in something else. This caused an exception. Change the

D4437: httppeer: log commands for version 2 peer

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This will aid testing and debugging. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4437 AFFECTED FILES mercurial/httppeer.py

D4433: cborutil: remove readindefinitebytestringtoiter()

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This was implemented as part of implementing streaming encoding. It was never used outside of tests. Now that we have a full CBOR decoder, it can be used

D4435: wireprotov2peer: add TODO about streaming responses

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is a pretty big deficiency in the current implementation. We don't want to forget about this. REPOSITORY rHG Mercurial REVISION DETAIL

D4434: cborutil: add a buffering decoder

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The sansiodecoder leaves it up to the callers to feed in data that wasn't fully consumed last time. This commit implements a decoder that performs buffering

D4440: wireprotov2peer: report exceptions in frame handling against request future

2018-08-31 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Otherwise the future may never resolve, which could cause deadlock. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4440 AFFECTED

D4442: internals: extract wire protocol version 2 commands to standalone doc

2018-09-04 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGdc61a67c1fc0: internals: extract wire protocol version 2 commands to standalone doc (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4465: httppeer: use our CBOR decoder

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We just implemented our own CBOR decoder. Let's use it in httppeer. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4465 AFFECTED

D4468: wireprotov2server: use our CBOR encoder

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Again, test output changed slightly because of map key ordering differences. This shouldn't matter. I could have called oncommandresponsereadygen() with the

D4472: wireprotov2: implement commands as a generator of objects

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, wire protocol version 2 inherited version 1's model of having separate types to represent the results of different wire protocol commands. As

D4438: httppeer: add TODO about delayed handling of ^C

2018-09-04 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG3c6f7eebc010: httppeer: add TODO about delayed handling of ^C (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4467: wireprotoserver: use our CBOR encoder

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Moving away from the vendored package. Again, our encoder normalizes keys differently from the vendored package (for now), hence the test changes.

D4437: httppeer: log commands for version 2 peer

2018-09-04 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG3fe028b657bf: httppeer: log commands for version 2 peer (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4437?vs=10694=10757

D4473: wireprotoframing: buffer emitted data to reduce frame count

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY An upcoming commit introduces a wire protocol command that can emit hundreds of thousands of small objects. Without a buffering layer, we would emit a single,

D4436: httppeer: expose capabilities for each command

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10761. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4436?vs=10693=10761 REVISION DETAIL https://phab.mercurial-scm.org/D4436 AFFECTED FILES mercurial/httppeer.py CHANGE DETAILS diff --git

D4471: state: use our CBOR module

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This was the last consumer of the vendored CBOR package in core. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4471 AFFECTED

D4466: wireprotoframing: use our CBOR module

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Tests changed because our CBOR encoder appears to sort map keys differently from the vendored CBOR package. The CBOR specification does define canonical

D4435: wireprotov2peer: add TODO about streaming responses

2018-09-04 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG1467b6c27ff9: wireprotov2peer: add TODO about streaming responses (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4439: wireprotov2peer: split responsedata handling into separate function

2018-09-04 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc734a5c82f38: wireprotov2peer: split responsedata handling into separate function (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D4469: debugcommands: use our CBOR decoder

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It implements the set of CBOR needed for the wire protocol. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4469 AFFECTED FILES

D4470: wireprotov2peer: use our CBOR decoder

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Behavior should be the same in order to preserve backwards compatibility. We obviously want to stream values in this code. We'll do that in subsequent commits.

D4474: wireprotov2peer: stream decoded responses

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, wire protocol version 2 would buffer all response data. Only once all data was received did we CBOR decode it and resolve the future

D4475: setup: don't support py 3.5.0, 3.5.1, 3.5.2 because of bug in codecs

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg accepted this revision. indygreg added a comment. This revision is now accepted and ready to land. I'm a bit wary of version sniffing for the same reason that `User-Agent` sniffing is bad in web design: it assumes that version number strings map to behavior. The best way to test for

D4478: merge: use vfs methods for I/O

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY All I/O is supposed to be performed via vfs instances so filesystems can be abstracted. The previous commit ported the old code in purge, which didn't go

D4477: merge: move purge logic from extension

2018-09-04 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Working directory purging feels like functionality that should be in core rather than in an extension. This commit effectively moves the core purging logic

D4474: wireprotov2peer: stream decoded responses

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10792. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4474?vs=10771=10792 REVISION DETAIL https://phab.mercurial-scm.org/D4474 AFFECTED FILES mercurial/debugcommands.py mercurial/wireprotov2peer.py

D4487: wireprotov2: add TODOs around extending changesetdata fields

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Extensions will inevitably want to extend the set of changeset data/fields that can be requested. We'll need to implement support for extending this in the

D4492: wireprotov2: let clients drive delta behavior

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, the "manifestdata" and "filedata" commands assumed the receiver had all parent revisions for requested nodes. Unless the revision had no parents,

D4480: exchangev2: start to implement pull with wire protocol v2

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Wire protocol version 2 will take a substantially different approach to exchange than version 1 (at least as far as pulling is concerned). This commit

D4472: wireprotov2: implement commands as a generator of objects

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10791. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4472?vs=10769=10791 REVISION DETAIL https://phab.mercurial-scm.org/D4472 AFFECTED FILES mercurial/error.py mercurial/help/internals/wireprotocolrpc.txt

D4490: wireprotov2: define and implement "filedata" command

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Continuing our trend of implementing *data commands for retrieving information about specific repository data primitives, this commit implements a command for

D4482: exchangev2: fetch changeset revisions

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY All Mercurial repository data is derived from changesets: you can't do anything unless you have changesets. Therefore, it makes sense for changesets to be the

D4483: wireprotov2: add phases to "changesetdata" command

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This commit teaches the "changesetdata" wire protocol command to emit the phase state for each changeset. This is a different approach from existing phase

D4486: exchangev2: fetch and apply bookmarks

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is pretty similar to phases data. We collect bookmarks data as we process records. Then at the end we make a call to the bookmarks subsystem to reflect

D4488: wireprotov2: define and implement "manifestdata" command

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The added command can be used for obtaining manifest data. Given a manifest path and set of manifest nodes, data about manifests can be retrieved. Unlike

D4465: httppeer: use our CBOR decoder

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg added a comment. In https://phab.mercurial-scm.org/D4465#68517, @pulkit wrote: > Queued the cbor patches. I think following can improve the code more: > > - Having a `cborutil.decodeone()` function which can make sure we only have one dcoded value and using that fn instead

D4441: wireprotov2peer: properly format errors

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 10790. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4441?vs=10698=10790 REVISION DETAIL https://phab.mercurial-scm.org/D4441 AFFECTED FILES mercurial/wireprotoframing.py mercurial/wireprotov2peer.py CHANGE

D4485: wireprotov2: add bookmarks to "changesetdata" command

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Like we did for phases, we want to emit bookmarks data attached to each changeset. The approach here is very similar to phases: we emit bookmarks data

D4491: exchangev2: fetch file revisions

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that the server has an API for fetching file data, we can call into it to fetch file revisions. The implementation is relatively straightforward: we

D4489: exchangev2: fetch manifest revisions

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that the server has support for retrieving manifest data, we can implement the client bits to call it. We teach the changeset fetching code to capture

D4481: wireprotov2: define and implement "changesetdata" command

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This commit introduces the "changesetdata" wire protocol command. The role of the command is to expose data associated with changelog revisions, including the

D4484: exchangev2: fetch and apply phases data

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Now that the server supports emitting phases data, we can request it and apply it on the client. Because we may receive phases-only updates from the server,

D4483: wireprotov2: add phases to "changesetdata" command

2018-09-05 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > pulkit wrote in wireprotocolv2.txt:155 > Won't it be better to use phase numbers here because that's how we represent > phases at most of the places. If you agree, I can send a followup for that. I have no strong opinions. Using strings is more

D4498: util: properly copy lrucachedict instances

2018-09-06 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, copy() only worked if the cache was full. We teach copy() to only copy defined nodes. REPOSITORY rHG Mercurial REVISION DETAIL

<    8   9   10   11   12   13   14   15   16   17   >