New command proposal: hg ignore

Theodore Tso tytso at mit.edu
Mon Jun 18 13:37:35 UTC 2007


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!  

So it's not enough to say, "Add one line to .hgignore"; you need to
say *where* in .hgignore to add that line!

> 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).

Then a GUI tool should pop up an text widget so it can display the
current contents of .hgignore, so the user can edit it by hand.  For
bonus points the GUI can display the current set of files which are
being ignored thanks ot .hgignore, and dynamically update it as the
user adds and deletes lines in the .hgignore file.....

						- Ted



More information about the Mercurial mailing list