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 (23 lines) | stat: -rw-r--r-- 822 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
-- diff should not compute diffs for files with mtn:manual_merge attributes
-- 
-- In 1.0 and earlier, it only ignored files that file_io.cc
-- guess_binary considered to be binary.
--
-- Consider a newly added 50 MB text file (Earth gravity
-- coefficients); this simply hangs the diff engine (it may return
-- eventually), so the user marks it with mtn:manual_merge.

mtn_setup()

addfile("small_file.text", "small file\n")
commit("base", "testbranch")
base = base_revision()

addfile("grav.coef", "50 MB of coefficients\n")
check(mtn("attr", "set", "grav.coef", "mtn:manual_merge", "true"), 0, nil, false)
commit("abe_1", "testbranch")
rev_1 = base_revision()

check(mtn("diff", "-r", base, "-r", rev_1), 0, true, nil)
check(not qgrep("^\\+\\+\\+ grav.coef", "stdout"))
check(qgrep("^# grav.coef is binary", "stdout"))