Mercurial > hgbook
diff en/examples/daily.revert @ 122:3af28630fe8c
How to goodbye depression by reverting one thousand times daily.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 15 Nov 2006 16:57:29 -0800 |
parents | |
children | f954c6f6eaa1 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/en/examples/daily.revert Wed Nov 15 16:57:29 2006 -0800 @@ -0,0 +1,75 @@ +#!/bin/bash + +hg init a +cd a +echo 'original content' > file +hg ci -Ama + +#$ name: modify + +cat file +echo unwanted change >> file +hg diff file + +#$ name: unmodify + +hg status +hg revert file +cat file + +#$ name: status + +hg status +cat file.orig + +#$ name: + +rm file.orig + +#$ name: add + +echo oops > oops +hg add oops +hg status oops +hg revert oops +hg status + +#$ name: + +rm oops + +#$ name: remove + +hg remove file +hg status +hg revert file +hg status +ls file + +#$ name: missing + +rm file +hg status +hg revert file +ls file + +#$ name: copy + +hg copy file new-file +hg revert new-file +hg status + +#$ name: + +rm new-file + +#$ name: rename + +hg rename file new-file +hg revert new-file +hg status + +#$ name: rename-orig + +hg revert file +hg status