Automatically deleting pyc files when corresponding py is moved (Mercurial)

前端 未结 7 1378
庸人自扰
庸人自扰 2021-02-13 04:00

(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

7条回答
  •  闹比i
    闹比i (楼主)
    2021-02-13 04:09

    I use the .hgignore file to skip versionning of all my .pyc and .py~ (editor's temp files). For example, this is my version :

    # use glob syntax.
    syntax: glob
    
    .directory
    *.pyc
    *~
    *.o
    *.tgz
    *.tbz2
    *.gz
    *.bz2
    

    Also adding a hook on update to remove them is also a interesting trick if you want to not only ignore noise but remove it from your local workspace area.

提交回复
热议问题