How to automatically remove all .orig files in Mercurial working tree?

后端 未结 12 660
刺人心
刺人心 2020-12-13 08:34

During merges mercurial leaves .orig file for any unresolved file. But after manually resolving problems and marking a file correct it does not delete the .orig file. Can it

12条回答
  •  粉色の甜心
    2020-12-13 09:06

    I have posted this answer before. But this is the correct place to this answer.

    I made this batch file myself.

    IF "%1%" == "d" (
        del /s *.orig
        del /s *.rej
     ) ELSE ( 
        del /s /p *.rej
        del /s /p *.orig
     )
    

    Help: Save this content as orig.bat

    1. Run orig d to delete all rejects and orig files at once without confirmation
    2. Run orig to delete files with confirmation [Safety mechanism]

    Hope this is helpful.

提交回复
热议问题