hgbook
diff en/examples/rollback @ 791:bf84d6b2281c
Minor changes and translation of code snippets for Ch.7.
author | Giulio@puck |
---|---|
date | Tue Aug 11 23:01:30 2009 +0200 (2009-08-11) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/en/examples/rollback Tue Aug 11 23:01:30 2009 +0200 1.3 @@ -0,0 +1,37 @@ 1.4 +#!/bin/bash 1.5 + 1.6 +hg init a 1.7 +cd a 1.8 +echo a > a 1.9 +hg ci -A -m 'First commit' 1.10 + 1.11 +echo a >> a 1.12 + 1.13 +#$ name: tip 1.14 + 1.15 +#$ name: commit 1.16 + 1.17 +hg status 1.18 +echo b > b 1.19 +hg commit -m 'Add file b' 1.20 + 1.21 +#$ name: status 1.22 + 1.23 +hg status 1.24 +hg tip 1.25 + 1.26 +#$ name: rollback 1.27 + 1.28 +hg rollback 1.29 +hg tip 1.30 +hg status 1.31 + 1.32 +#$ name: add 1.33 + 1.34 +hg add b 1.35 +hg commit -m 'Add file b, this time for real' 1.36 + 1.37 +#$ name: twice 1.38 + 1.39 +hg rollback 1.40 +hg rollback