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 (42 lines) | stat: -rw-r--r-- 884 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
39
40
41
42
-- -*- lua -*-

revs = {}

mtn_setup()

-- empty graph
check(mtn("automate", "roots"), 0, false, false)

-- add something on first branch
addfile("testfile", "blah blah")
commit()
revs.a = base_revision()

check(mtn("automate", "roots"), 0, true, false)
check(trim(readfile("stdout")) == revs.a)

-- add another rev on that branch
writefile("testfile", "other stuff")
commit()
revs.b = base_revision()


-- now, make a new branch
remove("testfile")
remove("_MTN")
check(mtn("setup", "--branch=otherbranch", "."), 0, false, false)

-- and add something there
addfile("otherfile", "blah blah")
commit()
revs.c = base_revision()
addfile("otherfile", "foo")
commit()
revs.d = base_revision()

-- now check
check(mtn("automate", "roots"), 0, true, false)
check(qgrep(revs.a, "stdout"))
check(qgrep(revs.c, "stdout"))
check(not(qgrep(revs.b, "stdout")))
check(not(qgrep(revs.d, "stdout")))