Mercurial > hg-website
annotate text/quick_start.txt @ 199:4ede00e321b8
Finished concept for the learning link site.
author | Arne Babenhauserheide <bab@draketo.de> |
---|---|
date | Thu, 25 Jun 2009 00:23:46 +0200 |
parents | 5bc5fe45852a |
children | 7ad3b0348ffc |
rev | line source |
---|---|
105
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
1 = Quick Start = |
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
2 |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
3 *This site should get you going at once.* |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
4 |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
5 == Part 0: Instant usage == |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
6 |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
7 *(you know this from the main page)* |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
8 |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
9 Clone a project and create a patch |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
10 |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
11 $ hg clone http://hg-scm.org/hello |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
12 $ cd hello |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
13 $ (edit files) |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
14 $ hg add (new files) |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
15 $ hg commit -m 'My changes' |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
16 $ hg export tip > patch.diff |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
17 |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
18 |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
19 Create a project and commit |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
20 |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
21 $ hg init (project-directory) |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
22 $ cd (project-directory) |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
23 $ (add some files) |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
24 $ hg add |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
25 $ hg commit -m 'Initial commit' |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
26 |
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
27 |
191
e288850bd825
Some polishing of quick_start.
Arne Babenhauserheide <bab@draketo.de>
parents:
121
diff
changeset
|
28 == Part 1: Using Mercurial == |
e288850bd825
Some polishing of quick_start.
Arne Babenhauserheide <bab@draketo.de>
parents:
121
diff
changeset
|
29 |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
30 Aside from the practical Quick Start above, there are only a few commands you need to start working. |
114
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
31 |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
32 Even if you stick to these basics, Mercurial is quite powerful. And they are very easy to use, once you see the model behind that: Each repository has the whole history, and history is not necessarily linear (part 2 explains that model in a bit more detail). |
105
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
33 |
114
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
34 A quick overview of the basic commands: |
105
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
35 |
114
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
36 - hg init: create a new repository |
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
37 - hg commit: save your changes in the current repository |
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
38 - hg log: see all changes in your repository |
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
39 - hg pull: get all changes from another repository int the current one |
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
40 - hg push: get all changes from your repository into another one |
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
41 - hg serve: create an instant-webserver. People can see the history there and pull from it |
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
42 - hg merge: join different lines of history |
105
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
43 |
114
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
44 If you want to see a nice graph of the history, just do "hg serve" in your repository and then direct your browser to |
105
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
45 |
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
46 http://127.0.0.1:8000 |
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
47 |
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
48 This also helps getting a feeling for what the commands do. |
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
49 |
114
aa325d9f79cd
Reqorked quick start text.
Arne Babenhauserheide <bab@draketo.de>
parents:
105
diff
changeset
|
50 (you can also do a lot of finegrained stuff by using different command options. Just call "hg help <command>" to see them). |
105
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
51 |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
52 I you want more than this quick overview, please have a look at our longer [practical guide]({% url workflow_guide %}). |
105
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
53 |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
54 == Part 2: Understanding Mercurial from Subversion == |
105
7a057bf137c5
Added a bastic draft for a quick_start - copied from the mailing list :) .
Arne Babenhauserheide <bab@draketo.de>
parents:
diff
changeset
|
55 |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
56 Now we'll look at some of the basic concepts of Mercurial to get a better understanding of its internals: |
192
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
57 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
58 * Like in Subversion, history consists of a number of commits. They're |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
59 called changesets in Mercurial. |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
60 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
61 * Subversion requires a strict linear ordering of the commits and |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
62 gives nice linear revision numbers to them. So revision N has only |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
63 one child revision, N+1. |
192
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
64 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
65 This is simple, but it requires a central server to make sure that |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
66 everybody agrees on the revision numbers. |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
67 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
68 * Mercurial generalizes this by letting each changeset have multiple |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
69 children. If I work alone and make commits I'll make |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
70 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
71 C1 --> C2 --> C3 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
72 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
73 by making three commits. The commit C3 with no children is a "head". |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
74 It is also the newest changeset in the repository -- called "tip". |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
75 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
76 If I shared C1 with you and you started your work from that, your |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
77 commits will build a repository like this: |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
78 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
79 C1 --> C2' --> C3' |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
80 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
81 Here C3' is a head in your repository and I don't know anything |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
82 about C2' and C3' yet. |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
83 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
84 * If I pull from you, or you push to me, the two repositories are |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
85 compared. By default, all missing changesets are transferred. This |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
86 is all there is to push/pull: compare two graphs of changesets and |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
87 transfer the missing ones. |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
88 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
89 After a pull from you my repository will look like this: |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
90 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
91 /-> C2 --> C3 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
92 C1 -< |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
93 \-> C2' --> C3' |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
94 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
95 Here C1 has two child changesets, and the repository has two heads |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
96 since the development has diverged. |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
97 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
98 The changeset C3' will be the new tip since it is the newest |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
99 changeset in the repository. Note that tip is always a head, but a |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
100 head need not be the tip. |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
101 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
102 * Having two heads suggest that someone should merge them -- otherwise |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
103 the changes from one will never be combined with the changed made in |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
104 the other head. |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
105 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
106 When merging with 'hg merge' the task is to figure out the canonical |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
107 way to combine the changesets. If the changes do not overlap this is |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
108 usually trivial, otherwise you have to do a three-way merge. The |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
109 merge must be committed and this creates a changeset which explains |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
110 to the world how you think the two heads should be combined: |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
111 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
112 /-> C2 --> C3 -\ |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
113 C1 -< >-> M |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
114 \-> C2' --> C3' -/ |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
115 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
116 Note that the merge changeset M has two parents. |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
117 |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
118 If you do not merge C3 and C3' and try to push, you get the 'new |
192
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
119 remote head' message and push aborts. It aborts since it is a little |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
120 "impolite" to leave the job of merging to someone else -- he who |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
121 created the two heads by pulling in some code should also normally |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
122 do the merging. |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
123 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
124 |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
125 It helped my understanding a lot to think in terms of the changeset graph. Just remember that: |
192
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
126 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
127 * "hg commit" adds a new node. The parent changesets of the new node |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
128 is given by "hg parents" |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
129 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
130 * "hg push" and "hg pull" transfer nodes in the graph between two |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
131 repositories. |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
132 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
133 * "hg update" updates the working copy to reflect a given node in |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
134 the history graph. This also changes the parent changeset of the |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
135 next commit, see "hg parents". |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
136 |
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
137 |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
138 And you want to quickly look up something, you can use one of the [Mercurial cheatsheets](http://www.selenic.com/mercurial/wiki/index.cgi/QuickReferenceCardsAndCheatSheets). |
192
3b95da26a544
quick start: Included and partly reworked the mail from Martin Geisler for understanding Mercurial.
Arne Babenhauserheide <bab@draketo.de>
parents:
191
diff
changeset
|
139 |
195
5bc5fe45852a
cleaned up quickstart a bit.
Arne Babenhauserheide <bab@draketo.de>
parents:
193
diff
changeset
|
140 *compiled from a great email by Martin Geisler* |