annotate tests/test-mq-symlinks @ 7177:09ed32b79656

mq: Fix --qrefresh --short to work with --exclude and --include pmezard expects hg qref -s -X b to apply the -X to the list of files in the patch, and thus remove b from the patch. That's how it worked before f7fc5f5ecd62. That change seemed sensible, but it wasn't... mpm says (17:22:30) pmezard_: kiilerix1: do you mean that -X should be forbidden with -s ? (17:22:54) pmezard_: kiilerix1: and --include too (17:23:03) mpm: No because you should be able to say hg qref -s foo* -X foo-bar so mpm expects hg qref -s -X b * to apply the -X to the list of files in the working directory, and thus don't include b in the patch This patch tries to make both usecases work by creating a matchfn which uses the include/excludes but not the filelist.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 19 Oct 2008 16:31:24 +0200
parents 95413879bac9
children 49f34b43cf90
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
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
11 echo a > a
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
12 echo b > b
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
13 hg add a b
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
14 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
15 $TESTDIR/readlink.py a
5157
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
16
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
17 hg qnew symlink.patch
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
18 rm a
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
19 ln -s b a
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
20 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
21 $TESTDIR/readlink.py a
5157
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
22
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
23 hg qpop
f6c520fd70cf mq: teach qpop about symlinks
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
24 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
25 $TESTDIR/readlink.py a