how to selectively add files when .hgignore says: syntax:glob *
Matt Mackall
mpm at selenic.com
Wed Apr 30 11:50:30 CDT 2008
On Wed, 2008-04-30 at 21:16 +0000, Peter wrote:
> Hi
> I would like to ignore, by default, all files in a given repo (for
> example when using mercurial for /etc). I thus have a .hgignore file
> with the following in the directory with the repository:
>
> $ cat .hgignore
> syntax: glob
> *
>
> when I say hg stat, there is nothing, as expected.
> I can add single files in the same dir, for example,
>
> $ hg add .profile
> $ hg stat
> A .profile
>
> This also works as expected.However, when I try to add whole
> subdirectories, either with
>
> $ hg add apache2/*
Works for me. But if apache2 contains only directories, it will fail.
> $ hg add `find apache2 -name '*'`
>
> then hg stat shows that nothing has been added.
Again, works for me. I can't imagine how this could fail. Mercurial will
add any -files- explicitly specified on the command line, regardless of
the ignore rules.
> I also tried:
> $ hg add 'glob:**'
That won't work. Mercurial will ignore all the directories it
encounters, and their contents.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list