annotate templates/guide/example.sh @ 417:4c185817cc45

Describe the canonical way to track folders: .keep files.
author drak@kaverne
date Thu, 18 Sep 2014 10:56:45 +0200
parents 29d4b5e45423
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
397
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
1 #!/bin/sh
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
2
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
3 # Example script which shows the actions in the workflow guide.
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
4
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
5
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
6 # make sure , project does not exist before starting.
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
7 rm -r project feature1
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
8
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
9 # plain output
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
10 export HGPLAIN=1
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
11
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
12 echo init, add and commit
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
13
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
14 hg init project
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
15 cd project
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
16 echo "[ui]" >> .hg/hgrc
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
17 echo "username = Mr. Johnson <johnson@smith.com>" >> .hg/hgrc
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
18 echo 'print("Hello")' > hello.py
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
19 hg add
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
20 #hg commit
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
21 hg commit --date "2011-11-20 11:00" -m "Initial commit."
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
22 hg log
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
23
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
24 echo status
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
25
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
26 echo 'print("Hello World")' > hello.py
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
27 hg status
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
28 hg diff
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
29 #hg commit
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
30 hg commit --date "2011-11-20 11:11" -m "Say Hello World, not just Hello."
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
31 hg log
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
32
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
33 echo move and copy
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
34
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
35 hg cp hello.py copy
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
36 hg mv hello.py target
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
37 hg status
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
38 hg diff
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
39 hg ci --date "2011-11-20 11:20" -m "Copy and move."
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
40
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
41 echo log
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
42 hg log
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
43
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
44 echo Lone developer with nonlinear history
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
45
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
46 hg update 1
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
47 hg identify -n
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
48
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
49 echo 'print("Hello Mercurial")' > hello.py
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
50 hg ci --date "2011-11-20 20:00" -m "Greet Mercurial"
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
51 hg merge
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
52 hg ci --date "2011-11-20 20:11" -m "merge greeting and copy+move."
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
53
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
54 hg log
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
55
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
56 cd ..
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
57 hg clone project feature1
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
58 cd feature1
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
59 hg update 3
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
60 echo 'print("Hello feature1")' > hello.py
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
61 hg commit --date "2011-11-20 20:11:11" -m "Greet feature1"
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
62 cd ../project
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
63 hg in ../feature1
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
64 hg pull ../feature1
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
65 hg merge
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
66 hg commit --date "2011-11-20 20:20" -m "merged feature1"
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
67 hg log -r -1:-3
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
68 hg rollback
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
69 hg commit --date "2011-11-20 20:20:11 +1100" -m "Merged Feature 1"
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
70 hg log -r -1:-2
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
71
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
72 echo sharing changes
29d4b5e45423 Use flask to render site and get rid of submodules
David Soria Parra <davidsp@fb.com>
parents:
diff changeset
73 hg out ../feature1