Mercurial の設定

Windows 環境。
%USERPROFILE%\Mercurial.ini として保存。
mailaddress は、メールアドレスに置き換えて読んでね。

```ini
[ui]
username = hokorobi <mailaddress>
ssh = C:\putty\PLINK.EXE
editor = C:\vim\gvim.exe --servername hg
merge = winmergeu
ignore = %USERPROFILE%\.hgignoreglobal

[extensions]
bookmarks=
record=
rebase=
strip=
convert=
win32mbcs=
extdiff=
collapse=C:\Mercurial_ext\hgcollapse\hgext\collapse.py
histedit=
transplant=
pager=
color=
hgnow=C:\Mercurial_ext\hgext-now\hgnow.py
textful = C:\Mercurial_ext\hgext-textful\hgext\textful
textful.encoding = C:\Mercurial_ext\hgext-textful\hgext\textful\encoding.py
progress =
hggit =

[now]
encoding = cp932, utf-8

[textful]
; BOM あり utf-8 は utf-8-sig
encoding = cp932, utf-8, utf-8-sig, euc-jp
attend = dif, diff

[color]
mode=auto

[win32mbcs]
encoding = cp932

[bookmarks]
track.current = True

[merge-tools]
winmergeu.args=/e /ub /fm /am /wl /wr /dl other /dm merged /dr local $other $base $local /o $output
winmergeu.regkey=Software\Thingamahoochie\WinMerge
winmergeu.regname=Executable
winmergeu.fixeol=True
winmergeu.checkchanged=True
winmergeu.gui=True
winmergeu.diffargs=/r /e /x /ub /wl /dl '$plabel1' /dr '$clabel' $parent $child
winmergeu.premerge=keep
winmergeu.checkconflicts=True

gvimdiff.args=--nofork --servername diff -d -g -O $local $other $base
gvimdiff.diff3args=--nofork --servername diff -d -g $parent1 $parent2 $child
gvimdiff.executable=C:\vim\gvim.exe
gvimdiff.priority=-9
gvimdiff.diffargs=--nofork --servername diff -d -g -O $parent $child

[extdiff]
cmd.winmergeu = C:\WinMerge\WinMergeU.exe
cmd.gvimdiff = C:\vim\gvim.exe

[pager]
pager = less -FRSX
attend = annotate, cat, dif, dif0, diff, export, gl, heads, help, l, log, lv, man, qdiff, qls, qseries, st, status, stm
hg16mode = yes

[hgbb]
username = hokorobi
default-method = ssh

[alias]
l = log -f
lv = log -fv
b = branch
bs = branches
bk = bookmarks
gl = log -G --template "{rev}:{node|short} | {author|user}: {desc|strip|firstline}\n{branch} {bookmarks} ({phase})\n"
gld = log -G -f
stm = status -m
rebase = rebase --keepbranches
amend = ci --amend
stash = shelve --all
unstash = unshelve
man = help
fold = collapse -r ".^:."
; backout = ! %HG% diff -r %HG_ARGS:~8% -r "%HG_ARGS:~8%^1" | %HG% import -m "backout merge at %HG_ARGS:~8%" -
dif = diff
dif0 = diff -U 0
ls = manifest
histc = histedit --continue
;now = ! %HG% commit -m "[from now] %date% %time% %HG_ARGS:~4%"
up- = up ".^"
rollback = !for /F "usebackq tokens=1,2 delims=+" %i in (`"%HG%" parent --template {node}+{children}`) do ( if "%j" == "" ( "%HG%" update -r "p1(%i)" && "%HG%" revert -r %i -a && "%HG%" strip -r %i))
wdiff = winmergeu
vdiff = gvimdiff

; merge
merge = merge -t winmergeu
mergek = merge -t kdiff3
cim = ci -m merge
mergeinto = !for /F "usebackq tokens=1,2" %i in (`%HG% log -r $2 --template "{node} {branch}"`) do ( if not "%j" == "$1" %HG% update $1 && %HG% merge %i && %HG% commit -m "Merge with %j")

; resolve
mark = resolve -m
unmark = resolve -u
conflicts = resolve -l
; マージ先の内容を残す
;uselocal = resolve --tool internal:local
; マージ元の内容を残す
;useother = resolve --tool internal:other

; push
; 現在のリビジョンとその祖先を push
nudge = push -r .

[revsetalias]
; カレントチェンジセットの祖先。
; TortoiseHg では (parents_current) と使う。
parents_current = (::.)

[web]
cacerts=C:\TortoiseHg\hgrc.d\cacert.pem

[tortoisehg]
autoresolve = True
workbench.revdetails.custom-menu = thg
shell = ConEmu
summarylen = 80
engmsg = True
refreshwdstatus = alwayslocal
workbench.custom-toolbar = nudge nudge_bb


[smtp]
host = smtp.gmail.com
port = 587
username = mailaddress
tls = True

[email]
from = mailaddress
method = smtp
cc =


[tortoisehg-tools]
nudge_bb.command = hg nudge bb
nudge_bb.enable = istrue
nudge_bb.icon = hg-push
nudge_bb.label = nudge_bb
nudge_bb.showoutput = True
nudge_bb.tooltip = nudge_bb
nudge.command = hg nudge
nudge.enable = istrue
nudge.icon = hg-push
nudge.label = nudge
nudge.showoutput = True
nudge.tooltip = nudge

[terminal-tools]
ConEmu.executable-win = C:\ConEmu\ConEmu64.exe
```