Differences between revisions 2 and 27 (spanning 25 versions)
Revision 2 as of 2005-08-26 01:22:25
Size: 1533
Editor: waste
Comment:
Revision 27 as of 2011-04-05 16:49:12
Size: 1937
Editor: telephoto
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== [Tutorial] - getting started: installation == == Tutorial - Getting started: Installation ==
Line 3: Line 3:
Installing ["Mercurial"] is straightforward. ''(This page is part of the [[Tutorial]] series. Next part is [[TutorialInit]])''
Line 5: Line 5:
   * * For Linux, Mac``OS X, and other Unix variants, follow the UnixInstall directions.
   * * On Windows, follow the WindowsInstall instructions.
Installing Mercurial is straightforward.
Line 8: Line 7:
Once we're done, we'll come back here.  * For Linux, Mac``OS X, and other Unix variants, follow the UnixInstall directions.
 * On Windows, follow the WindowsInstall instructions.
Line 10: Line 10:
'''Note:''' This tutorial assumes you are running a version of ["Mercurial"] later than 0.6. In other words, if you have the 0.6 release, the tutorial will not work for you. Once you're done, come back here.
Line 12: Line 12:
The ["Mercurial"] program is named {{{hg}}}. Every ["Mercurial"] command starts with {{{hg}}}, followed by the command name, followed by any relevant options and arguments. The Mercurial program is named {{{hg}}}. Every Mercurial command starts with {{{hg}}}, followed by the command name, followed by any relevant options and arguments.
Line 14: Line 14:
Now we should be able to simply type {{{hg}}} at the prompt, and the program should display some helpful command summaries: Now that Mercurial is installed, we should be able to simply type {{{hg}}} at the prompt, and the program should display some helpful command summaries:
Line 17: Line 17:
 $ hg
 basic hg commands (use "hg help -v" for more):
$ hg
Mercurial Distributed SCM

basic commands:
Line 22: Line 25:
 ...  commit commit the specified files or all outstanding changes
 (...)

use "hg help" for the full list of commands or "hg -v" for details
Line 24: Line 30:
If this does not happen, there is something wrong with our installation, and we should take a look at InstallTroubleshooting.
Line 26: Line 31:
To determine what version of Mercurial you are running, type: To determine what version of Mercurial we are running, let's type:
Line 29: Line 34:
 $ hg version
 Mercurial version fa3578bfafbf+20050629
 C
opyright (C) 2005 Matt Mackall <mpm@selenic.com>
 This is free software; see the source for copy
ing conditions. There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
$ hg version
Mercurial Distributed SCM (version 1.7.3)
(see http://mercurial.selenic.com for more information)

Copyright (C)
2005-2010 Matt Mackall and others
This is free software; see the source for c
opying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Line 35: Line 42:

Mercurial will need a username to use for recording commits. It's best to configure Mercurial to use your email address by creating a file `.hgrc`<<FootNote(http://www.selenic.com/mercurial/hgrc.5.html#files)>> in your home directory
(or on Windows in `%USERPROFILE%\Mercurial.ini`, MercurialIni) containing lines like the following:

{{{
[ui]
username = John Doe <john@example.com>
}}}
Line 36: Line 52:

----
CategoryTutorial

Tutorial - Getting started: Installation

(This page is part of the Tutorial series. Next part is TutorialInit)

Installing Mercurial is straightforward.

  • For Linux, MacOS X, and other Unix variants, follow the UnixInstall directions.

  • On Windows, follow the WindowsInstall instructions.

Once you're done, come back here.

The Mercurial program is named hg. Every Mercurial command starts with hg, followed by the command name, followed by any relevant options and arguments.

Now that Mercurial is installed, we should be able to simply type hg at the prompt, and the program should display some helpful command summaries:

$ hg
Mercurial Distributed SCM

basic commands:

 add        add the specified files on the next commit
 annotate   show changeset information per file line
 clone      make a copy of an existing repository
 commit     commit the specified files or all outstanding changes
 (...)

use "hg help" for the full list of commands or "hg -v" for details

To determine what version of Mercurial we are running, let's type:

$ hg version
Mercurial Distributed SCM (version 1.7.3)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2010 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Mercurial will need a username to use for recording commits. It's best to configure Mercurial to use your email address by creating a file .hgrc1 in your home directory (or on Windows in %USERPROFILE%\Mercurial.ini, MercurialIni) containing lines like the following:

[ui]
username = John Doe <john@example.com>

If all has gone well, let's continue on to TutorialClone.


CategoryTutorial

TutorialInstall (last edited 2011-07-08 14:52:05 by 84)