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 (46 lines) | stat: -rw-r--r-- 1,027 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46

mtn_setup()

-- This test relies on file-suturing

--
-- If two people begin a branch with the same name,
-- then the branch does not have a unique root.  If they
-- also happened to both add a file with some shared and
-- some differing lines, we must do the right thing.
--

writefile("foo.left",  "z\na\nb\nx\n")
writefile("foo.right", "z\nj\nk\nx\n")

copy("foo.left", "foo")
check(mtn("add", "foo"), 0, false, false)
commit()
left = base_revision()

remove("foo")
remove("_MTN")
check(mtn("setup", "--branch=testbranch", "."))

copy("foo.right", "foo")
check(mtn("add", "foo"), 0, false, false)
commit()
right = base_revision()

check(get("merge2.lua"))

xfail_if(true, mtn("--rcfile=merge2.lua", "merge"), 0, false, false)
check(mtn("update"), 0, false, false)
merge = base_revision()

--
-- annotate foo should now be
-- REVC: z
-- REVL: a
-- REVR: k
-- REVC: x
--
-- where REVC (choice) is either REVL or REVR

check(mtn("annotate", "--brief", "foo"), 0, true, false)
check(greplines("stdout", {"", left, right, ""}))