tests/test-revert
author Thomas Arendsen Hein <thomas@intevation.de>
Mon, 13 Mar 2006 13:05:41 +0100
changeset 1933 7544700fd931
parent 1487 2bc6cd62a29c
child 2029 d436b21b20dc
permissions -rwxr-xr-x
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. Some systems show "Thu Jan 01" instead of "Thu Jan 1", which breaks tests. Using "1000000" yields "Mon Jan 12 13:46:40 1970", which looks the same on all systems.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     3
hg init
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     4
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
     5
echo 123 > c
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     6
hg add a c
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1487
diff changeset
     7
hg commit -m "first" -d "1000000 0" a c
1447
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     8
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
     9
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
    10
hg status
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    11
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
    12
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
    13
hg status
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    14
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
    15
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
    16
hg status
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    17
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
    18
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
    19
hg status
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    20
hg revert 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
    21
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
    22
hg status
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    23
hg revert 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
    24
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
    25
hg status
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    26
hg revert 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
    27
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
    28
hg status
1487
2bc6cd62a29c fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1449
diff changeset
    29
echo %% should show a b and c
1447
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    30
ls
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    31
508a3f559553 revert added and removed files to their normal state before reverting
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    32
true