1 Setting up Mercurial: |
1 Setting up Mercurial: |
2 |
2 |
3 Note: some distributions fails to include bits of distutils by |
3 Note: some distributions fails to include bits of distutils by |
4 default, you'll need python-dev to install. |
4 default, you'll need python-dev to install. You'll also need a C |
|
5 compiler and a 3-way merge tool like merge, tkdiff, or kdiff3. |
5 |
6 |
6 First, unpack the source: |
7 First, unpack the source: |
7 |
8 |
8 $ tar xvzf mercurial-<ver>.tar.gz |
9 $ tar xvzf mercurial-<ver>.tar.gz |
9 $ cd mercurial-<ver> |
10 $ cd mercurial-<ver> |
10 |
11 |
11 Then to install: |
12 To install system-wide: |
12 |
13 |
13 $ python setup.py install # change python to python2.3 if 2.2 is default |
14 $ python setup.py install # change python to python2.3 if 2.2 is default |
14 |
15 |
15 To install in your home directory (~/bin and ~/lib, actually), simply |
16 To install in your home directory (~/bin and ~/lib, actually), run: |
16 run: |
|
17 |
17 |
18 $ python2.3 setup.py install --home=~ |
18 $ python2.3 setup.py install --home=~ |
19 $ export PYTHONPATH=${HOME}/lib/python # add this to your .bashrc |
19 $ export PYTHONPATH=${HOME}/lib/python # add this to your .bashrc |
20 $ export PATH=${HOME}/bin:$PATH # |
20 $ export PATH=${HOME}/bin:$PATH # |
|
21 |
|
22 You'll also need to set up a tool to handle three-way merges: |
|
23 |
21 $ export HGMERGE=tkmerge # customize this |
24 $ export HGMERGE=tkmerge # customize this |
22 |
25 |
23 And finally: |
26 And finally: |
24 |
27 |
25 $ hg # test installation, show help |
28 $ hg # test installation, show help |
79 $ hg commit `lsdiff -p1 ../p/foo.patch` |
82 $ hg commit `lsdiff -p1 ../p/foo.patch` |
80 |
83 |
81 Fastest: |
84 Fastest: |
82 $ cat ../p/patchlist | xargs hg import -p1 -b ../p |
85 $ cat ../p/patchlist | xargs hg import -p1 -b ../p |
83 |
86 |
|
87 Exporting a patch: |
|
88 |
|
89 (make changes) |
|
90 $ hg commit |
|
91 $ hg tip |
|
92 28237:747a537bd090880c29eae861df4d81b245aa0190 |
|
93 $ hg export 28237 > foo.patch # export changeset 28237 |
|
94 |
84 Network support: |
95 Network support: |
85 |
96 |
86 # pull the self-hosting hg repo |
97 # pull the self-hosting hg repo |
87 foo$ hg init |
98 foo$ hg init |
88 foo$ hg merge http://selenic.com/hg/ |
99 foo$ hg merge http://selenic.com/hg/ |