##// END OF EJS Templates
py3: handle keyword arguments in hgext/rebase.py...
Pulkit Goyal -
r35003:1a07f918 default
parent child Browse files
Show More
@@ -43,6 +43,7 b' from mercurial import ('
43 43 obsutil,
44 44 patch,
45 45 phases,
46 pycompat,
46 47 registrar,
47 48 repair,
48 49 revset,
@@ -698,6 +699,7 b' def rebase(ui, repo, **opts):'
698 699 unresolved conflicts.
699 700
700 701 """
702 opts = pycompat.byteskwargs(opts)
701 703 rbsrt = rebaseruntime(repo, ui, opts)
702 704
703 705 with repo.wlock(), repo.lock():
@@ -1552,15 +1554,15 b' def clearrebased(ui, repo, destmap, stat'
1552 1554 def pullrebase(orig, ui, repo, *args, **opts):
1553 1555 'Call rebase after pull if the latter has been invoked with --rebase'
1554 1556 ret = None
1555 if opts.get('rebase'):
1557 if opts.get(r'rebase'):
1556 1558 if ui.configbool('commands', 'rebase.requiredest'):
1557 1559 msg = _('rebase destination required by configuration')
1558 1560 hint = _('use hg pull followed by hg rebase -d DEST')
1559 1561 raise error.Abort(msg, hint=hint)
1560 1562
1561 1563 with repo.wlock(), repo.lock():
1562 if opts.get('update'):
1563 del opts['update']
1564 if opts.get(r'update'):
1565 del opts[r'update']
1564 1566 ui.debug('--update and --rebase are not compatible, ignoring '
1565 1567 'the update flag\n')
1566 1568
@@ -1581,15 +1583,15 b' def pullrebase(orig, ui, repo, *args, **'
1581 1583 if revspostpull > revsprepull:
1582 1584 # --rev option from pull conflict with rebase own --rev
1583 1585 # dropping it
1584 if 'rev' in opts:
1585 del opts['rev']
1586 if r'rev' in opts:
1587 del opts[r'rev']
1586 1588 # positional argument from pull conflicts with rebase's own
1587 1589 # --source.
1588 if 'source' in opts:
1589 del opts['source']
1590 if r'source' in opts:
1591 del opts[r'source']
1590 1592 # revsprepull is the len of the repo, not revnum of tip.
1591 1593 destspace = list(repo.changelog.revs(start=revsprepull))
1592 opts['_destspace'] = destspace
1594 opts[r'_destspace'] = destspace
1593 1595 try:
1594 1596 rebase(ui, repo, **opts)
1595 1597 except error.NoMergeDestAbort:
@@ -1603,7 +1605,7 b' def pullrebase(orig, ui, repo, *args, **'
1603 1605 # with warning and trumpets
1604 1606 commands.update(ui, repo)
1605 1607 else:
1606 if opts.get('tool'):
1608 if opts.get(r'tool'):
1607 1609 raise error.Abort(_('--tool can only be used with --rebase'))
1608 1610 ret = orig(ui, repo, *args, **opts)
1609 1611
General Comments 0
You need to be logged in to leave comments. Login now