summaryrefslogtreecommitdiff
path: root/bugs/multiple___34__exclude__34___in_configuration_fails.mdwn
blob: 6201a060f871ae4f812bfae79e10b058def4d1ad (plain)
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
The documentation for "exclude" says that it could be used multiple times:

>--exclude=EXCLUDE
>  regular expression for pathnames to exclude from backup (can be used multiple times)

It works when used multiple times on the command line. However, when using a configuration with:

    [config]
    exclude = /foo
    exclude = /bar
    exclude = /baz

...only the last item "/baz" is actually excluded from the backup.

---

The documentation doesn't actually say this anywhere (oops, sorry), so you couldn't know: the right way of doing that in the config file is to use one exclude line and separate values with commas (spaces optional).

    [config]
    exclude = /foo, /bar, /baz

That should work. 

Using multiple exclude-lines in the config would be better, but Python's ConfigParser library doesn't really deal well with that.

I'll mark this bug closed when the obnam manpage explains how to do this with config files.

--liw

It's now in the manual page in bzr and fix will be included in the next
release. [[done]] --liw