Empty folders are not supported by default in mercurial, so if you ignore all the files in a folder, the folder will not be tracked.
From the hg book: http://hgbook.red-bean.com/read/mercurial-in-daily-use.html
, , . Mercurial, , , , , , .
, . - , hg "" . Unix- , ( "." ), . .
$ hg init hidden-example
$ cd hidden-example
$ mkdir empty
$ touch empty/.hidden
$ hg add empty/.hidden
$ hg commit -m 'Manage an empty-looking directory'
$ ls empty
$ cd ..
$ hg clone hidden-example tmp
updating working directory
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ ls tmp
empty
$ ls tmp/empty
- , .
Edit:
, , hgignore , :
.hgignore . :
syntax: glob
db/