File: __driver__.lua

package info (click to toggle)
monotone 1.1-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 20,984 kB
  • ctags: 8,622
  • sloc: cpp: 86,450; sh: 6,906; perl: 924; makefile: 813; python: 517; lisp: 379; sql: 118; exp: 91; ansic: 52
file content (29 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

includecommon("netsync.lua")
mtn_setup()
netsync.setup()

writefile("testfile", "I am you and you are me and we are all together.")
check(mtn2("add", "testfile"), 0, false, false)
check(mtn2("commit", "--branch=testbranch", "--message=foo"), 0, false, false)

check(mtn2("genkey", "foo@foo"), 0, false, false, string.rep("foo@foo\n",2))

srv = netsync.start()

srv:push("testbranch", 2)
srv:pull("testbranch", 3)

check(mtn3("ls", "keys"), 0, true, false)
check(not qgrep("foo@foo", "stdout"))

writefile("testfile", "stuffty stuffty")
check(mtn2("commit", "--branch=testbranch", "--message=foo", "--key=foo@foo"), 0, false, false)

srv:push("testbranch", 2)
srv:pull("testbranch", 3)

srv:finish()

check(mtn3("ls", "keys"), 0, true, false)
check(qgrep("foo@foo", "stdout"))