author | Martin Geisler <mg@lazybytes.net> |
Fri, 22 Jan 2010 17:15:58 +0100 | |
changeset 10276 | 6109a02c682b |
parent 10190 | 9c2c94934f0d |
child 10282 | 08a0f04b56bd |
permissions | -rwxr-xr-x |
10190
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/sh |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 |
|
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
3 |
# Test the plumbing of mq.git option |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
4 |
# Automatic upgrade itself is tested elsewhere. |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
5 |
|
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
6 |
echo "[extensions]" >> $HGRCPATH |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
7 |
echo "mq=" >> $HGRCPATH |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
8 |
echo "[diff]" >> $HGRCPATH |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 |
echo "nodates=1" >> $HGRCPATH |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 |
|
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 |
hg init repo-auto |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
12 |
cd repo-auto |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
13 |
echo '% git=auto: regular patch creation' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
14 |
echo a > a |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
15 |
hg add a |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
16 |
hg qnew -d '0 0' -f adda |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
17 |
cat .hg/patches/adda |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
18 |
echo '% git=auto: git patch creation with copy' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
19 |
hg cp a b |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
20 |
hg qnew -d '0 0' -f copy |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
21 |
cat .hg/patches/copy |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
22 |
echo '% git=auto: git patch when using --git' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
23 |
echo regular > regular |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
24 |
hg add regular |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 |
hg qnew -d '0 0' --git -f git |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
26 |
cat .hg/patches/git |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
27 |
echo '% git=auto: regular patch after qrefresh without --git' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
28 |
hg qrefresh -d '0 0' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
29 |
cat .hg/patches/git |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
30 |
cd .. |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
31 |
|
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
32 |
hg init repo-keep |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
33 |
cd repo-keep |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
34 |
echo '[mq]' > .hg/hgrc |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
35 |
echo 'git = KEEP' >> .hg/hgrc |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
36 |
echo '% git=keep: git patch with --git' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
37 |
echo a > a |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
38 |
hg add a |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
39 |
hg qnew -d '0 0' -f --git git |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
40 |
cat .hg/patches/git |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
41 |
echo '% git=keep: git patch after qrefresh without --git' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
42 |
echo a >> a |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
43 |
hg qrefresh -d '0 0' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
44 |
cat .hg/patches/git |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
45 |
cd .. |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
46 |
|
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
47 |
hg init repo-yes |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
48 |
cd repo-yes |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
49 |
echo '[mq]' > .hg/hgrc |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
50 |
echo 'git = yes' >> .hg/hgrc |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
51 |
echo '% git=yes: git patch' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
52 |
echo a > a |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
53 |
hg add a |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
54 |
hg qnew -d '0 0' -f git |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
55 |
cat .hg/patches/git |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
56 |
echo '% git=yes: git patch after qrefresh' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
57 |
echo a >> a |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
58 |
hg qrefresh -d '0 0' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
59 |
cat .hg/patches/git |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
60 |
cd .. |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
61 |
|
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
62 |
hg init repo-no |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
63 |
cd repo-no |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
64 |
echo '[diff]' > .hg/hgrc |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
65 |
echo 'git = True' >> .hg/hgrc |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
66 |
echo '[mq]' > .hg/hgrc |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
67 |
echo 'git = False' >> .hg/hgrc |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
68 |
echo '% git=no: regular patch with copy' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
69 |
echo a > a |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
70 |
hg add a |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
71 |
hg qnew -d '0 0' -f adda |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
72 |
hg cp a b |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
73 |
hg qnew -d '0 0' -f regular |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
74 |
cat .hg/patches/regular |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
75 |
echo '% git=no: regular patch after qrefresh with copy' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
76 |
hg cp a c |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
77 |
hg qrefresh -d '0 0' |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
78 |
cat .hg/patches/regular |
9c2c94934f0d
mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
79 |
cd .. |