P1D3::Exceptions from debugignore in some repositories

Issue #185 resolved
Former user created an issue

Since updating to the latest version of MacHg I keep getting strange error messages from MacHg/Mercurial upon viewing, committing, updating etc. in some but not all of my repositories.
At the end of a rather lengthy stack trace it says:

File "/Development/MagHgDev/MacHg/build/
LocalMercurial/mercurial/localrepo.py", line 1254, in
AttributeError: 'function' object has no attribute 'includepat'.

Sometimes this popup comes up several times in rapid succession, sometimes it's just one.

Doing the very same action in the command line using the same version of Mercurial (1.7.2) works just fine. Funnily, the operation does seem to finish with the expected result in MacHg as well.

In #177 you said something about a new functionality delivering a 'combined ignore pattern regex' which is in MacHg but not yet in standalone Mercurial. Maybe there's a connection there?

I'll gladly provide more info on request. As I'm not into Python myself, I can't think of anything useful on my own right now.

Comments (10)

  1. Jason Harris repo owner

    First thanks for reporting this!

    There definitely sounds like a connection between debugignore and this. I definitely want to know about this...

    FYI: The Mercurial inside MacHg now contains this new debugignore function. it was added in ecf2fd96268d Some background on this addition is here: http://jasonfharris.com/blog/2011/01/machg-0-9-13-released/

    So... Can I get the following info from you. Make a new folder and copy into it:

    1. the .hgignore file from the repository in question. (Rename this to hgignore1)
    2. any global .hgignore files. (Rename this to hgignore2, hgignore3, etc.)
    3. the hgignore file at /Application Support/MacHg/hgignore (Rename this to hgignoreAppSupport.)
    4. the hgrc file at /Application Support/MacHg/hgrc

    Zip that folder up and attach it to this bug report. Thanks for helping!


    In the meantime. I can suggest that fiddling around with your .hgignore files will likely solve this problem.

    (Ohh and one other thing, in the bug report above you give there is a space in

    "...Contents/PlugIns/ LocalMercurial/mercurial..."

    I am assuming thats a typo / paste corruption. There shouldn't be any space at all...)

    Ohh and can I get you to to login in to bitbucket so I can post to your privately...

    Thanks, Jason

  2. olfan

    Hi again, there's the file you requested.

    I'm noticing two strange things about it: a) my /.hgignore is empty, and I don't recall having created it. b) hgrc includes it twice, once as ignore = and once as ignore.other. Both of these settings have not been applied by me, at least not to my knowledge.

    Another strangeness is that the described error message seems to pop up totally randomly. Sometimes MacHg keeps working fine for hours, sometimes I get the popup many times per minute in rapid succession, and I can't figure out how to provoke or suppress that behaviour.

    The space character in the path must be a mistake. In the original snippet I pasted there were (single) linebreaks in their stead, the entry form seems to mangle them into single spaces. Yes, I can just see it in the preview.

    I needed a bitbucket account in order to be able to attach a file, so there you are. :)

    Hope I could help. If there's anything more I can do, just say so.

  3. Jason Harris repo owner

    Thanks. This really helped. This exception comes from having all empty .hgingore files. Ie the files if they are referenced are empty:

    • /.hgignore
    • /Application Support/MacHg/hgignore
    • the repositories .hgignore


    You can work around this by

    1. Just put: .DS_Store in say the /.hgignore file.
    2. Or you could just quit MacHg and delete /Application Support/MacHg and the restart MacHg and you should have no exceptions.

    This will be fixed in the next version of MacHg.

    Also why MacHg was working fine for hours is that you likely were working on repositories where the .hgignore

    As to you not recalling creating the /.hgignore file, there was a bug / issue a while back (MacHg 0.9.9) where I automatically created this file under some circumstances. See #140. But this is now fixed :)

    Thanks a lot for the help!

    Cheers, Jas

  4. Jason Harris repo owner

    When you built it, did you completely delete the build directory. The Mercurial files won't be copied over again unless they are missing... Can I get you to try this?

    Thanks, Jas

  5. Marko Käning

    Yes, Jason, that solves it!

    Looks like the deletion of the build directory before building should be made a rule when trying to build MacHg? Don't you think?

    Thanks for your immediate response.

    Greets, Marko

  6. Jason Harris repo owner

    Glad it fixed it! Thanks!

    The problem with that is it takes extra build time, and I do a lot of builds... Hmmm... I am thinking I am going to post alpha's everytime I push changes to bitbucket so no one would ever have to build, to test my fixes...

    But thanks!

    Cheers, Jas

  7. Jason Harris repo owner

    - Reapply MacHg's patches to Mercurial: - Fix #185. Catch the case when ignore.includepat doesn't exist. - Move tags.cache and branchheads.cache to a collected cache folder .hg/caches/ - add debugignore which yields the combined ignore patten of the .hgignore files - Apply Martin Geisler's patch of writing the check exec and check link test to the directory .hg/fschecks instead of the working directory.


  8. Log in to comment