Download:
child 37:e7e650632cc8
parent 35:9dcbc37ecb32
36:e364e0f5ad89
Anton Shestakov <av6@dwimlabs.net>, Mon, 17 Oct 2016 23:27:50 +0800
docs: add a readme

1 файлов изменено, 46 вставок(+), 0 удалений(-) [+]
README.md file | annotate | diff | comparison | revisions
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md Mon Oct 17 23:27:50 2016 +0800
@@ -0,0 +1,46 @@
+# hglib
+
+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.
+
+
+## License
+
+MIT.
+
+
+## Usage
+
+``lua
+local hglib = require 'hglib'
+local client = hglib.Client.open('.')
+local code, o, e, d = client:runcommand({'log', '-r0'})
+client:close()
+print('Output: ' .. o)
+if #e > 0 then
+ print('Error: ' .. e)
+end
+if #d > 0 then
+ print('Debug: ' .. d)
+end
+``
+
+
+## Caveats
+
+lpc is Lua 5.1-only.
+
+
+## Release Notes
+
+### 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):
+
+- Better docs
+- Maybe use something better than lpc
+- Handle cases when command needs input, but user provided nil
+- ??????