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