5

In my global .hgignore file, I'm ignoring files in the packages/ directory. In this one repo, I want to not ignore that folder.

Is it possible to un ignore a file that has been ignored by a previous .hgignore?

moswald
  • 11,491
  • 7
  • 52
  • 78

1 Answers1

6

Assuming that you are using the technique for globally ignoring files described here, then you can override the global ignore locally via editing the repo's hgrc:

Add the following to the file at \.hg\hgrc

[ui]
ignore=.hgignore

This is the local override of the global set in your %userprofile%\Mercurial.ini (or other files in the config cascade and tells Mercurial to use the .hgignore file at the root of the repo.

Note that this method then uses none of the global ignore file, so the parts you want to use will need to be in the local .hgignore.

Community
  • 1
  • 1
Edward
  • 3,292
  • 1
  • 27
  • 38
  • Ah well, I guess that's the best that can be done, without writing my own extension of course. Thanks. – moswald Sep 10 '14 at 19:11