views:

1266

answers:

2

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 be automatically removed by some command?

I work on a Mac so I can use something like:

find . -iname '*.orig' -exec rm '{}' ';'

and alias it or something, but I'd rather use something like hg cleanup...

+1  A: 

you should use the update hook

update: This is run after an update or merge of the working directory has finished

dfa
can you be more more specific? Are you proposing removing all files on commit hook? :)
rkj
you can execute find . -iname '*.orig' -exec rm '{}' ';' *after* a merge, see the doc for details
dfa
+7  A: 

Personally I go for

rm **/*.orig

if I get tired of the .orig files. But if you want a built-in solution, then maybe you'll like the purge extension.

Martin Geisler
rm is quite short :).But the purge removes all untracked files - and some file I use are not tracked on purpose - private project configuration, database configuration, etc...
rkj
ok, purge does not touch ignored files :) thx a lot :)
rkj