Mercurial > hg
comparison README @ 3935:1158d7018052
Move README info to wiki
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 19 Dec 2006 17:17:08 -0600 |
parents | 048e9bc5cdc2 |
children | 1de6e7e1bb9f |
comparison
equal
deleted
inserted
replaced
3934:d0bbd8ee50c7 | 3935:1158d7018052 |
---|---|
1 MERCURIAL QUICK-START | 1 Basic install: |
2 | 2 |
3 Setting up Mercurial: | 3 $ make # see install targets |
4 $ make install # do a system-wide install | |
5 $ hg debuginstall # sanity-check setup | |
6 $ hg # see help | |
4 | 7 |
5 Note: some distributions fails to include bits of distutils by | 8 See http://www.selenic.com/mercurial/ for detailed installation |
6 default, you'll need python-dev to install. You'll also need a C | 9 instructions, platform-specific notes, and Mercurial user information. |
7 compiler and a 3-way merge tool like merge, tkdiff, or kdiff3. | |
8 | 10 |
9 First, unpack the source: | |
10 | |
11 $ tar xvzf mercurial-<ver>.tar.gz | |
12 $ cd mercurial-<ver> | |
13 | |
14 When installing, change python to python2.3 or python2.4 if 2.2 is the | |
15 default on your system. | |
16 | |
17 To install system-wide: | |
18 | |
19 $ python setup.py install --force | |
20 | |
21 To install in your home directory (~/bin and ~/lib, actually), run: | |
22 | |
23 $ python setup.py install --home=${HOME} --force | |
24 $ export PYTHONPATH=${HOME}/lib/python # (or lib64/ on some systems) | |
25 $ export PATH=${HOME}/bin:$PATH # add these to your .bashrc | |
26 | |
27 And finally: | |
28 | |
29 $ hg debuginstall # run some basic tests | |
30 $ hg # show help | |
31 | |
32 If you get complaints about missing modules, you probably haven't set | |
33 PYTHONPATH correctly. | |
34 | |
35 Setting up a Mercurial project: | |
36 | |
37 $ hg init project # creates project directory | |
38 $ cd project | |
39 # copy files in, edit them | |
40 $ hg add # add all unknown files | |
41 $ hg commit # commit all changes, edit changelog entry | |
42 | |
43 Mercurial will look for a file named .hgignore in the root of your | |
44 repository which contains a set of regular expressions to ignore in | |
45 file paths. | |
46 | |
47 Branching and merging: | |
48 | |
49 $ hg clone project project-work # create a new branch | |
50 $ cd project-work | |
51 $ <make changes> | |
52 $ hg commit | |
53 $ cd ../project | |
54 $ hg pull ../project-work # pull changesets from project-work | |
55 $ hg merge # merge the new tip from project-work into | |
56 # our working directory | |
57 $ hg commit # commit the result of the merge | |
58 | |
59 Importing patches: | |
60 | |
61 Simple: | |
62 $ patch < ../p/foo.patch | |
63 $ hg commit -A | |
64 | |
65 Fast: | |
66 $ cat ../p/patchlist | xargs hg import -p1 -b ../p | |
67 | |
68 Exporting a patch: | |
69 | |
70 (make changes) | |
71 $ hg commit | |
72 $ hg export tip > foo.patch # export latest change | |
73 | |
74 Network support: | |
75 | |
76 # pull from the primary Mercurial repo | |
77 foo$ hg clone http://selenic.com/hg/ | |
78 foo$ cd hg | |
79 | |
80 # make your current repo available via http://server:8000/ | |
81 foo$ hg serve | |
82 | |
83 # pushing and pulling changes to/from a remote repo with SSH | |
84 foo$ hg push ssh://user@example.com/my/repository | |
85 foo$ hg pull ssh://user@example.com//home/somebody/his/repository | |
86 | |
87 # merge changes from a remote machine (e.g. running 'hg serve') | |
88 bar$ hg pull http://foo:8000/ | |
89 bar$ hg merge # merge changes into your working directory | |
90 bar$ hg commit # commit merge in to your local repository | |
91 | |
92 # Set up a CGI server on your webserver | |
93 foo$ cp hgweb.cgi ~/public_html/hg/index.cgi | |
94 foo$ emacs ~/public_html/hg/index.cgi # adjust the defaults | |
95 | |
96 For more info: | |
97 | |
98 Documentation in doc/ | |
99 Mercurial website at http://selenic.com/mercurial |