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