comparison tests/test-mq-qrefresh.out @ 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 f7fc5f5ecd62
children 5f7e3f17aece
comparison
equal deleted inserted replaced
7176:14848fc8e26c 7177:09ed32b79656
157 --- a/2/base 157 --- a/2/base
158 +++ b/2/base 158 +++ b/2/base
159 @@ -1,1 +1,1 @@ 159 @@ -1,1 +1,1 @@
160 -base 160 -base
161 +patched 161 +patched
162 % qrefresh --short 162
163 % qdiff 163 % qrefresh --short tests:
164 % - add 1/base and 2/base one by one
165 % -- qdiff output
164 diff -r b55ecdccb5cf 1/base 166 diff -r b55ecdccb5cf 1/base
165 --- a/1/base 167 --- a/1/base
166 +++ b/1/base 168 +++ b/1/base
167 @@ -1,1 +1,1 @@ 169 @@ -1,1 +1,1 @@
168 -base 170 -base
176 diff -r b55ecdccb5cf orphanchild 178 diff -r b55ecdccb5cf orphanchild
177 --- /dev/null 179 --- /dev/null
178 +++ b/orphanchild 180 +++ b/orphanchild
179 @@ -0,0 +1,1 @@ 181 @@ -0,0 +1,1 @@
180 +orphan 182 +orphan
181 % patch file contents 183 % -- patch file content
182 mqbase 184 mqbase
183 185
184 diff -r b55ecdccb5cf 1/base 186 diff -r b55ecdccb5cf 1/base
185 --- a/1/base 187 --- a/1/base
186 +++ b/1/base 188 +++ b/1/base
187 @@ -1,1 +1,1 @@ 189 @@ -1,1 +1,1 @@
188 -base 190 -base
189 +patched 191 +patched
190 diff -r b55ecdccb5cf 2/base 192 diff -r b55ecdccb5cf 2/base
191 --- a/2/base 193 --- a/2/base
192 +++ b/2/base 194 +++ b/2/base
193 @@ -1,1 +1,1 @@ 195 @@ -1,1 +1,1 @@
194 -base 196 -base
195 +patched 197 +patched
196 % diff shows orphan ...
197 A orphanchild 198 A orphanchild
198 ? base 199 ? base
200 % -- diff shows what is not in patch
199 diff 201 diff
200 --- /dev/null 202 --- /dev/null
201 +++ b/orphanchild 203 +++ b/orphanchild
202 @@ -0,0 +1,1 @@ 204 @@ -0,0 +1,1 @@
203 +orphan 205 +orphan
206 % - before starting exclusive tests
207 1/base
208 2/base
209 % - exclude 2/base
210 1/base
211 % -- status shows 2/base as dirty
212 M 2/base
213 A orphanchild
214 ? base
215 % - remove 1/base and add 2/base again but not orphanchild
216 2/base
217 % - add 1/base with include filter - and thus remove 2/base from patch
218 1/base
219
204 % create test repo 220 % create test repo
205 adding a 221 adding a
206 % capture changes 222 % capture changes
207 diff --git a/a b/ab 223 diff --git a/a b/ab
208 copy from a 224 copy from a