Mercurial > hg
comparison tests/test-patchbomb.t @ 31187:6b8e1a08ef1d
patchbomb: add config knob to generate flags by template (issue5354)
This can be used to flag patches by branch or topic automatically. Flags
optionally given by --flag option are exported as {flags} template keyword,
so you can add --flag V2.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 25 Feb 2017 18:41:00 +0900 |
parents | 6b0741d6d234 |
children | 5b2e1689b24d |
comparison
equal
deleted
inserted
replaced
31186:83fa357edbd5 | 31187:6b8e1a08ef1d |
---|---|
2367 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | 2367 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
2368 +++ b/a Thu Jan 01 00:00:01 1970 +0000 | 2368 +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
2369 @@ -0,0 +1,1 @@ | 2369 @@ -0,0 +1,1 @@ |
2370 +a | 2370 +a |
2371 | 2371 |
2372 | |
2373 | |
2374 test flag template: | |
2375 $ echo foo > intro.text | |
2376 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -r 0:1 \ | |
2377 > --desc intro.text --subject test \ | |
2378 > --config patchbomb.flagtemplate='R{rev}' | |
2379 this patch series consists of 2 patches. | |
2380 | |
2381 Cc: | |
2382 | |
2383 displaying [PATCH 0 of 2 R1] test ... | |
2384 Content-Type: text/plain; charset="us-ascii" | |
2385 MIME-Version: 1.0 | |
2386 Content-Transfer-Encoding: 7bit | |
2387 Subject: [PATCH 0 of 2 R1] test | |
2388 Message-Id: <patchbomb.60@*> (glob) | |
2389 User-Agent: Mercurial-patchbomb/* (glob) | |
2390 Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
2391 From: quux | |
2392 To: foo | |
2393 | |
2394 foo | |
2395 | |
2396 displaying [PATCH 1 of 2 R0] a ... | |
2397 Content-Type: text/plain; charset="us-ascii" | |
2398 MIME-Version: 1.0 | |
2399 Content-Transfer-Encoding: 7bit | |
2400 Subject: [PATCH 1 of 2 R0] a | |
2401 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2402 X-Mercurial-Series-Index: 1 | |
2403 X-Mercurial-Series-Total: 2 | |
2404 Message-Id: <8580ff50825a50c8f716.61@*> (glob) | |
2405 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@*> (glob) | |
2406 In-Reply-To: <patchbomb.60@*> (glob) | |
2407 References: <patchbomb.60@*> (glob) | |
2408 User-Agent: Mercurial-patchbomb/* (glob) | |
2409 Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
2410 From: quux | |
2411 To: foo | |
2412 | |
2413 # HG changeset patch | |
2414 # User test | |
2415 # Date 1 0 | |
2416 # Thu Jan 01 00:00:01 1970 +0000 | |
2417 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2418 # Parent 0000000000000000000000000000000000000000 | |
2419 a | |
2420 | |
2421 diff -r 000000000000 -r 8580ff50825a a | |
2422 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2423 +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
2424 @@ -0,0 +1,1 @@ | |
2425 +a | |
2426 | |
2427 displaying [PATCH 2 of 2 R1] b ... | |
2428 Content-Type: text/plain; charset="us-ascii" | |
2429 MIME-Version: 1.0 | |
2430 Content-Transfer-Encoding: 7bit | |
2431 Subject: [PATCH 2 of 2 R1] b | |
2432 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2433 X-Mercurial-Series-Index: 2 | |
2434 X-Mercurial-Series-Total: 2 | |
2435 Message-Id: <97d72e5f12c7e84f8506.62@*> (glob) | |
2436 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@*> (glob) | |
2437 In-Reply-To: <patchbomb.60@*> (glob) | |
2438 References: <patchbomb.60@*> (glob) | |
2439 User-Agent: Mercurial-patchbomb/* (glob) | |
2440 Date: Thu, 01 Jan 1970 00:01:02 +0000 | |
2441 From: quux | |
2442 To: foo | |
2443 | |
2444 # HG changeset patch | |
2445 # User test | |
2446 # Date 2 0 | |
2447 # Thu Jan 01 00:00:02 1970 +0000 | |
2448 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2449 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2450 b | |
2451 | |
2452 diff -r 8580ff50825a -r 97d72e5f12c7 b | |
2453 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2454 +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
2455 @@ -0,0 +1,1 @@ | |
2456 +b | |
2457 | |
2458 | |
2459 test flag template plus --flag: | |
2460 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -r 0 --flag 'V2' \ | |
2461 > --config patchbomb.flagtemplate='{branch} {flags}' | |
2462 this patch series consists of 1 patches. | |
2463 | |
2464 Cc: | |
2465 | |
2466 displaying [PATCH default V2] a ... | |
2467 Content-Type: text/plain; charset="us-ascii" | |
2468 MIME-Version: 1.0 | |
2469 Content-Transfer-Encoding: 7bit | |
2470 Subject: [PATCH default V2] a | |
2471 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2472 X-Mercurial-Series-Index: 1 | |
2473 X-Mercurial-Series-Total: 1 | |
2474 Message-Id: <8580ff50825a50c8f716.60@*> (glob) | |
2475 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@*> (glob) | |
2476 User-Agent: Mercurial-patchbomb/* (glob) | |
2477 Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
2478 From: quux | |
2479 To: foo | |
2480 | |
2481 # HG changeset patch | |
2482 # User test | |
2483 # Date 1 0 | |
2484 # Thu Jan 01 00:00:01 1970 +0000 | |
2485 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2486 # Parent 0000000000000000000000000000000000000000 | |
2487 a | |
2488 | |
2489 diff -r 000000000000 -r 8580ff50825a a | |
2490 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2491 +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
2492 @@ -0,0 +1,1 @@ | |
2493 +a | |
2372 | 2494 |
2373 | 2495 |
2374 test multi-byte domain parsing: | 2496 test multi-byte domain parsing: |
2375 $ UUML=`$PYTHON -c 'import sys; sys.stdout.write("\374")'` | 2497 $ UUML=`$PYTHON -c 'import sys; sys.stdout.write("\374")'` |
2376 $ HGENCODING=iso-8859-1 | 2498 $ HGENCODING=iso-8859-1 |