Source

hgbook / fr / examples / tour

Diff from to

File fr/examples/tour

 hg clone hello my-hello
 cd my-hello
 
-#$ name: sed
+#$ name: cat1
+cat hello.c
+
+#$ name:
 
 sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c
 
+#$ name: cat2
+# ... edit edit edit ...
+cat hello.c
+
 #$ name: status
 
 ls
 hg update 2
 hg parents
 hg update
+hg parents
 
 #$ name: clone-push
 
 
 hg push http://hg.serpentine.com/tutorial/hello
 
+#$ name:
+cp hello.c ../new-hello.c
+sed -i '/printf("hello,/i\\tprintf("once more, hello.\\n");' ../new-hello.c
+
+my-text-editor()
+{
+cp ../new-hello.c hello.c
+}
+
 #$ name: merge.clone
 
 cd ..
 hg clone hello my-new-hello
 cd my-new-hello
-sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c
+# Make some simple edits to hello.c.
+my-text-editor hello.c
 hg commit -m 'A new hello for a new day.'
 
 #$ name: merge.dummy2
 
 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-new-hello
 
-#$ name: merge.cat
+#$ name: merge.cat1
 
 cat hello.c
+
+#$ name: merge.cat2
+
 cat ../my-hello/hello.c
 
 #$ name: merge.pull