Mercurial > hgbook
comparison 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 |
comparison
equal
deleted
inserted
replaced
121:9094c9fda8ec | 122:3af28630fe8c |
---|---|
1 #!/bin/bash | |
2 | |
3 hg init a | |
4 cd a | |
5 echo 'original content' > file | |
6 hg ci -Ama | |
7 | |
8 #$ name: modify | |
9 | |
10 cat file | |
11 echo unwanted change >> file | |
12 hg diff file | |
13 | |
14 #$ name: unmodify | |
15 | |
16 hg status | |
17 hg revert file | |
18 cat file | |
19 | |
20 #$ name: status | |
21 | |
22 hg status | |
23 cat file.orig | |
24 | |
25 #$ name: | |
26 | |
27 rm file.orig | |
28 | |
29 #$ name: add | |
30 | |
31 echo oops > oops | |
32 hg add oops | |
33 hg status oops | |
34 hg revert oops | |
35 hg status | |
36 | |
37 #$ name: | |
38 | |
39 rm oops | |
40 | |
41 #$ name: remove | |
42 | |
43 hg remove file | |
44 hg status | |
45 hg revert file | |
46 hg status | |
47 ls file | |
48 | |
49 #$ name: missing | |
50 | |
51 rm file | |
52 hg status | |
53 hg revert file | |
54 ls file | |
55 | |
56 #$ name: copy | |
57 | |
58 hg copy file new-file | |
59 hg revert new-file | |
60 hg status | |
61 | |
62 #$ name: | |
63 | |
64 rm new-file | |
65 | |
66 #$ name: rename | |
67 | |
68 hg rename file new-file | |
69 hg revert new-file | |
70 hg status | |
71 | |
72 #$ name: rename-orig | |
73 | |
74 hg revert file | |
75 hg status |