(I foresaw this problem might happen 3 months ago, and was told to be diligent to avoid it. Yesterday, I was bitten by it, hard, and now that it has cost me real money, I am kee
How about using an update hook on the server side? Put this in the repository's .hg
directory's hgrc
file:
[hooks]
update = find . -name '*.pyc' | xargs rm
That will delete all .pyc files whenever you update on the server. If you're worried about the cost of rebuilding all the .pyc files you could always get just a little more clever in the hook and delete only the .pyc's for which there is no .py, but that's probably overkill.