I have an ongoing problem using the TortoiseHG Workbench commit window to search for only a certain file type, such as with Python modules. Often I have tons of .pyc files that I don't want to be displayed in the list and I only want to filter for the .py files. But the commit window filename filter bar doesn't seem to allow normal filename wildcard searches. If I type *.py then nothing comes up. I can type .py and then all file extensions starting with ".py" come up but this includes ".pyc". Is the filename filter bar really that useless, or is there some way that I can actually search for only ".py" files to commit and not ".pyc"? (I was not able to find any TortoiseHG documentation about this search bar.)

1 Answer
1

While not a direct answer to your question, the proper way to handle this is to add *.pyc to your .hgignore file - compiled python files should generally not be checked into a source repository (generally, you shouldn't check build artifacts into the source repository, or any files which can be generated from other files in the repository - they should be generated by your build process after a checkout).

After you add *.pyc to your ignore list, TortoiseHG and hg status will no longer show any untracked *.pyc files. (Any files already added to the repository will still show as normal, and you can still manually add a specific file even if it's on the ignore list with hg add or TortoiseHG's explorer menu: Right Click -> TortoiseHG -> Add File