Mercurial > hg
view tests/mockblackbox.py @ 32471:014fa1ad5076
osx: override default exclude filter for pkgbuild
To quote `man 1 pkgbuild`:
--filter filter-expression
By default, --root will include the entire contents of the
given root-path in the package payload, except for any .svn
or CVS directories, and any .DS_Store files. You can override
these default filters by specifying one or more --filter
options. Each filter-expression is an re_format(7)
``extended'' expression: any path in the root which matches
any of the given expressions will be excluded from the pack-
age payload. (Note that specifying even one --filter inhibits
the default filters, so you must respecify the default fil-
ters if you still want them to be used.)
It turns out the default filter these days *also* includes .git and
.hg. Notice how that filter expression is a regular expression? That
(presumably unintentionally) prevents a file named "chg" or "_hg" from
getting included in the distribution. Many many thanks to spectral@
for trying to include a _hg file which led us to figure this bug out.
Bug filed with Apple for this as rdar://problem/32437369, mentioning
both the gap in documentation and the wrong defaults.
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 26 May 2017 20:03:05 -0400 |
parents | 043948c84647 |
children | f49c3ee5b02f |
line wrap: on
line source
from __future__ import absolute_import from mercurial import ( util, ) # XXX: we should probably offer a devel option to do this in blackbox directly def getuser(): return 'bob' def getpid(): return 5000 # mock the date and user apis so the output is always the same def uisetup(ui): util.getuser = getuser util.getpid = getpid