Anton Shestakov <av6@dwimlabs.net>, Sun, 23 Oct 2016 17:53:32 +0800
hglib: make inner loop in runcommand() use a coroutine
Then it's possible to do something nontrivial using the more low-level
client.runcommand_co().
A pure-Lua library for interacting with Mercurial's command server. It's useful
for Lua applications that want to get all kinds of repository data fast.
Compared to the usual way of executing multiple
`hg command`, this library
skips the overhead of starting up a new process every time.
local hglib = require 'hglib'
local client = hglib.Client.open('.')
local code, o, e, d = client:runcommand({'log', '-r0'})
### 0.8 (Not released yet) Version number chosen based on the current state of the project: "about two
point-releases before 1.0". Things that are still missing (for a 1.0):
- Maybe use something better than lpc
- Handle cases when command needs input, but user provided nil