hgbook
annotate en/examples/ch01/new @ 1059:b098ca24c0ad
1.7 zh translated
author | zhaopingsun |
---|---|
date | Tue Nov 10 20:39:23 2009 -0500 (2009-11-10) |
parents | |
children |
rev | line source |
---|---|
bos@699 | 1 #!/bin/bash |
bos@699 | 2 |
bos@699 | 3 cat > hello.c <<EOF |
bos@699 | 4 int main() |
bos@699 | 5 { |
bos@699 | 6 printf("hello world!\n"); |
bos@699 | 7 } |
bos@699 | 8 EOF |
bos@699 | 9 |
bos@699 | 10 cat > goodbye.c <<EOF |
bos@699 | 11 int main() |
bos@699 | 12 { |
bos@699 | 13 printf("goodbye world!\n"); |
bos@699 | 14 } |
bos@699 | 15 EOF |
bos@699 | 16 |
bos@699 | 17 #$ name: init |
bos@699 | 18 |
bos@699 | 19 hg init myproject |
bos@699 | 20 |
bos@699 | 21 #$ name: ls |
bos@699 | 22 |
bos@699 | 23 ls -l |
bos@699 | 24 |
bos@699 | 25 #$ name: ls2 |
bos@699 | 26 |
bos@699 | 27 ls -al myproject |
bos@699 | 28 |
bos@699 | 29 #$ name: add |
bos@699 | 30 |
bos@699 | 31 cd myproject |
bos@699 | 32 cp ../hello.c . |
bos@699 | 33 cp ../goodbye.c . |
bos@699 | 34 hg add |
bos@699 | 35 hg status |
bos@699 | 36 |
bos@699 | 37 #$ name: commit |
bos@699 | 38 |
bos@699 | 39 hg commit -m 'Initial commit' |