https://bz.mercurial-scm.org/show_bug.cgi?id=6082
Bug ID: 6082 Summary: Support ! pattern negation in .hgignore as for Git Product: Mercurial Version: unspecified Hardware: PC OS: Linux Status: UNCONFIRMED Severity: feature Priority: wish Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: pierre.aug...@univ-grenoble-alpes.fr CC: mercurial-devel@mercurial-scm.org It's difficult to work with hg-git for some Git repositories (example https://github.com/pyenv) because they use in their .gitignore the ! pattern. From the Git documentation: "An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined. " For a repository using such pattern, one gets: `.gitignore: unsupported ignore pattern '!/.gitignore'` There is an issue in the hg-git repository on Bitbucket (https://bitbucket.org/durin42/hg-git/issues/190/add-support-for-gitignore-pattern-negation), but it seems that it should be solved at the Mercurial level. Note that Git does something reasonable in terms of performance ("It is not possible to re-include a file if a parent directory of that file is excluded. Git doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no matter where they are defined.") so Mercurial could do the same? -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel