Search code examples
regexmercurialglob

hgignore glob ** not matching correctly


I have tried the following hgignore files however both times folders expected to be ignored are listed when runnign the hg status command

syntax: glob

Somefolder/**

However Somefolder is still listed when I then run hg status

So I then tired this version (which should ignore EVERYTHING)

syntax: glob

**

However same result from running the hg status command.


Solution

  • Well, then, I'm not sure what's wrong with your environment, because what you did should work. It works on mine:

    santa@samoyed:/tmp/MockProject$ tree .
    .
    └── Somefolder
        └── Subfolder
            └── ph.txt
    
    2 directories, 1 file
    santa@samoyed:/tmp/MockProject$ cat .hgignore 
    syntax: glob
    
    Somefolder/**
    santa@samoyed:/tmp/MockProject$ hg status
    ? .hgignore
    santa@samoyed:/tmp/MockProject$