-*- mode: outline; coding: utf-8 -*-* Useful customization.Put to your ~/.hgrc: [ui] ; Editor for editing commit message. editor = gvim ; Who commit. username = Oleksandr Gavenko <gavenkoa@gmail.com> ; Use internal merge algorithm, which mark conflict like <<<<<< ====== >>>>>>. ; Save previous file version in '*.orig' file, after merge must be marked as ; resolved by running 'hg resolve -m <file>'. merge = internal:merge [web] ; Default encoding for file hosted by 'hg serv'. encoding = utf-8** Useful extension.Put to your ~/.hgrc: [extensions] ; To allow fetch command. fetch = ; To allow Mercurial Queues. hgext.mq =** Multiline log message for log command.By default 'hg log' show only first line of log message. To see all message run: $ hg log -vor put into ~/.hgrc: [defaults] log = -v** Follow history ever when file copied.By default 'hg log' show only history after last file copy. To see log messagebefore copying run: $ hg log -for put into ~/.hgrc: [defaults] log = -f* Manage patches with MQ.First enable MQ, add following to your ~/.hgrc: [extensions] hgext.mq =Second get unpatched sources and put it to hg repository: $ tar zxf proj-x.y.z.tar.gz $ mv proj-x.y.z proj $ cd proj $ hg init $ hg ci -m "Added x.y.z version of proj."Init MQ and take name for first patch: $ hg qinit $ hg qnew first.patchNext make changes by editing source and save it to patch: $ $EDITOR file.c ... $ hg diff ... $ hg qrefresh $ hg diff # <-- have zero diffYou can make second patch by applying existing one: $ hg qnew second.patch $ patch -p1 <bugfix.patch $ hg qrefreshYou can take list of patches (from old to new) and revert or apply patches byqpop/qpush command: $ hg qseries # <-- what patches have first.patch second.patch $ hg qapplied # <-- what patches applied first.patch second.patch $ hg qpop $ hg qseries first.patch second.patch $ hg qapplied first.patchYou can revert or apply all patches by single command: $ hg qpop -a $ hg qpush -aYou can delete patch from patch list (before that you need de-apply patch): $ hg qpop -a $ hg qdelete first.patchTo add new version of source and fix patches for it first de apply patches,then pull new changes and try apply patches on top of new sources: $ hg qpop -a $ rm * # .hg dir not deleted because its name start with dot $ cd .. $ tar zxf proj-a.b.c.tar.gz $ cp -R proj-a.b.c/* proj $ cd proj $ hg addremove -s 70 $ hg ci -m "Added a.b.c version of proj." $ hg qpush -aTo apply series of already done patches use: $ ls /path/to/bugfixes/*.patch | xargs hg qimport