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 (31 lines) | stat: -rw-r--r-- 1,038 bytes parent folder | download | duplicates (5)
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
--
-- For more information on this bug, see 
-- https://savannah.nongnu.org/bugs/?func=detailitem&item_id=15994
--

mtn_setup()

-- at first we create a directory and a file and commit both
addfile("foo", "foofile")
mkdir("bar");
check(mtn("add", "bar"), 0, false, false)
commit()

-- now rename the directory, change the file and move it into the renamed
-- directory
check(mtn("rename", "bar", "baz"), 0, false, false)
writefile("foo", "bazfile")
check(mtn("rename", "foo", "baz/foo"), 0, false, false)

-- if we try to check-in these changes and restrict on baz/foo, we'll hit an 
-- invariant in roster.cc, around line 188
-- note that we do _not_ hit this invariant iff
--  a) the foo file is not changed
--  b) we only restrict on bar
--  c) we only restrict on baz

-- this was previously the case because restricting to baz/foo would exclude
-- the rename of bar to baz and try to commit foo
-- when the parent of foo (baz) is implicitly included the commit succeeds
check(mtn("commit", "-m", "wow", "baz/foo"), 0, false, false)