hgbook
diff ja/examples/branch-named @ 1112:7764de86d22f
refined chap 2
author | Zhaoping Sun <zhaopingsun@gmail.com> |
---|---|
date | Mon Dec 28 22:58:53 2009 -0500 (2009-12-28) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ja/examples/branch-named Mon Dec 28 22:58:53 2009 -0500 1.3 @@ -0,0 +1,74 @@ 1.4 +#!/bin/bash 1.5 + 1.6 +hg init a 1.7 +cd a 1.8 +echo hello > myfile 1.9 +hg commit -A -m 'Initial commit' 1.10 + 1.11 +#$ name: branches 1.12 + 1.13 +hg tip 1.14 +hg branches 1.15 + 1.16 +#$ name: branch 1.17 + 1.18 +hg branch 1.19 + 1.20 +#$ name: create 1.21 + 1.22 +hg branch foo 1.23 +hg branch 1.24 + 1.25 +#$ name: status 1.26 + 1.27 +hg status 1.28 +hg tip 1.29 + 1.30 +#$ name: commit 1.31 + 1.32 +echo 'hello again' >> myfile 1.33 +hg commit -m 'Second commit' 1.34 +hg tip 1.35 + 1.36 +#$ name: rebranch 1.37 + 1.38 +hg branch 1.39 +hg branch bar 1.40 +echo new file > newfile 1.41 +hg commit -A -m 'Third commit' 1.42 +hg tip 1.43 + 1.44 +#$ name: parents 1.45 + 1.46 +hg parents 1.47 +hg branches 1.48 + 1.49 +#$ name: update-switchy 1.50 + 1.51 +hg update foo 1.52 +hg parents 1.53 +hg update bar 1.54 +hg parents 1.55 + 1.56 +#$ name: update-nothing 1.57 + 1.58 +hg update foo 1.59 +hg update 1.60 + 1.61 +#$ name: foo-commit 1.62 + 1.63 +echo something > somefile 1.64 +hg commit -A -m 'New file' 1.65 +hg heads 1.66 + 1.67 +#$ name: update-bar 1.68 + 1.69 +hg update bar 1.70 +hg update -C bar 1.71 + 1.72 +#$ name: merge 1.73 + 1.74 +hg branch 1.75 +hg merge 1.76 +hg commit -m 'Merge' 1.77 +hg tip