P3D3::Can't unignore .hgignore

Issue #207 new
Sebastian Krysmanski
created an issue

I cloned an empty repository with no ".hgignore" file. I then added some file and selected one file to be ignored. So MacHg created the .hgignore file for me and marked it immediately as "ignored" - but I want it to be added. So I selected the file and selected "Unignore Selected Files" which has no effect.

I've seen <<issue 170>> but this doesn't help. The file ~/Library/Application Support/MacHg/hgignore on my Mac only contains the following lines:

{{{ ^.mq .DS_Store .Trash }}}

Comments (3)

  1. Jason Harris repo owner

    Hi Sebastian!

    Do you have a Users/sebastian/.hgignore file per chance?

    There is some ignore file somewhere on your system which has the pattern

    ^.hg
    

    In it. This was what was causing the file to be ignored last time when you reported issue #170. (Thanks BTW)... So likely there is another place lurking on your machine. Which has this pattern. You can test this from MacHg by opening the repository you are working with in MacHg and clicking on the terminal button.

    In the terminal that MacHg opens up run:

    mhg debugignore
    

    That is the complete regular expression used for ignoring files. Does that have some pattern which will match against .hgignore? If so can you tell me which one so I can at least add it to this thread if not a FAQ item...

    Thanks, Jas

  2. Sebastian Krysmanski reporter

    Ah - thanks. There was a ".hgignore" file in my home directory. I haven't tested it yet, but I guess this was the problem. However, you might add a warn dialog for this case or even let the user add ignored files (perhaps with a confirmation dialog).

    Btw: The "mhg debugignore" command just gave me this output:

    (?:.*test\.php|.*nbproject)
    

    Doesn't contain any mention of ".hg". However, I did this after manually adding the .hgignore file by using "hg add .hgignore".

  3. Log in to comment