manski's blog

Skipping Unreadable Pattern File Error in Mercurial

I had it happened a couple of times now that Mercurial on Windows would give me this error:

skipping unreadable pattern file ‘D:\Documents\Programming\YourProject\’: No such file or directory

This message is strange because the path actually exits.

After some searching I found the solution in the Mercurial bug tracker:

Bug 5325 – “skipping unreadable pattern file” by empty ui.ignore

The title already suggests the solution. There’s an empty ignore= entry in the global mercurial.ini file.

mercurial-ini.png

Removing this entry solves the problem.

The file is located here:

C:\Users\<YourUserName>\mercurial.ini

Note: It seems this “problem” is caused by SourceTree.

5 comments

  1. Patrick L said:

    Thank you for this post. It saved me some trouble searching for this distracting message in the mercurial output. And I can confirm that the empty entry is added again when using and closing SourceTree. As a side node: I found it useful to inspect from which sources hg reads it’s config: “hg config –debug” prints this information at the start of it’s output.

  2. Robin said:

    Thanks. For me the empty ‘ignore’ was actually in .hgrc.

  3. Tore Aurstad said:

    Thank you for the tip Manski. In my case just as in Robin’s case, the erronoeus line of an empty ignore was in the .hgrc file in my user folder (%USERPROFILE% on Windows).

  4. K W said:

    Code Collaborator client gave this error:
    SCM system could not be auto-detected, but there was an error: TFS collection UR L is not specified.

    For two years I could not use the application until I found this post. Thank you.

  5. Michael Hutter said:

    Vielen Dank. Dieser Tipp war tatsächlich die Lösung, die nervige Warnmeldung von TortoiseHg endlich weg zu kriegen.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.