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 (32 lines) | stat: -rw-r--r-- 851 bytes parent folder | download | duplicates (7)
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

mtn_setup()
revs = {}

addfile("file1", "1: data 1")
addfile("file2", "2: data 1")
commit()
revs[1] = base_revision()

writefile("file1", "1: data 2")
writefile("file2", "2: data 2")
commit()
revs[2] = base_revision()

writefile("file1", "1: data 3")
writefile("file2", "2: data 3")

check(mtn("diff", "file1"), 0, true, false)
check(qgrep("file1", "stdout"))
check(not qgrep("file2", "stdout"))

check(mtn("diff", "--revision", revs[1], "file1"), 0, true, false)
check(qgrep("file1", "stdout"))
check(not qgrep("file2", "stdout"))

check(mtn("diff", "--revision", revs[1], "--revision", revs[2], "file1"), 0, true, false)
check(qgrep("file1", "stdout"))
check(not qgrep("file2", "stdout"))

check(mtn("diff", "--revision", revs[2], "--revision", revs[1], "file1"), 0, true, false)
check(qgrep("file1", "stdout"))
check(not qgrep("file2", "stdout"))