Mercurial > hg
comparison hgext/patchbomb.py @ 31184:e3ab7c717129
patchbomb: drop internal option for pbranch extension (API)
I want to move _getpatches() to _getpatchmsgs() to make sure each patch text
is tied with the corresponding revision number. This helps adding templater
support.
IIRC, the pbranch extension doesn't work with the recent Mercurial versions,
so the removal of this option wouldn't hurt.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 25 Feb 2017 18:25:17 +0900 |
parents | 8018b90f8307 |
children | bbb5d2aa0bf0 |
comparison
equal
deleted
inserted
replaced
31183:8018b90f8307 | 31184:e3ab7c717129 |
---|---|
512 bundle = opts.get('bundle') | 512 bundle = opts.get('bundle') |
513 date = opts.get('date') | 513 date = opts.get('date') |
514 mbox = opts.get('mbox') | 514 mbox = opts.get('mbox') |
515 outgoing = opts.get('outgoing') | 515 outgoing = opts.get('outgoing') |
516 rev = opts.get('rev') | 516 rev = opts.get('rev') |
517 # internal option used by pbranches | |
518 patches = opts.get('patches') | |
519 | 517 |
520 if not (opts.get('test') or mbox): | 518 if not (opts.get('test') or mbox): |
521 # really sending | 519 # really sending |
522 mail.validateconfig(ui) | 520 mail.validateconfig(ui) |
523 | 521 |
524 if not (revs or rev or outgoing or bundle or patches): | 522 if not (revs or rev or outgoing or bundle): |
525 raise error.Abort(_('specify at least one changeset with -r or -o')) | 523 raise error.Abort(_('specify at least one changeset with -r or -o')) |
526 | 524 |
527 if outgoing and bundle: | 525 if outgoing and bundle: |
528 raise error.Abort(_("--outgoing mode always on with --bundle;" | 526 raise error.Abort(_("--outgoing mode always on with --bundle;" |
529 " do not re-specify --outgoing")) | 527 " do not re-specify --outgoing")) |
591 # deprecated config: patchbomb.from | 589 # deprecated config: patchbomb.from |
592 sender = (opts.get('from') or ui.config('email', 'from') or | 590 sender = (opts.get('from') or ui.config('email', 'from') or |
593 ui.config('patchbomb', 'from') or | 591 ui.config('patchbomb', 'from') or |
594 prompt(ui, 'From', ui.username())) | 592 prompt(ui, 'From', ui.username())) |
595 | 593 |
596 if patches: | 594 if bundle: |
597 msgs = _getpatchmsgs(repo, sender, patches, opts.get('patchnames'), | |
598 **opts) | |
599 elif bundle: | |
600 bundledata = _getbundle(repo, dest, **opts) | 595 bundledata = _getbundle(repo, dest, **opts) |
601 bundleopts = opts.copy() | 596 bundleopts = opts.copy() |
602 bundleopts.pop('bundle', None) # already processed | 597 bundleopts.pop('bundle', None) # already processed |
603 msgs = _getbundlemsgs(repo, sender, bundledata, **bundleopts) | 598 msgs = _getbundlemsgs(repo, sender, bundledata, **bundleopts) |
604 else: | 599 else: |