SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы

Назад

Setting up Mercurial


Метки: python

It’s easier if you put a configuration file called .hgrc in your home directory. Here’s one that sets up the user name and configures kdiff3 as the diff tool for Mercurial to use when showing you differences between files:

# This is a Mercurial configuration file.
[ui]
username = Firstname Lastname <email@mailer.net>

[merge-tools]
# Override stock tool location
kdiff3.executable = /usr/bin/kdiff3
# Specify command line
kdiff3.args = $base $local $other -o $output
# Give higher priority
kdiff3.priority = 1

In addition, you can change the editor that Mercurial uses via an environment variable. For example, on OSX and Linux (and Windows with cygwin) you add this to your .bash_profile to set emacs as the default editor:

export set EDITOR=/usr/bin/emacs