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 (30 lines) | stat: -rw-r--r-- 938 bytes parent folder | download | duplicates (3)
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
-- Test the case of update where there is a dropped/modified conflict

mtn_setup()

-- add a first file
addfile("file1", "contents of file1")
commit()

REV1=base_revision()

-- add another file, then change it
addfile("file2", "contents of file2")
commit()

writefile("file2", "new contents of file2")

-- update to the previous revision, which didn't have file2. This
-- looks like file2 is dropped on one side (in rev 1), and modified on
-- the other (the workspace), so we get a dropped/modified conflict.

check(mtn("update", "-r", REV1), 1, nil, true)
check(qgrep("mtn: conflict: file 'file2'", "stderr"))
check(qgrep("mtn: modified on the left, named file2", "stderr"))
check(qgrep("mtn: dropped on the right", "stderr"))
check(qgrep("mtn: misuse: merge failed due to unresolved conflicts", "stderr"))

-- Since this is a workspace merge, we can't resolve the conflict; the
-- modified file must be committed first.

-- end of file