tests/test-locate
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
Mon, 16 Oct 2006 15:38:53 -0300
changeset 3425 ec6f400cff4d
parent 2487 041363739ca8
child 3988 9dcf9d45cab8
permissions -rwxr-xr-x
Use a case-sensitive version of SafeConfigParser everywhere This change has the potential to break existing setups, but the current behaviour (the keys in configuration files are always lower-cased) can bite us in a few places: - no way to use a Command in [defaults] - hgext.Extension doesn't work in [extensions] - you can't use an Upper/case/PATH in the [paths] section of hgweb.config - you can't (easily) protect paths with upper-case letters with the acl extension - you can't specify a /Path/TO/a/rEPO in the [reposubs] section for the notify extension
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1622
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     1
#!/bin/sh
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     2
#
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     3
mkdir t
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     4
cd t
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     5
hg init
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     6
echo 0 > a
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     7
echo 0 > b
2487
041363739ca8 Test case for #294
Brendan Cully <brendan@kublai.com>
parents: 2480
diff changeset
     8
echo 0 > t.h
2480
519a1011db91 fix -I/-X when relative paths used or in subdir
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 1933
diff changeset
     9
mkdir t
519a1011db91 fix -I/-X when relative paths used or in subdir
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 1933
diff changeset
    10
echo 0 > t/x
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1622
diff changeset
    11
hg ci -A -m m -d "1000000 0"
1622
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    12
touch nottracked
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    13
hg locate a
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    14
hg locate NONEXISTENT
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    15
hg locate
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    16
hg rm a
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1622
diff changeset
    17
hg ci -m m -d "1000000 0"
1622
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    18
hg locate a
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    19
hg locate NONEXISTENT
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    20
hg locate
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    21
hg locate -r 0 a
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    22
hg locate -r 0 NONEXISTENT
5e9168401a68 fix locate broken since 63799b01985c
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    23
hg locate -r 0
2480
519a1011db91 fix -I/-X when relative paths used or in subdir
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 1933
diff changeset
    24
echo % -I/-X with relative path should work
519a1011db91 fix -I/-X when relative paths used or in subdir
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 1933
diff changeset
    25
cd t
519a1011db91 fix -I/-X when relative paths used or in subdir
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 1933
diff changeset
    26
hg locate
519a1011db91 fix -I/-X when relative paths used or in subdir
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 1933
diff changeset
    27
hg locate -I ../t
2487
041363739ca8 Test case for #294
Brendan Cully <brendan@kublai.com>
parents: 2480
diff changeset
    28
# test issue294
041363739ca8 Test case for #294
Brendan Cully <brendan@kublai.com>
parents: 2480
diff changeset
    29
cd ..
041363739ca8 Test case for #294
Brendan Cully <brendan@kublai.com>
parents: 2480
diff changeset
    30
rm -rf t
041363739ca8 Test case for #294
Brendan Cully <brendan@kublai.com>
parents: 2480
diff changeset
    31
hg locate t