tests/test-hardlinks-safety
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
Wed, 20 Aug 2008 10:30:53 +0200
changeset 6915 ef14c773b3d6
parent 6869 b49e01863202
child 6920 7e5e13bee8f4
permissions -rwxr-xr-x
mq: fix docs for qrefresh -D (issue1234)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6835
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     1
#!/bin/sh
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     2
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     3
# test mq hardlinking
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     4
echo "[extensions]" >> $HGRCPATH
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     5
echo "mq=" >> $HGRCPATH
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     6
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     7
echo % init
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     8
hg init a
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     9
cd a
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    10
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    11
hg qimport -n foo - << EOF
6869
b49e01863202 Make test-hardlinks-safety repeatable and executable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6835
diff changeset
    12
# HG changeset patch
b49e01863202 Make test-hardlinks-safety repeatable and executable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6835
diff changeset
    13
# Date 1 0
6835
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    14
diff -r 2588a8b53d66 a
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    15
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    16
+++ b/a	Wed Jul 23 15:54:29 2008 +0200
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    17
@@ -0,0 +1,1 @@
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    18
+a
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    19
EOF
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    20
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    21
hg qpush
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    22
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    23
cd ..
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    24
cp -al a b
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    25
cd b
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    26
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    27
hg qimport -n bar - << EOF
6869
b49e01863202 Make test-hardlinks-safety repeatable and executable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6835
diff changeset
    28
# HG changeset patch
b49e01863202 Make test-hardlinks-safety repeatable and executable
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6835
diff changeset
    29
# Date 2 0
6835
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    30
diff -r 2588a8b53d66 a
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    31
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    32
+++ b/b	Wed Jul 23 15:54:29 2008 +0200
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    33
@@ -0,0 +1,1 @@
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    34
+b
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    35
EOF
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    36
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    37
hg qpush
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    38
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    39
cat .hg/patches/status
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    40
echo %
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    41
cat .hg/patches/series
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    42
echo %%%
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    43
cat ../a/.hg/patches/status
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    44
echo %
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    45
cat ../a/.hg/patches/series
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    46
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    47
# test tags hardlinking
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    48
hg qdel -r qbase:qtip
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    49
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    50
hg tag -l lfoo
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    51
hg tag foo
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    52
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    53
cd ..
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    54
cp -al b c
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    55
cd c
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    56
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    57
hg tag -l -r 0 lbar
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    58
hg tag -r 0 bar
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    59
echo %%%
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    60
cat .hgtags
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    61
echo %
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    62
cat .hg/localtags
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    63
echo %%%
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    64
cat ../b/.hgtags
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    65
echo %
08d9e0f974d9 make mq and tags hardlink safe
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    66
cat ../b/.hg/localtags