File: __driver__.lua

package info (click to toggle)
monotone 1.0-6
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 20,708 kB
  • sloc: cpp: 84,765; sh: 6,787; perl: 837; makefile: 833; python: 517; lisp: 379; sql: 118; exp: 88; ansic: 52
file content (32 lines) | stat: -rw-r--r-- 1,101 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
32
--
-- test exposing bug in how update handles mtn:execute attributes
--
skip_if(ostype=="Windows")

mtn_setup()

writefile("foo", "some data")
check(mtn("add", "foo"), 0, false, false)
check(mtn("attr", "set", "foo", "mtn:execute", "true"), 0, false, false)
check({"test", "-x","foo"}, 0, false, false)
commit()
check({"test", "-x","foo"}, 0, false, false)

writefile("foo", "some more data")
check({"test", "-x","foo"}, 0, false, false)
commit()
check({"test", "-x","foo"}, 0, false, false)

-- the problem here is that update writes the new data to a file in _MTN/tmp and
-- then rename's it on top of the existing file without ever looking to see if
-- the file has mtn:execute set

-- this used to work because all of the various workspace operations called
-- update_any_attrs to reset permissions shotgun style. this was changed prior
-- to 0.43 and permissions are now handled through the editable_tree interface.

check(mtn("update", "-r", "p:"), 0, false, false)
check({"test", "-x","foo"}, 0, false, false)

check(mtn("update"), 0, false, false)
check({"test", "-x","foo"}, 0, false, false)