annotate en/examples/daily.files @ 433:83790457e85b

modifications to generate the examples for the book
author jerojasro@localhost
date Sat, 18 Oct 2008 12:07:16 -0500
parents d9a1faa45c30
children eb11ec9eed8c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
47
6f37e6a7d8cd Get Emacs to figure out what syntax highlighting to use for examples.
Bryan O'Sullivan <bos@serpentine.com>
parents: 43
diff changeset
1 #!/bin/bash
6f37e6a7d8cd Get Emacs to figure out what syntax highlighting to use for examples.
Bryan O'Sullivan <bos@serpentine.com>
parents: 43
diff changeset
2
43
7ac85766db0f Rename, remove.
Bryan O'Sullivan <bos@serpentine.com>
parents: 42
diff changeset
3 #$ name: add
42
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
4
117
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
5 hg init add-example
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
6 cd add-example
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
7 echo a > a
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
8 hg status
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
9 hg add a
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
10 hg status
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
11 hg commit -m 'Added one file'
42
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
12 hg status
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
13
117
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
14 #$ name: add-dir
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
15
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
16 mkdir b
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
17 echo b > b/b
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
18 echo c > b/c
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
19 mkdir b/d
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
20 echo d > b/d/d
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
21 hg add b
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
22 hg commit -m 'Added all files in subdirectory'
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
23
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
24 #$ name:
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
25
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
26 cd ..
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
27
42
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
28 #$ name: hidden
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
29
117
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
30 hg init hidden-example
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
31 cd hidden-example
42
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
32 mkdir empty
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
33 touch empty/.hidden
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
34 hg add empty/.hidden
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
35 hg commit -m 'Manage an empty-looking directory'
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
36 ls empty
cbfa08bcf181 Start the "Mercurial in daily use" chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
37 cd ..
117
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
38 hg clone hidden-example tmp
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
39 ls tmp
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
40 ls tmp/empty
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
41
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
42 #$ name: remove
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
43
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
44 hg init remove-example
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
45 cd remove-example
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
46 echo a > a
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
47 mkdir b
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
48 echo b > b/b
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
49 hg add a b
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
50 hg commit -m 'Small example for file removal'
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
51 hg remove a
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
52 hg status
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
53 hg remove b
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
54
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
55 #$ name:
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
56
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
57 cd ..
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
58
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
59 #$ name: missing
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
60 hg init missing-example
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
61 cd missing-example
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
62 echo a > a
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
63 hg add a
265
d9a1faa45c30 added a space between -m and the commit message.
bab@draketo.de
parents: 140
diff changeset
64 hg commit -m 'File about to be missing'
117
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
65 rm a
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
66 hg status
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
67
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
68 #$ name: remove-after
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
69
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
70 hg remove --after a
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
71 hg status
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
72
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
73 #$ name: recover-missing
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
74 hg revert a
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
75 cat a
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
76 hg status
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
77
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
78 #$ name:
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
79
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
80 cd ..
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
81
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
82 #$ name: addremove
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
83
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
84 hg init addremove-example
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
85 cd addremove-example
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
86 echo a > a
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
87 echo b > b
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
88 hg addremove
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
89
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
90 #$ name: commit-addremove
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
91
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
92 echo c > c
6b0f4498569e Beef up daily routine material. Focus on merge-across-copy.
Bryan O'Sullivan <bos@serpentine.com>
parents: 47
diff changeset
93 hg commit -A -m 'Commit with addremove'