3

I have the following .hgignore:

\.pyc$

yet in my hg st .pyc files still appear as modified and get committed with hg ci.

I've also tried this .hgignore:

syntax: glob
*.pyc

But with the same results..

Any idea what could be wrong?

GJ.
  • 9,843
  • Both of your examples worked for me. I thought it might be a line-ending problem, but both LF and CR/LF line endings worked with Mercurial 1.6.1 on Cygwin 1.5.25. Maybe try a really simple test repository and see if it works there. If it does work there, that may give you some clues to why it doesn't work in your real repository. If it doesn't work there either, come back here with a description of exactly what you did and on what kind of system. – garyjohn Dec 28 '10 at 16:58

1 Answers1

5

Did you try:

syntax: re
^.*\.pyc$

(In order to ignore any path followed by any filename ended with the extension '.pyc').

Of course, your files with '.pyc' shouldn't be already tracked.

... which turns out to be the actual problem, from the OP's comment:

these .pyc files were indeed accidentally added before, and by "hg rem"-ing them the problem is now solved.

VonC
  • 14,508
  • thanks! turned out these .pyc files were indeed accidentally added before, and by "hg rem"-ing them the problem is now solved – GJ. Dec 29 '10 at 11:18