D3267: repository: define new interface for running commands

2018-04-13 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGfa0382088993: repository: define new interface for running commands (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3267?vs=

D3267: repository: define new interface for running commands

2018-04-13 Thread indygreg (Gregory Szorc)
indygreg added a comment. We now send non-batchable commands immediately and wrap queued futures so `result()` will trigger submission. This improves the end-user experience from: with peer.commandexecutor() as e: f = e.callcommand(...) res = f.result() to w

D3267: repository: define new interface for running commands

2018-04-13 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 8120. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3267?vs=8033&id=8120 REVISION DETAIL https://phab.mercurial-scm.org/D3267 AFFECTED FILES mercurial/repository.py CHANGE DETAILS diff --git a/mercurial/reposi

D3267: repository: define new interface for running commands

2018-04-13 Thread indygreg (Gregory Szorc)
indygreg planned changes to this revision. indygreg added a comment. I'll be making small revisions to the interface docs and implementation. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3267 To: indygreg, #hg-reviewers Cc: mercurial-devel

D3267: repository: define new interface for running commands

2018-04-11 Thread indygreg (Gregory Szorc)
indygreg added a comment. After coding up a handful of patches to switch to the new interface, I concede that I like the use of methods on the existing API. However, it is important for protocol version 2 that the peer interface switch to futures. I'm very reluctant to change the return valu

D3267: repository: define new interface for running commands

2018-04-11 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Today, the peer interface exposes methods for each command that can be executed. In addition, there is an iterbatch() API that allows commands to be issued in b