author | John Mulligan <phlogistonjohn@asynchrono.us> |
Sat, 15 Mar 2008 15:23:20 -0400 | |
changeset 6311 | a079cf630065 |
parent 6110 | 81e20e01d465 |
permissions | -rwxr-xr-x |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
1 |
#!/bin/sh |
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
2 |
|
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
3 |
hg init repo |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
4 |
cd repo |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
5 |
echo 123 > a |
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
6 |
echo 123 > c |
2029
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
7 |
echo 123 > e |
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
8 |
hg add a c e |
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
9 |
hg commit -m "first" -d "1000000 0" a c e |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
10 |
echo 123 > b |
1487
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1449
diff
changeset
|
11 |
echo %% should show b unknown |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
12 |
hg status |
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
13 |
echo 12 > c |
1487
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1449
diff
changeset
|
14 |
echo %% should show b unknown and c modified |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
15 |
hg status |
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
16 |
hg add b |
1487
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1449
diff
changeset
|
17 |
echo %% should show b added and c modified |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
18 |
hg status |
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
19 |
hg rm a |
1487
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1449
diff
changeset
|
20 |
echo %% should show a removed, b added and c modified |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
21 |
hg status |
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
22 |
hg revert a |
2029
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
23 |
echo %% should show b added, copy saved, and c modified |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
24 |
hg status |
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
25 |
hg revert b |
2043
968f036f93a4
Minor fix for revert: No need to make a backup when forgetting added files.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2042
diff
changeset
|
26 |
echo %% should show b unknown, and c modified |
2029
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
27 |
hg status |
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
28 |
hg revert --no-backup c |
2043
968f036f93a4
Minor fix for revert: No need to make a backup when forgetting added files.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2042
diff
changeset
|
29 |
echo %% should show unknown: b |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
30 |
hg status |
6109
242595e612ed
revert: unify forget and remove lists
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
6031
diff
changeset
|
31 |
hg add b |
242595e612ed
revert: unify forget and remove lists
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
6031
diff
changeset
|
32 |
echo %% should show b added |
242595e612ed
revert: unify forget and remove lists
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
6031
diff
changeset
|
33 |
hg status b |
242595e612ed
revert: unify forget and remove lists
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
6031
diff
changeset
|
34 |
rm b |
6110
81e20e01d465
status: put added files that have disappeared in the deleted list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
6109
diff
changeset
|
35 |
echo %% should show b deleted |
6109
242595e612ed
revert: unify forget and remove lists
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
6031
diff
changeset
|
36 |
hg status b |
242595e612ed
revert: unify forget and remove lists
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
6031
diff
changeset
|
37 |
hg revert -v b |
242595e612ed
revert: unify forget and remove lists
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
6031
diff
changeset
|
38 |
echo %% should not find b |
242595e612ed
revert: unify forget and remove lists
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
6031
diff
changeset
|
39 |
hg status b |
242595e612ed
revert: unify forget and remove lists
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
6031
diff
changeset
|
40 |
echo %% should show a c e |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
41 |
ls |
2036
c9226bcc288d
Don't abort when backup files already exist. Don't allow alternative names.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2029
diff
changeset
|
42 |
echo %% should verbosely save backup to e.orig |
2029
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
43 |
echo z > e |
2982
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
44 |
hg revert --all -v |
2029
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
45 |
echo %% should say no changes needed |
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
46 |
hg revert a |
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
47 |
echo %% should say file not managed |
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
48 |
echo q > q |
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
49 |
hg revert q |
2042
a514c7509fa9
small changes to revert command.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2036
diff
changeset
|
50 |
rm q |
2029
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
51 |
echo %% should say file not found |
d436b21b20dc
rewrite revert command. fix issues 93, 123, 147.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
1933
diff
changeset
|
52 |
hg revert notfound |
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
53 |
touch d |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
54 |
hg add d |
2042
a514c7509fa9
small changes to revert command.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2036
diff
changeset
|
55 |
hg rm a |
a514c7509fa9
small changes to revert command.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2036
diff
changeset
|
56 |
hg commit -m "second" -d "1000000 0" |
a514c7509fa9
small changes to revert command.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2036
diff
changeset
|
57 |
echo z > z |
a514c7509fa9
small changes to revert command.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2036
diff
changeset
|
58 |
hg add z |
a514c7509fa9
small changes to revert command.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2036
diff
changeset
|
59 |
hg st |
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
60 |
echo %% should add a, remove d, forget z |
2982
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
61 |
hg revert --all -r0 |
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
62 |
echo %% should forget a, undelete d |
2982
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
63 |
hg revert --all -rtip |
3988
9dcf9d45cab8
Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3019
diff
changeset
|
64 |
rm a *.orig |
2042
a514c7509fa9
small changes to revert command.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2036
diff
changeset
|
65 |
echo %% should silently add a |
a514c7509fa9
small changes to revert command.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2036
diff
changeset
|
66 |
hg revert -r0 a |
a514c7509fa9
small changes to revert command.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2036
diff
changeset
|
67 |
hg st a |
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
68 |
hg rm d |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
69 |
hg st d |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
70 |
echo %% should silently keep d removed |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
71 |
hg revert -r0 d |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
72 |
hg st d |
1447
508a3f559553
revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff
changeset
|
73 |
|
2157
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
74 |
hg update -C |
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
75 |
chmod +x c |
2982
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
76 |
hg revert --all |
2157
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
77 |
echo %% should print non-executable |
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
78 |
test -x c || echo non-executable |
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
79 |
|
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
80 |
chmod +x c |
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
81 |
hg commit -d '1000001 0' -m exe |
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
82 |
|
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
83 |
chmod -x c |
2982
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
84 |
hg revert --all |
2157
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
85 |
echo %% should print executable |
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
86 |
test -x c && echo executable |
1e82f2337498
make test-revert check executable bit.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2043
diff
changeset
|
87 |
|
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
88 |
cd .. |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
89 |
|
2272
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
90 |
echo %% issue 241 |
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
91 |
hg init a |
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
92 |
cd a |
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
93 |
echo a >> a |
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
94 |
hg commit -A -d '1 0' -m a |
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
95 |
echo a >> a |
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
96 |
hg commit -d '2 0' -m a |
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
97 |
hg update 0 |
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
98 |
mkdir b |
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
99 |
echo b > b/b |
2982
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
100 |
|
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
101 |
echo % should fail - no arguments |
2272
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
102 |
hg revert -rtip |
e9a0ed9ed4d9
revert: fix corner case found by faheem mitha.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2157
diff
changeset
|
103 |
|
2982
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
104 |
echo % should succeed |
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
105 |
hg revert --all -rtip |
890e285c52a1
revert: require --all to revert all files.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2272
diff
changeset
|
106 |
|
3019
aebc3f64b20f
fix incorrect warning when walking on a particular rev
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
2982
diff
changeset
|
107 |
echo %% issue332 |
aebc3f64b20f
fix incorrect warning when walking on a particular rev
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
2982
diff
changeset
|
108 |
hg ci -A -m b -d '1000001 0' |
aebc3f64b20f
fix incorrect warning when walking on a particular rev
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
2982
diff
changeset
|
109 |
echo foobar > b/b |
4225
281f9f8f1bd4
Fix confusing message from hg revert (issue332)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
110 |
mkdir newdir |
281f9f8f1bd4
Fix confusing message from hg revert (issue332)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
111 |
echo foo > newdir/newfile |
281f9f8f1bd4
Fix confusing message from hg revert (issue332)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
112 |
hg add newdir/newfile |
281f9f8f1bd4
Fix confusing message from hg revert (issue332)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
113 |
hg revert b newdir |
4233
03a665f9f913
util._matcher: use "." as the root of empty {rel,}path patterns
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
114 |
echo foobar > b/b |
03a665f9f913
util._matcher: use "." as the root of empty {rel,}path patterns
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3988
diff
changeset
|
115 |
hg revert . |
5230
bfd73b567b3d
When reverting a file which was renamed, also revert the old name
Brendan Cully <brendan@kublai.com>
parents:
4237
diff
changeset
|
116 |
|
bfd73b567b3d
When reverting a file which was renamed, also revert the old name
Brendan Cully <brendan@kublai.com>
parents:
4237
diff
changeset
|
117 |
echo % reverting a rename target should revert the source |
bfd73b567b3d
When reverting a file which was renamed, also revert the old name
Brendan Cully <brendan@kublai.com>
parents:
4237
diff
changeset
|
118 |
hg mv a newa |
bfd73b567b3d
When reverting a file which was renamed, also revert the old name
Brendan Cully <brendan@kublai.com>
parents:
4237
diff
changeset
|
119 |
hg revert newa |
bfd73b567b3d
When reverting a file which was renamed, also revert the old name
Brendan Cully <brendan@kublai.com>
parents:
4237
diff
changeset
|
120 |
hg st a newa |
bfd73b567b3d
When reverting a file which was renamed, also revert the old name
Brendan Cully <brendan@kublai.com>
parents:
4237
diff
changeset
|
121 |
|
6031
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
122 |
cd .. |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
123 |
|
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
124 |
hg init ignored |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
125 |
cd ignored |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
126 |
echo '^ignored$' > .hgignore |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
127 |
echo '^ignoreddir$' >> .hgignore |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
128 |
echo '^removed$' >> .hgignore |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
129 |
|
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
130 |
mkdir ignoreddir |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
131 |
touch ignoreddir/file |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
132 |
touch ignoreddir/removed |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
133 |
touch ignored |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
134 |
touch removed |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
135 |
echo '%% 4 ignored files (we will add/commit everything)' |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
136 |
hg st -A -X .hgignore |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
137 |
hg ci -qAm 'add files' ignored ignoreddir/file ignoreddir/removed removed |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
138 |
|
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
139 |
echo >> ignored |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
140 |
echo >> ignoreddir/file |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
141 |
hg rm removed ignoreddir/removed |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
142 |
echo '%% should revert ignored* and undelete *removed' |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
143 |
hg revert -a --no-backup |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
144 |
hg st -mardi |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
145 |
|
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
146 |
hg up -qC |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
147 |
echo >> ignored |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
148 |
hg rm removed |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
149 |
echo %% should silently revert the named files |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
150 |
hg revert --no-backup ignored removed |
7383384793fb
revert: don't assume ignored files will be returned in the unknown list
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5230
diff
changeset
|
151 |
hg st -mardi |