Mercurial > hg
comparison README @ 445:fe48ffa3665f
README tidy-up
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
README tidy-up
manifest hash: 3093d78dfb6ba9ce83ae96d0a04ad5351b3088af
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCuy4WywK+sNU5EO8RAiwBAJ46tZBe1PLzKM+e70rdEF7wYtVrwgCfZoeo
Gjt1DE0ZxkSFyWW5erIqyfI=
=xF6B
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Thu, 23 Jun 2005 13:48:06 -0800 |
parents | 27d08c0c2a7e |
children | dd8b19114fe7 |
comparison
equal
deleted
inserted
replaced
444:2cdcb4beecb2 | 445:fe48ffa3665f |
---|---|
1 MERCURIAL QUICK-START | |
2 | |
1 Setting up Mercurial: | 3 Setting up Mercurial: |
2 | 4 |
3 Note: some distributions fails to include bits of distutils by | 5 Note: some distributions fails to include bits of distutils by |
4 default, you'll need python-dev to install. You'll also need a C | 6 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. | 7 compiler and a 3-way merge tool like merge, tkdiff, or kdiff3. |
26 If you get complaints about missing modules, you probably haven't set | 28 If you get complaints about missing modules, you probably haven't set |
27 PYTHONPATH correctly. | 29 PYTHONPATH correctly. |
28 | 30 |
29 Setting up a Mercurial project: | 31 Setting up a Mercurial project: |
30 | 32 |
31 $ cd linux/ | 33 $ cd project/ |
32 $ hg init # creates .hg | 34 $ hg init # creates .hg |
33 $ hg status # show changes between repo and working dir | 35 $ hg status # show changes between repo and working dir |
34 $ hg diff # generate a unidiff | 36 $ hg diff # generate a unidiff |
35 $ hg addremove # add all unknown files and remove all missing files | 37 $ hg addremove # add all unknown files and remove all missing files |
36 $ hg commit # commit all changes, edit changelog entry | 38 $ hg commit # commit all changes, edit changelog entry |
40 repository contains a set of regular expressions to ignore in file | 42 repository contains a set of regular expressions to ignore in file |
41 paths. | 43 paths. |
42 | 44 |
43 Mercurial commands: | 45 Mercurial commands: |
44 | 46 |
47 $ hg help [command] # get online help | |
45 $ hg history # show changesets | 48 $ hg history # show changesets |
46 $ hg log Makefile # show commits per file | 49 $ hg log Makefile # show commits per file |
47 $ hg update # check out the tip revision | 50 $ hg update # check out the tip revision |
48 $ hg update <id> # check out a specified changeset | 51 $ hg update <id> # check out a specified changeset |
49 # IDs can be tags, revision numbers, or unique | 52 # IDs can be tags, revision numbers, or unique |
63 $ hg update # populate the working directory | 66 $ hg update # populate the working directory |
64 $ <make changes> | 67 $ <make changes> |
65 $ hg commit | 68 $ hg commit |
66 $ cd ../linux | 69 $ cd ../linux |
67 $ hg pull ../linux-work # pull changesets from linux-work | 70 $ hg pull ../linux-work # pull changesets from linux-work |
68 $ hg update # merge the new tip from linux-work into | 71 $ hg update -m # merge the new tip from linux-work into |
69 # our working directory | 72 # our working directory |
70 | 73 |
71 Importing patches: | 74 Importing patches: |
72 | 75 |
73 Fast: | 76 Fast: |
90 28237:747a537bd090880c29eae861df4d81b245aa0190 | 93 28237:747a537bd090880c29eae861df4d81b245aa0190 |
91 $ hg export 28237 > foo.patch # export changeset 28237 | 94 $ hg export 28237 > foo.patch # export changeset 28237 |
92 | 95 |
93 Network support: | 96 Network support: |
94 | 97 |
95 # pull the self-hosting hg repo | 98 # pull from the primary Mercurial repo |
96 foo$ hg init | 99 foo$ hg init |
97 foo$ hg pull http://selenic.com/hg/ | 100 foo$ hg pull http://selenic.com/hg/ |
98 foo$ hg update # hg co works too | 101 foo$ hg update # hg co works too |
99 | 102 |
100 # export your current repo via HTTP with browsable interface | 103 # export your current repo via HTTP with browsable interface |
103 # pushing changes to a remote repo with SSH | 106 # pushing changes to a remote repo with SSH |
104 foo$ hg push ssh://user@example.com/~/hg/ | 107 foo$ hg push ssh://user@example.com/~/hg/ |
105 | 108 |
106 # merge changes from a remote machine | 109 # merge changes from a remote machine |
107 bar$ hg pull http://foo/ | 110 bar$ hg pull http://foo/ |
108 bar$ hg co # merge changes into your working directory | 111 bar$ hg update -m # merge changes into your working directory |
109 | 112 |
110 # Set up a CGI server on your webserver | 113 # Set up a CGI server on your webserver |
111 foo$ cp hgweb.cgi ~/public_html/hg-linux/index.cgi | 114 foo$ cp hgweb.cgi ~/public_html/hg/index.cgi |
112 foo$ emacs ~/public_html/hg-linux/index.cgi # adjust the defaults | 115 foo$ emacs ~/public_html/hg/index.cgi # adjust the defaults |
113 | 116 |
114 Symbolic repository names: | 117 Symbolic repository names: |
115 | 118 |
116 Mercurial uses an options file called ~/.hgrc. To track locations | 119 Mercurial uses an options file called ~/.hgrc. To track locations |
117 symbolically, add a section to it like this: | 120 symbolically, add a section to it like this: |
118 | 121 |
119 [paths] | 122 [paths] |
120 main = http://selenic.com/hg | 123 main = http://selenic.com/hg |
121 hgweb = http://edge2.net/hg/hgweb/ | 124 linux = http://www.kernel.org/hg/ |
122 hgdoc = http://edge2.net/hg/man/ |