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 (32 lines) | stat: -rw-r--r-- 733 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
31
32
-- Show that multiple include and exclude patterns are supported

includecommon("netsync.lua")
mtn_setup()
netsync.setup()

addfile("file1", "foo")
commit("branch1")

addfile("file2", "bar")
commit("branch2")

addfile("file3", "baz")
commit("branch3")

addfile("file4", "4")
commit("branch4")

srv = netsync.start()

check(mtn2("pull", srv.url .. "?-branch1;branch2;-branch3;branch4"), 0, nil, true)
check(qgrep("include pattern  '{branch2,branch4}'", "stderr"))
check(qgrep("exclude pattern  '{branch1,branch3}'", "stderr"))

check(mtn2("ls", "branches"), 0, true)

check(not (qgrep("^branch1$", "stdout")))
check(qgrep("^branch2$", "stdout"))
check(not (qgrep("^branch3", "stdout")))
check(qgrep("^branch4", "stdout"))

srv:stop()