Difference between revisions of "Mercurial/Setup"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Created page with 'Category:Mercurial[[Category:SCM][Category:HG]] =Setting up Mercurial= __TOC__ ==Installing Mercurial== Mercurial source and binary distributions are available [http://mer…')
 
m (Configuring Mercurial)
Line 12: Line 12:
 
==Configuring Mercurial==
 
==Configuring Mercurial==
  
Mercurial can configured via system, user and repository configure files. The most interesting one is the user specific configuration file in <tt>$HOME/.hgrc</tt>. Example:
+
Mercurial can be configured via system, user and repository configure files. The most interesting one is the user specific configuration file in <tt>$HOME/.hgrc</tt>. Example:
  
 
<pre>
 
<pre>
Line 33: Line 33:
 
pretxncommit.crlf = python:hgext.win32text.forbidcrlf
 
pretxncommit.crlf = python:hgext.win32text.forbidcrlf
 
</pre>
 
</pre>
 +
 +
Let's examine this entry for entry:
 +
 +
[ui]
 +
username=Jens-Heiner Rechtien <hr@openoffice.org>
 +
 +
The author tag of a changeset is set on commit, and becomes part of the history. Set this entry to identify yourself as author, common usage is to use your name and OOo email address here.

Revision as of 16:02, 21 October 2009

[[Category:SCM][Category:HG]]

Setting up Mercurial


Installing Mercurial

Mercurial source and binary distributions are available here. Many Linux distributions, OpenSolaris and cygwin (Windows) offer Mercurial packages as well. Installing from source requires a working Python installation. Windows users have the choice between a cygwin based Mercurial and TortoiseHg, the latter one "is an all-inclusive Mercurial binary installer package for Windows".

Documentation caution.png Some cygwin versions exhibit a bug which affects hg and other tools. If your cygwin hg complains about: "*** fatal error - could not load shell32, Win32 error 487" use TortoiseHg instead.

Configuring Mercurial

Mercurial can be configured via system, user and repository configure files. The most interesting one is the user specific configuration file in $HOME/.hgrc. Example:

[ui]
# The user name will appear as author tag on commits.
username=Jens-Heiner Rechtien <hr@openoffice.org>
# Domain developers only: OOo ssh authentication for pushing 
# to 'outgoing' repositories.
ssh=ssh -C -i <path_to_OOo_ssh_identity>

[extensions]
# Required if 'cws fetch' is used to fetch a CWS.
hgext.mq=
# Enables the bundled win32text extension. See [hooks] section.
hgext.win32text=

[hooks]
# Reject commits which would introduce windows-style CR/LF.
# Enabling this hook is strongly suggested for OOo development.
pretxncommit.crlf = python:hgext.win32text.forbidcrlf

Let's examine this entry for entry:

[ui]
username=Jens-Heiner Rechtien <hr@openoffice.org>

The author tag of a changeset is set on commit, and becomes part of the history. Set this entry to identify yourself as author, common usage is to use your name and OOo email address here.

Personal tools