annotate tests/test-mq @ 3452:fcf14d87e0a4

If we can't write the branch cache, fail quietly.
author Matt Mackall <mpm@selenic.com>
date Wed, 18 Oct 2006 10:46:51 -0500
parents 534806df5b5a
children ba3a96750de0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
1 #!/bin/sh
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
2
2990
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2935
diff changeset
3 echo "[extensions]" >> $HGRCPATH
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2935
diff changeset
4 echo "mq=" >> $HGRCPATH
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
5
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
6 echo % help
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
7 hg help mq
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
8
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
9 hg init a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
10 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
11 echo a > a
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
12 hg ci -Ama
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
13
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
14 hg clone . ../k
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
15
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
16 mkdir b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
17 echo z > b/z
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
18 hg ci -Ama
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
19
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
20 echo % qinit
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
21
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
22 hg qinit
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
23
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
24 cd ..
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
25 hg init b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
26
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
27 echo % -R qinit
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
28
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
29 hg -R b qinit
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
30
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
31 hg init c
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
32
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
33 echo % qinit -c
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
34
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
35 hg --cwd c qinit -c
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
36 hg -R c/.hg/patches st
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
37
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
38 echo % qnew implies add
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
39
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
40 hg -R c qnew test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
41 hg -R c/.hg/patches st
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
42
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
43 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
44
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
45 echo % qnew -m
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
46
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
47 hg qnew -m 'foo bar' test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
48 cat .hg/patches/test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
49
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
50 echo % qrefresh
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
51
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
52 echo a >> a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
53 hg qrefresh
2843
0b9ac7dfcf56 Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents: 2729
diff changeset
54 sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
55 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
56 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
57
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
58 echo % qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
59
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
60 hg qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
61
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
62 echo % qpush
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
63
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
64 hg qpush
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
65
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
66 cd ..
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
67
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
68 echo % pop/push outside repo
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
69
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
70 hg -R a qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
71 hg -R a qpush
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
72
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
73 cd a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
74 hg qnew test2.patch
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
75
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
76 echo % qrefresh in subdir
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
77
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
78 cd b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
79 echo a > a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
80 hg add a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
81 hg qrefresh
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
82
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
83 echo % pop/push -a in subdir
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
84
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
85 hg qpop -a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
86 hg --traceback qpush -a
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
87
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
88 echo % qseries
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
89 hg qseries
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
90
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
91 echo % qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
92 hg qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
93
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
94 echo % qtop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
95 hg qtop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
96
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
97 echo % qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
98 hg qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
99
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
100 echo % qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
101 hg qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
102
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
103 echo % pop, qnext, qprev, qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
104 hg qpop
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
105 hg qnext
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
106 hg qprev
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
107 hg qapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
108
2846
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
109 echo % commit should fail
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
110 hg commit
b8d587cfa3bb mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2843
diff changeset
111
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
112 echo % push should fail
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
113 hg push ../../k
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
114
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
115 echo % qunapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
116 hg qunapplied
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
117
3081
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
118 echo % qpush/qpop with index
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
119 hg qnew test1b.patch
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
120 echo 1b > 1b
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
121 hg add 1b
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
122 hg qrefresh
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
123 hg qpush 2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
124 hg qpop 0
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
125 hg qpush test.patch+1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
126 hg qpush test.patch+2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
127 hg qpop test2.patch-1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
128 hg qpop test2.patch-2
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
129 hg qpush test1b.patch+1
760414dc7ac6 Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3027
diff changeset
130
2848
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
131 echo % push should succeed
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
132 hg qpop -a
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
133 hg push ../../k
307439d6fede mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2846
diff changeset
134
2729
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
135 echo % strip
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
136 cd ../../b
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
137 echo x>x
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
138 hg ci -Ama
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
139 hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/'
8ce86d2c9737 mq: add basic tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
140 hg unbundle .hg/strip-backup/*
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
141
3027
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
142 echo '% cd b; hg qrefresh'
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
143 hg init refresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
144 cd refresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
145 echo a > a
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
146 hg ci -Ama -d'0 0'
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
147 hg qnew -mfoo foo
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
148 echo a >> a
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
149 hg qrefresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
150 mkdir b
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
151 cd b
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
152 echo f > f
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
153 hg add f
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
154 hg qrefresh
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
155 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
156 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
157 echo % hg qrefresh .
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
158 hg qrefresh .
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
159 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
160 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
161 hg status
a4374f7331e4 Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents: 2990
diff changeset
162
3334
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
163 echo % qpush failure
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
164 cd ..
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
165 hg qrefresh
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
166 hg qnew -mbar bar
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
167 echo foo > foo
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
168 hg add foo
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
169 hg qrefresh
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
170 hg qpop -a
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
171 echo bar > foo
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
172 hg qpush -a
534806df5b5a Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents: 3081
diff changeset
173
2990
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2935
diff changeset
174 cat >>$HGRCPATH <<EOF
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
175 [diff]
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
176 git = True
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
177 EOF
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
178 cd ..
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
179 hg init git
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
180 cd git
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
181 hg qinit
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
182
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
183 hg qnew -m'new file' new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
184 echo foo > new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
185 chmod +x new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
186 hg add new
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
187 hg qrefresh
2935
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
188 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
189 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
190
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
191 hg qnew -m'copy file' copy
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
192 hg cp new copy
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
193 hg qrefresh
2935
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
194 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
1c66aad252f9 sed portability fixes
Brendan Cully <brendan@kublai.com>
parents: 2934
diff changeset
195 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy
2934
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
196
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
197 hg qpop
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
198 hg qpush
2f190e998eb3 Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents: 2848
diff changeset
199 hg qdiff