New command proposal: hg ignore
mirza
mirza at seznam.cz
Sun Jun 17 18:43:40 UTC 2007
> On Sun, Jun 17, 2007 at 06:55:24PM +0200, mirza wrote:
>
>> hg ignore --add *.bak
>> hg ignore --add regexp:<expression>
>> hg ignore --list
>> hg ignore --remove <something>
>>
>
> What happens when you do:
>
> hg ignore --add "*.bak"
> hg ignore --remove foo.bak
>
> If your answer is "you get an error message", then users will not be happy.
> If your answer is "that just works", I'd like to know how.
>
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.
hg ignore --remove "foo.bak"
would remove "foo.bak" line, if that *exact* line is found in .hgignore.
As I mentioned, it is all about GUI tools, CLI users shouldn't care. Problem is that GUI tool is much simpler if mercurial is self-contained inside hg command. As soon as GUI is supposed to find and parse text files (like .hgignore) it becomes error-prone and more difficult to write (needless, because hg have means of handling .hgignore(s) anyway, it is all about exposing this feature).
Mirza
More information about the Mercurial
mailing list