File: __driver__.lua

package info (click to toggle)
monotone 1.0-6
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 20,708 kB
  • sloc: cpp: 84,765; sh: 6,787; perl: 837; makefile: 833; python: 517; lisp: 379; sql: 118; exp: 88; ansic: 52
file content (38 lines) | stat: -rw-r--r-- 823 bytes parent folder | download | duplicates (6)
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
30
31
32
33
34
35
36
37
38

mtn_setup()

writefile("foo", "the foo file")

writefile("bar", "the bar file")

writefile("missingfoo", "foo\n")

writefile("missingbar", "bar\n")

check(mtn("ls", "missing"), 0, false)

check(mtn("add", "foo", "bar"), 0, false, false)
check(mtn("ls", "missing"), 0, false)

remove("foo")
check(mtn("ls", "missing"), 0, true, 0)
canonicalize("stdout")
check(samefile("stdout", "missingfoo")) 

writefile("foo")
check(mtn("drop", "--bookkeep-only", "foo"), 0, false, false)
remove("foo")
check(mtn("ls", "missing"), 0, 0, 0)

commit()
check(mtn("ls", "missing"), 0, 0, 0)

remove("bar")
check(mtn("ls", "missing"), 0, true, 0)
canonicalize("stdout")
check(samefile("stdout", "missingbar")) 

writefile("bar")
check(mtn("drop", "--bookkeep-only", "bar"), 0, false, false)
remove("bar")
check(mtn("ls", "missing"), 0, 0, 0)