File: __driver__.lua

package info (click to toggle)
monotone 1.1-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 20,648 kB
  • sloc: cpp: 86,443; sh: 6,906; perl: 924; makefile: 838; python: 517; lisp: 379; sql: 118; exp: 91; ansic: 52
file content (58 lines) | stat: -rw-r--r-- 1,208 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

mtn_setup()
revs = {}

addfile("foo", "foo")
addfile("bar", "bar")

commit()
revs[1] = base_revision()

mkdir("dir1")
mkdir("dir2")
addfile("dir1/file1", "dir1/file1")

commit()
revs[2] = base_revision()

addfile("dir2/file2", "dir2/file2")

commit()
revs[3] = base_revision()

writefile("foo", "foofoo")
writefile("bar", "barbar")
writefile("dir1/file1", "dir1/file1 asdf")
writefile("dir2/file2", "dir2/file2 asdf")

commit()
revs[4] = base_revision()

writefile("dir1/file1", "dir1/file1 asdf asdf")

commit()
revs[5] = base_revision()

writefile("dir2/file2", "dir2/file2 asdf asdf")

commit()
revs[6] = base_revision()

check(mtn("attr", "set", "dir2/", "myattr", "myval"), 0, false, false)
commit()
revs[7] = base_revision()

for n,x in pairs{[""]  = {0,0,0,0,0,0,0},
                 ["."] = {0,0,0,0,0,0,0},
                 dir1  = {1,0,1,0,0,1,1},
                 dir2  = {1,1,0,0,1,0,0}} do
  if n == "" then
    check(mtn("log", "--no-graph"), 0, true)
  else
    check(mtn("log", "--no-graph", n), 0, true, false)
  end
  for i,v in pairs(x) do
    L("Checking log of '", n, "' for revision ", i, "\n")
    check((v == 0) == qgrep("^Revision: "..revs[i], "stdout"), 0, false, false)
  end
end