view en/examples/rollback @ 824:c8d662d3cb40

Improve chapter 1 further, based on comments.
author Bryan O'Sullivan <bos@serpentine.com>
date Sun, 03 May 2009 19:23:08 -0700
parents 9094c9fda8ec
children
line wrap: on
line source

#!/bin/bash

hg init a
cd a
echo a > a
hg ci -A -m 'First commit'

echo a >> a

#$ name: tip

#$ name: commit

hg status
echo b > b
hg commit -m 'Add file b'

#$ name: status

hg status
hg tip

#$ name: rollback

hg rollback
hg tip
hg status

#$ name: add

hg add b
hg commit -m 'Add file b, this time for real'

#$ name: twice

hg rollback
hg rollback