hgbook

annotate es/examples/branch-named @ 649:d13c7c706a58

Merge with http://hg.serpentine.com/mercurial/book
author Dongsheng Song <dongsheng.song@gmail.com>
date Fri Mar 20 15:40:06 2009 +0800 (2009-03-20)
parents
children
rev   line source
igor@333 1 #!/bin/bash
igor@333 2
igor@333 3 hg init a
igor@333 4 cd a
igor@333 5 echo hello > myfile
igor@333 6 hg commit -A -m 'Initial commit'
igor@333 7
igor@333 8 #$ name: branches
igor@333 9
igor@333 10 hg tip
igor@333 11 hg branches
igor@333 12
igor@333 13 #$ name: branch
igor@333 14
igor@333 15 hg branch
igor@333 16
igor@333 17 #$ name: create
igor@333 18
igor@333 19 hg branch foo
igor@333 20 hg branch
igor@333 21
igor@333 22 #$ name: status
igor@333 23
igor@333 24 hg status
igor@333 25 hg tip
igor@333 26
igor@333 27 #$ name: commit
igor@333 28
igor@333 29 echo 'hello again' >> myfile
igor@333 30 hg commit -m 'Second commit'
igor@333 31 hg tip
igor@333 32
igor@333 33 #$ name: rebranch
igor@333 34
igor@333 35 hg branch
igor@333 36 hg branch bar
igor@333 37 echo new file > newfile
igor@333 38 hg commit -A -m 'Third commit'
igor@333 39 hg tip
igor@333 40
igor@333 41 #$ name: parents
igor@333 42
igor@333 43 hg parents
igor@333 44 hg branches
igor@333 45
igor@333 46 #$ name: update-switchy
igor@333 47
igor@333 48 hg update foo
igor@333 49 hg parents
igor@333 50 hg update bar
igor@333 51 hg parents
igor@333 52
igor@333 53 #$ name: update-nothing
igor@333 54
igor@333 55 hg update foo
igor@333 56 hg update
igor@333 57
igor@333 58 #$ name: foo-commit
igor@333 59
igor@333 60 echo something > somefile
igor@333 61 hg commit -A -m 'New file'
igor@333 62 hg heads
igor@333 63
igor@333 64 #$ name: update-bar
igor@333 65
igor@333 66 hg update bar
igor@333 67
igor@333 68 #$ name: merge
igor@333 69
igor@333 70 hg branch
igor@333 71 hg merge foo
igor@333 72 hg commit -m 'Merge'
igor@333 73 hg tip