New command proposal: hg ignore
Matt Mackall
mpm at selenic.com
Mon Jun 18 16:12:00 UTC 2007
On Mon, Jun 18, 2007 at 04:19:16PM +0200, Matthieu Moy wrote:
> Theodore Tso <tytso at mit.edu> writes:
>
> > On Sun, Jun 17, 2007 at 08:43:40PM +0200, mirza wrote:
> >> This proposal is not that far fatched as to replace current .hgignore
> >> files. It is only alternative way of editing those text files for GUIs.
> >>
> >> hg ignore --add "*.bak"
> >>
> >> would add one line to .hgignore file, unless that line already exists there.
> >
> > But the problem is that .hgignore file is order dependent. So the
> > order in which lines are found in .hgignore is important!
>
> What's the influence of the order in .hgignore? It doesn't seem to be
> the case according to the man page.
Current .hgignore is not order-dependent. All expressions in all
.hgignore files get compiled down into a single regular expression.
As soon as we add any sort of pattern inversion, that stops being
possible and we have to check all expressions in order.
But I still think there's very little (and possibly negative) value in
an hg ignore command, especially if it can't handle "unignore
particular file that's ignored by a regex". Users -will- have to
regularly edit .hgignore by hand and will just be annoyed when using
hg ignore fails them.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list