Mercurial > hgbook
annotate en/examples/branch-named @ 206:6519f3b983b4
More material about named branches.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 23 Apr 2007 15:28:13 -0700 |
parents | d7615e15510f |
children | 2936cb7eae7a |
rev | line source |
---|---|
202
6f167e644762
Start writing about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
1 #!/bin/bash |
6f167e644762
Start writing about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 |
6f167e644762
Start writing about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
3 hg init a |
6f167e644762
Start writing about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 cd a |
6f167e644762
Start writing about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
5 echo hello > myfile |
6f167e644762
Start writing about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
6 hg commit -A -m 'Initial commit' |
6f167e644762
Start writing about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
7 |
6f167e644762
Start writing about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
8 #$ name: branches |
6f167e644762
Start writing about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
9 |
203
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
10 hg tip |
202
6f167e644762
Start writing about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
11 hg branches |
203
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
12 |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
13 #$ name: branch |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
14 |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
15 hg branch |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
16 |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
17 #$ name: create |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
18 |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
19 hg branch foo |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
20 hg branch |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
21 |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
22 #$ name: status |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
23 |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
24 hg status |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
25 hg tip |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
26 |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
27 #$ name: commit |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
28 |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
29 echo 'hello again' >> myfile |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
30 hg commit -m 'Second commit' |
d7615e15510f
More about named branches, and early use of them.
Bryan O'Sullivan <bos@serpentine.com>
parents:
202
diff
changeset
|
31 hg tip |
206
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
32 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
33 #$ name: rebranch |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
34 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
35 hg branch |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
36 hg branch bar |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
37 echo new file > newfile |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
38 hg commit -A -m 'Third commit' |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
39 hg tip |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
40 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
41 #$ name: parents |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
42 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
43 hg parents |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
44 hg branches |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
45 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
46 #$ name: update-switchy |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
47 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
48 hg update foo |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
49 hg parents |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
50 hg update bar |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
51 hg parents |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
52 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
53 #$ name: update-nothing |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
54 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
55 hg update foo |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
56 hg update |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
57 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
58 #$ name: foo-commit |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
59 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
60 echo something > somefile |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
61 hg commit -A -m 'New file' |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
62 hg heads |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
63 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
64 #$ name: update-bar |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
65 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
66 hg update bar |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
67 hg update -C bar |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
68 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
69 #$ name: merge |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
70 |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
71 hg branch |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
72 hg merge |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
73 hg commit -m 'Merge' |
6519f3b983b4
More material about named branches.
Bryan O'Sullivan <bos@serpentine.com>
parents:
203
diff
changeset
|
74 hg tip |