annotate tests/test-mq-symlinks @ 9784:54d292da1df7

hgrc.5: do not mention "name: value" syntax This was supported in versions prior to 1.3 where we used the standard Python ConfigParser. The new config parser never supported it.
author Martin Geisler <mg@lazybytes.net>
date Sat, 07 Nov 2009 18:47:04 +0100
parents d08099e74b81
children 8cb81d75730c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5157
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
1 #!/bin/sh
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
2
6360
95413879bac9 test-mq-symlinks: skip if symlinks are not supported
Patrick Mezard <pmezard@gmail.com>
parents: 5683
diff changeset
3 "$TESTDIR/hghave" symlink || exit 80
95413879bac9 test-mq-symlinks: skip if symlinks are not supported
Patrick Mezard <pmezard@gmail.com>
parents: 5683
diff changeset
4
5157
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
5 echo "[extensions]" >> $HGRCPATH
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
6 echo "mq=" >> $HGRCPATH
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
7
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
8 hg init
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
9 hg qinit
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
10 hg qnew base.patch
9585
ea1935e2020a patch: handle symlinks without symlinkhunk
Patrick Mezard <pmezard@gmail.com>
parents: 7517
diff changeset
11 echo aaa > a
ea1935e2020a patch: handle symlinks without symlinkhunk
Patrick Mezard <pmezard@gmail.com>
parents: 7517
diff changeset
12 echo bbb > b
9586
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
13 echo ccc > c
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
14 hg add a b c
5157
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
15 hg qrefresh
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5157
diff changeset
16 $TESTDIR/readlink.py a
5157
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
17
9585
ea1935e2020a patch: handle symlinks without symlinkhunk
Patrick Mezard <pmezard@gmail.com>
parents: 7517
diff changeset
18 echo '% test replacing a file with a symlink'
5157
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
19 hg qnew symlink.patch
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
20 rm a
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
21 ln -s b a
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
22 hg qrefresh --git
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5157
diff changeset
23 $TESTDIR/readlink.py a
5157
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
24
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
25 hg qpop
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
26 hg qpush
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5157
diff changeset
27 $TESTDIR/readlink.py a
7517
49f34b43cf90 patch: handle git patches that remove symlinks (issue1438)
Brendan Cully <brendan@kublai.com>
parents: 6360
diff changeset
28
9586
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
29 echo '% test updating a symlink'
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
30 rm a
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
31 ln -s c a
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
32 hg qnew --git -f updatelink
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
33 $TESTDIR/readlink.py a
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
34 hg qpop
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
35 hg qpush --debug
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
36 $TESTDIR/readlink.py a
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
37 hg st
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
38
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
39 echo '% test replacing a symlink with a file'
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
40 ln -s c s
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
41 hg add s
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
42 hg qnew --git -f addlink
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
43 rm s
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
44 echo sss > s
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
45 hg qnew --git -f replacelinkwithfile
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
46 hg qpop
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
47 hg qpush
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
48 cat s
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
49 hg st
d08099e74b81 patch: handle symlink updates/replacements (issue1785)
Patrick Mezard <pmezard@gmail.com>
parents: 9585
diff changeset
50
9585
ea1935e2020a patch: handle symlinks without symlinkhunk
Patrick Mezard <pmezard@gmail.com>
parents: 7517
diff changeset
51 echo '% test symlink removal'
7517
49f34b43cf90 patch: handle git patches that remove symlinks (issue1438)
Brendan Cully <brendan@kublai.com>
parents: 6360
diff changeset
52 hg qnew removesl.patch
49f34b43cf90 patch: handle git patches that remove symlinks (issue1438)
Brendan Cully <brendan@kublai.com>
parents: 6360
diff changeset
53 hg rm a
49f34b43cf90 patch: handle git patches that remove symlinks (issue1438)
Brendan Cully <brendan@kublai.com>
parents: 6360
diff changeset
54 hg qrefresh --git
49f34b43cf90 patch: handle git patches that remove symlinks (issue1438)
Brendan Cully <brendan@kublai.com>
parents: 6360
diff changeset
55 hg qpop
49f34b43cf90 patch: handle git patches that remove symlinks (issue1438)
Brendan Cully <brendan@kublai.com>
parents: 6360
diff changeset
56 hg qpush
49f34b43cf90 patch: handle git patches that remove symlinks (issue1438)
Brendan Cully <brendan@kublai.com>
parents: 6360
diff changeset
57 hg st -c