##// END OF EJS Templates
patchbomb: respect the `--git` option...
Matt Harbison -
r51141:a6b49787 stable
parent child Browse files
Show More
@@ -361,7 +361,12 b' def _getpatches(repo, revs, **opts):'
361 ui.warn(_(b'warning: working directory has uncommitted changes\n'))
361 ui.warn(_(b'warning: working directory has uncommitted changes\n'))
362 output = stringio()
362 output = stringio()
363 cmdutil.exportfile(
363 cmdutil.exportfile(
364 repo, [r], output, opts=patch.difffeatureopts(ui, opts, git=True)
364 repo,
365 [r],
366 output,
367 opts=patch.difffeatureopts(
368 ui, pycompat.byteskwargs(opts), git=True
369 ),
365 )
370 )
366 yield output.getvalue().split(b'\n')
371 yield output.getvalue().split(b'\n')
367
372
@@ -183,6 +183,43 b' Test diff.git is respected'
183 +a
183 +a
184
184
185
185
186 Test --git is respected
187 $ hg email --git --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
188 this patch series consists of 1 patches.
189
190
191 displaying [PATCH] a ...
192 MIME-Version: 1.0
193 Content-Type: text/plain; charset="us-ascii"
194 Content-Transfer-Encoding: 7bit
195 Subject: [PATCH] a
196 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
197 X-Mercurial-Series-Index: 1
198 X-Mercurial-Series-Total: 1
199 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
200 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
201 User-Agent: Mercurial-patchbomb/* (glob)
202 Date: Thu, 01 Jan 1970 00:01:00 +0000
203 From: quux
204 To: foo
205 Cc: bar
206
207 # HG changeset patch
208 # User test
209 # Date 1 0
210 # Thu Jan 01 00:00:01 1970 +0000
211 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
212 # Parent 0000000000000000000000000000000000000000
213 a
214
215 diff --git a/a b/a
216 new file mode 100644
217 --- /dev/null
218 +++ b/a
219 @@ -0,0 +1,1 @@
220 +a
221
222
186
223
187 Test breaking format changes aren't
224 Test breaking format changes aren't
188 $ hg --config diff.noprefix=True email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
225 $ hg --config diff.noprefix=True email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
General Comments 0
You need to be logged in to leave comments. Login now