Show More
@@ -190,18 +190,18 b' class rebaseruntime(object):' | |||
|
190 | 190 | self.destmap = {} |
|
191 | 191 | self.skipped = set() |
|
192 | 192 | |
|
193 |
self.collapsef = opts.get( |
|
|
194 | self.collapsemsg = cmdutil.logmessage(ui, opts) | |
|
195 |
self.date = opts.get( |
|
|
193 | self.collapsef = opts.get('collapse', False) | |
|
194 | self.collapsemsg = cmdutil.logmessage(ui, pycompat.byteskwargs(opts)) | |
|
195 | self.date = opts.get('date', None) | |
|
196 | 196 | |
|
197 |
e = opts.get( |
|
|
197 | e = opts.get('extrafn') # internal, used by e.g. hgsubversion | |
|
198 | 198 | self.extrafns = [_savegraft] |
|
199 | 199 | if e: |
|
200 | 200 | self.extrafns = [e] |
|
201 | 201 | |
|
202 | 202 | self.backupf = ui.configbool(b'rewrite', b'backup-bundle') |
|
203 |
self.keepf = opts.get( |
|
|
204 |
self.keepbranchesf = opts.get( |
|
|
203 | self.keepf = opts.get('keep', False) | |
|
204 | self.keepbranchesf = opts.get('keepbranches', False) | |
|
205 | 205 | self.skipemptysuccessorf = rewriteutil.skip_empty_successor( |
|
206 | 206 | repo.ui, b'rebase' |
|
207 | 207 | ) |
@@ -630,7 +630,7 b' class rebaseruntime(object):' | |||
|
630 | 630 | repo.ui.debug(b'resuming interrupted rebase\n') |
|
631 | 631 | self.resume = False |
|
632 | 632 | else: |
|
633 |
overrides = {(b'ui', b'forcemerge'): opts.get( |
|
|
633 | overrides = {(b'ui', b'forcemerge'): opts.get('tool', b'')} | |
|
634 | 634 | with ui.configoverride(overrides, b'rebase'): |
|
635 | 635 | try: |
|
636 | 636 | rebasenode( |
@@ -677,9 +677,7 b' class rebaseruntime(object):' | |||
|
677 | 677 | if not self.collapsef: |
|
678 | 678 | merging = p2 != nullrev |
|
679 | 679 | editform = cmdutil.mergeeditform(merging, b'rebase') |
|
680 | editor = cmdutil.getcommiteditor( | |
|
681 | editform=editform, **pycompat.strkwargs(opts) | |
|
682 | ) | |
|
680 | editor = cmdutil.getcommiteditor(editform=editform, **opts) | |
|
683 | 681 | # We need to set parents again here just in case we're continuing |
|
684 | 682 | # a rebase started with an old hg version (before 9c9cfecd4600), |
|
685 | 683 | # because those old versions would have left us with two dirstate |
@@ -727,7 +725,7 b' class rebaseruntime(object):' | |||
|
727 | 725 | |
|
728 | 726 | def _finishrebase(self): |
|
729 | 727 | repo, ui, opts = self.repo, self.ui, self.opts |
|
730 | fm = ui.formatter(b'rebase', opts) | |
|
728 | fm = ui.formatter(b'rebase', pycompat.byteskwargs(opts)) | |
|
731 | 729 | fm.startitem() |
|
732 | 730 | if self.collapsef: |
|
733 | 731 | p1, p2, _base = defineparents( |
@@ -738,7 +736,7 b' class rebaseruntime(object):' | |||
|
738 | 736 | self.skipped, |
|
739 | 737 | self.obsolete_with_successor_in_destination, |
|
740 | 738 | ) |
|
741 |
editopt = opts.get( |
|
|
739 | editopt = opts.get('edit') | |
|
742 | 740 | editform = b'rebase.collapse' |
|
743 | 741 | if self.collapsemsg: |
|
744 | 742 | commitmsg = self.collapsemsg |
@@ -762,7 +760,7 b' class rebaseruntime(object):' | |||
|
762 | 760 | self.state[oldrev] = newrev |
|
763 | 761 | |
|
764 | 762 | if b'qtip' in repo.tags(): |
|
765 |
updatemq(repo, self.state, self.skipped, ** |
|
|
763 | updatemq(repo, self.state, self.skipped, **opts) | |
|
766 | 764 | |
|
767 | 765 | # restore original working directory |
|
768 | 766 | # (we do this before stripping) |
@@ -1091,8 +1089,7 b' def rebase(ui, repo, **opts):' | |||
|
1091 | 1089 | opts['rev'] = [revsetlang.formatspec(b'%ld and orphan()', userrevs)] |
|
1092 | 1090 | opts['dest'] = b'_destautoorphanrebase(SRC)' |
|
1093 | 1091 | |
|
1094 | opts = pycompat.byteskwargs(opts) | |
|
1095 | if opts.get(b'dry_run') or opts.get(b'confirm'): | |
|
1092 | if opts.get('dry_run') or opts.get('confirm'): | |
|
1096 | 1093 | return _dryrunrebase(ui, repo, action, opts) |
|
1097 | 1094 | elif action == 'stop': |
|
1098 | 1095 | rbsrt = rebaseruntime(repo, ui) |
@@ -1143,7 +1140,7 b' def rebase(ui, repo, **opts):' | |||
|
1143 | 1140 | |
|
1144 | 1141 | def _dryrunrebase(ui, repo, action, opts): |
|
1145 | 1142 | rbsrt = rebaseruntime(repo, ui, inmemory=True, dryrun=True, opts=opts) |
|
1146 |
confirm = opts.get( |
|
|
1143 | confirm = opts.get('confirm') | |
|
1147 | 1144 | if confirm: |
|
1148 | 1145 | ui.status(_(b'starting in-memory rebase\n')) |
|
1149 | 1146 | else: |
@@ -1200,7 +1197,7 b' def _dryrunrebase(ui, repo, action, opts' | |||
|
1200 | 1197 | isabort=True, |
|
1201 | 1198 | backup=False, |
|
1202 | 1199 | suppwarns=True, |
|
1203 |
dryrun=opts.get( |
|
|
1200 | dryrun=opts.get('dry_run'), | |
|
1204 | 1201 | ) |
|
1205 | 1202 | |
|
1206 | 1203 | |
@@ -1212,7 +1209,7 b' def _dorebase(ui, repo, action, opts, in' | |||
|
1212 | 1209 | def _origrebase(ui, repo, action, opts, rbsrt): |
|
1213 | 1210 | assert action != 'stop' |
|
1214 | 1211 | with repo.wlock(), repo.lock(): |
|
1215 |
if opts.get( |
|
|
1212 | if opts.get('interactive'): | |
|
1216 | 1213 | try: |
|
1217 | 1214 | if extensions.find(b'histedit'): |
|
1218 | 1215 | enablehistedit = b'' |
@@ -1238,7 +1235,7 b' def _origrebase(ui, repo, action, opts, ' | |||
|
1238 | 1235 | raise error.InputError( |
|
1239 | 1236 | _(b'cannot use collapse with continue or abort') |
|
1240 | 1237 | ) |
|
1241 |
if action == 'abort' and opts.get( |
|
|
1238 | if action == 'abort' and opts.get('tool', False): | |
|
1242 | 1239 | ui.warn(_(b'tool option will be ignored\n')) |
|
1243 | 1240 | if action == 'continue': |
|
1244 | 1241 | ms = mergestatemod.mergestate.read(repo) |
@@ -1250,15 +1247,15 b' def _origrebase(ui, repo, action, opts, ' | |||
|
1250 | 1247 | else: |
|
1251 | 1248 | # search default destination in this space |
|
1252 | 1249 | # used in the 'hg pull --rebase' case, see issue 5214. |
|
1253 |
destspace = opts.get( |
|
|
1250 | destspace = opts.get('_destspace') | |
|
1254 | 1251 | destmap = _definedestmap( |
|
1255 | 1252 | ui, |
|
1256 | 1253 | repo, |
|
1257 | 1254 | rbsrt.inmemory, |
|
1258 |
opts.get( |
|
|
1259 |
opts.get( |
|
|
1260 |
opts.get( |
|
|
1261 |
opts.get( |
|
|
1255 | opts.get('dest', None), | |
|
1256 | opts.get('source', []), | |
|
1257 | opts.get('base', []), | |
|
1258 | opts.get('rev', []), | |
|
1262 | 1259 | destspace=destspace, |
|
1263 | 1260 | ) |
|
1264 | 1261 | retcode = rbsrt._preparenewrebase(destmap) |
General Comments 0
You need to be logged in to leave comments.
Login now