hgbook

diff es/examples/branch-repo @ 399:2a1067c24be1

Merging javier changes
author Igor TAmara <igor@tamarapatino.org>
date Thu Nov 06 23:07:42 2008 -0500 (2008-11-06)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/es/examples/branch-repo	Thu Nov 06 23:07:42 2008 -0500
     1.3 @@ -0,0 +1,48 @@
     1.4 +#!/bin/bash
     1.5 +
     1.6 +hg init myproject
     1.7 +cd myproject
     1.8 +echo hello > myfile
     1.9 +hg commit -A -m 'Initial commit'
    1.10 +cd ..
    1.11 +
    1.12 +#$ name: tag
    1.13 +
    1.14 +cd myproject
    1.15 +hg tag v1.0
    1.16 +
    1.17 +#$ name: clone
    1.18 +
    1.19 +cd ..
    1.20 +hg clone myproject myproject-1.0.1
    1.21 +
    1.22 +#$ name: bugfix
    1.23 +
    1.24 +hg clone myproject-1.0.1 my-1.0.1-bugfix
    1.25 +cd my-1.0.1-bugfix
    1.26 +echo 'I fixed a bug using only echo!' >> myfile
    1.27 +hg commit -m 'Important fix for 1.0.1'
    1.28 +#$ ignore: /tmp/branch-repo.*
    1.29 +hg push
    1.30 +
    1.31 +#$ name: new
    1.32 +
    1.33 +cd ..
    1.34 +hg clone myproject my-feature
    1.35 +cd my-feature
    1.36 +echo 'This sure is an exciting new feature!' > mynewfile
    1.37 +hg commit -A -m 'New feature'
    1.38 +hg push
    1.39 +
    1.40 +#$ name: pull
    1.41 +
    1.42 +cd ..
    1.43 +hg clone myproject myproject-merge
    1.44 +cd myproject-merge
    1.45 +hg pull ../myproject-1.0.1
    1.46 +
    1.47 +#$ name: merge
    1.48 +
    1.49 +hg merge
    1.50 +hg commit -m 'Merge bugfix from 1.0.1 branch'
    1.51 +hg push