willu.mailingLists> Note that only when you add a directory with files
willu.mailingLists> inside it do you get the warning. The empty
willu.mailingLists> directory 'dirB' above doesn't get a warning.
willu.mailingLists> (Currently the code doesn't look to see if all the
willu.mailingLists> files in the dir are 'ignored' - that improvment
willu.mailingLists> is left as an exercise for the reader.) There is
willu.mailingLists> no warning if you do a recursive add.
Good idea, I like it! However, using directory_empty() can lead to
confusion (': ; ' is my prompt):
: ; mkdir monotone-experiment
: ; cd monotone-experiment/
: ; mtn -d ../mtn.monotone-experiment db init
: ; mtn -d ../mtn.monotone-experiment setup --branch mtn-ex .
: ; mkdir foo
: ; touch bar
: ; touch foo/cookie~
: ; LANG=en_US ~/monotonework/off.net/monotone/build/mtn add --
unknown
mtn: adding bar to workspace manifest
mtn: adding foo to workspace manifest
mtn: warning: Non-recursive add: Files in the directory 'foo' will
not be added automatically.
: ; ls --color=no -R .
.:
bar foo _MTN
./foo:
cookie~
./_MTN:
format log options revision revision~
: ; LANG=en_US ~/monotonework/off.net/monotone/build/mtn add --
unknown
mtn: skipping ignorable file foo/cookie~