В конфиге Mercurial hgrc(5) можно объявлять псевдонимы команд, чтобы не
набирать по десять раз сложные опции. Сейчас в моём ~/.hgrc прописаны такие
псевдонимы:
[alias]
qstatus = status --rev qparent:qtip
glog = log -G --template '{rev}:{node|short} {tags} [{author|user}] {desc|firstline}\n'
slog = log --template '{rev}:{node|short} {date|age}\t{author|person}\t{desc|firstline} {tags}\n'
qstatus позволяет выполнить status для просмотра изменённых, вносимых
наложенными патчами Mercurial Queues:
$ hg qser -s
hgignore.patch: Added .hgignore
$ hg qst
A .hgignore
slog и glog позволяют посмотреть текстовый лог в более удобном для чтения
формате. slog похож на лог веб-интерфейса Mercurial:
$ hg slog -l10
48:0d24f8702290 2 days ago Andrey Vlasovskikh Added a draft of Artemis Specification for Developers vlan tip
47:7897c850150f 3 days ago Andrey Vlasovskikh iadd: Added --message
46:1f5ed31cc92a 7 days ago Andrey Vlasovskikh m
45:75596c8e1b93 7 days ago Andrey Vlasovskikh Accepted issue #c76
44:a7f910d43c72 7 days ago Andrey Vlasovskikh A proposal for adding more filter expressions (cec)
43:106b89a8f118 7 days ago Andrey Vlasovskikh Added ilist --mutt issue (c76)
42:d20d07b24282 7 days ago Alexander Solovyov iadd should commit on finish
41:5383d3d5e350 7 days ago Alexander Solovyov issues are created in local date without timezone
40:6ac81157f063 7 days ago Andrey Vlasovskikh merge
39:d013e9b9aba7 7 days ago Alexander Solovyov ishow: add --mutt option to display issue with mutt
glog показывает компактный текстовый граф изменений, лучше помещающийся на
экране, чем стандартный log -G:
$ hg glog -l10
@ 46:1f5ed31cc92a vlan tip [andrey] m
|
o 45:75596c8e1b93 [andrey] Accepted issue #c76
|
o 44:a7f910d43c72 [andrey] A proposal for adding more filter expressions (cec)
|
o 43:106b89a8f118 [andrey] Added ilist --mutt issue (c76)
|
o 42:d20d07b24282 [piranha] iadd should commit on finish
|
o 41:5383d3d5e350 [piranha] issues are created in local date without timezone
|
o 40:6ac81157f063 [andrey] merge
|\
| o 39:d013e9b9aba7 [piranha] ishow: add --mutt option to display issue with mutt
| |
| o 38:c8cf0454e5d1 [piranha] simple .hgignore
| |
| o 37:83910efdbb54 [piranha] remove trailing whitespaces
| |
В командах slog и glog используются шаблоны для форматирования вывода, см.
hg help templating.
Недавно натолкнулся на полезный ресурс с советами по Mercurial — hgtip.com. Рекомендую подписаться или даже поучаствовать в проекте.