view en/examples/branch-repo @ 198:615f3c6b30e1

Start to describe branch management.
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 16 Apr 2007 17:21:38 -0700
parents
children 58e3a6c76725
line wrap: on
line source

#!/bin/bash

hg init myproject
cd myproject
echo hello > myfile
hg commit -A -m 'Initial commit'
cd ..

#$ name: tag

cd myproject
hg tag v1.0

#$ name: clone

cd ..
hg clone myproject myproject-1.0.1

#$ name: bugfix

hg clone myproject-1.0.1 my-1.0.1-bugfix
cd my-1.0.1-bugfix
echo 'I fixed a bug using only echo!' >> myfile
hg commit -m 'Important fix for 1.0.1'
#$ ignore: /tmp/branch-repo.*
hg push

#$ name: new

cd ..
hg clone myproject my-feature
cd my-feature
echo "I'm adding a new feature with my mind!" > mynewfile
hg commit -A -m 'New feature'