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 (28 lines) | stat: -rw-r--r-- 936 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
-- 
-- subsequent test for automate put_revision
-- this should error out since the file version for foo.txt is unknown
--
mtn_setup()

-- added files are checked
rev = ("format_version \"1\"\n\n"..
       "new_manifest [0000000000000000000000000000000000000000]\n\n"..
       "old_revision []\n\n"..
       "add_dir \"\"\n\n"..
       "add_file \"foo.txt\"\n"..
       " content [1234567890123456789012345678901234567890]")
check(mtn("automate", "put_revision", rev), 1, false, false)

addfile("foo", "asdf")
commit()
fhash = sha1("foo")
rhash = base_revision()

-- modified files are also checked
rev = ("format_version \"1\"\n\n"..
       "new_manifest [0000000000000000000000000000000000000000]\n\n"..
       "old_revision [" .. rhash .. "]\n\n"..
       "patch \"foo\"\n"..
       " from [" .. fhash .. "]\n"..
       "   to [0000000000000000000000000000000000000000]")
check(mtn("automate", "put_revision", rev), 1, false, false)