Differences between revisions 2 and 108 (spanning 106 versions)
Revision 2 as of 2005-10-26 20:12:59
Size: 974
Editor: JanHudec
Comment:
Revision 108 as of 2008-02-10 10:43:04
Size: 337
Editor: abuehl
Comment: split into subpages
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
=== Make a clean copy of a source tree, like CVS export === (see also ["FAQ"])
Line 3: Line 3:
{{{
hg clone source export
rm -rf export/.hg
}}}
= Tips and Tricks =
|| [[TableOfContents]] ||<^>[[Include(TipsAndTricks/Subpages)]] ||
Line 8: Line 6:
=== See diffs when editing commit message with VIM === == Basic ==
[[Include(TipsAndTricks/Basic)]]
Line 10: Line 9:
Make a private copy of the 'hgeditor' script provided with mercuiral and replace the call to the editor with following command: == Intermediate ==
[[Include(TipsAndTricks/Intermediate)]]
Line 12: Line 12:
{{{
vim "+e $HGTMP/diff" '+set buftype=help filetype=diff' "+vsplit $HGTMP/msg" || exit $?
}}}
== Advanced ==
[[Include(TipsAndTricks/Advanced)]]
Line 16: Line 15:
This will start up VIM in vertical split mode with commit message in the left pane and diff in the right pane. The {{{buftype=help}}} setting for diff window tells vim to exit when all other windows are closed, so when you write and quit the log with {{{:x}}} ({{{:wq}}} - they are equivalent), vim exits. If you have syntax highlight set up, the diff will be properly highlighted.

This setting is suitable for wide terminals. If you have a narrow terminal, you may want to replace the {{{+vsplit}}} above with {{{+split}}} or add {{{nowrap}}} to the {{{+set}}}.
== Deprecated ==
[[Include(TipsAndTricks/Deprecated)]]

TipsAndTricks (last edited 2016-12-05 11:14:36 by ArneBab)