comparison hgext/transplant.py @ 10282:08a0f04b56bd

many, many trivial check-code fixups
author Matt Mackall <mpm@selenic.com>
date Mon, 25 Jan 2010 00:05:27 -0600
parents d6512b3e9ac0
children 4612cded5176
comparison
equal deleted inserted replaced
10281:e7d3b509af8b 10282:08a0f04b56bd
487 487
488 return (source, incoming, bundle) 488 return (source, incoming, bundle)
489 489
490 def incwalk(repo, incoming, branches, match=util.always): 490 def incwalk(repo, incoming, branches, match=util.always):
491 if not branches: 491 if not branches:
492 branches=None 492 branches = None
493 for node in repo.changelog.nodesbetween(incoming, branches)[0]: 493 for node in repo.changelog.nodesbetween(incoming, branches)[0]:
494 if match(node): 494 if match(node):
495 yield node 495 yield node
496 496
497 def transplantwalk(repo, root, branches, match=util.always): 497 def transplantwalk(repo, root, branches, match=util.always):
504 if match(node): 504 if match(node):
505 yield node 505 yield node
506 506
507 def checkopts(opts, revs): 507 def checkopts(opts, revs):
508 if opts.get('continue'): 508 if opts.get('continue'):
509 if filter(lambda opt: opts.get(opt), ('branch', 'all', 'merge')): 509 if opts.get('branch') or opts.get('all') or opts.get('merge'):
510 raise util.Abort(_('--continue is incompatible with ' 510 raise util.Abort(_('--continue is incompatible with '
511 'branch, all or merge')) 511 'branch, all or merge'))
512 return 512 return
513 if not (opts.get('source') or revs or 513 if not (opts.get('source') or revs or
514 opts.get('merge') or opts.get('branch')): 514 opts.get('merge') or opts.get('branch')):