Mercurial > hg
comparison hgext/rebase.py @ 43932:9fb9f3a5cad7
rebase: inline single-use variables passed to _definedestmap()
Differential Revision: https://phab.mercurial-scm.org/D7646
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 12 Dec 2019 23:25:16 -0800 |
parents | 8c87cc169946 |
children | 71fee4564410 |
comparison
equal
deleted
inserted
replaced
43931:8c87cc169946 | 43932:9fb9f3a5cad7 |
---|---|
1161 def _origrebase( | 1161 def _origrebase( |
1162 ui, repo, action, opts, rbsrt, inmemory=False, leaveunfinished=False | 1162 ui, repo, action, opts, rbsrt, inmemory=False, leaveunfinished=False |
1163 ): | 1163 ): |
1164 assert action != b'stop' | 1164 assert action != b'stop' |
1165 with repo.wlock(), repo.lock(): | 1165 with repo.wlock(), repo.lock(): |
1166 # Validate input and define rebasing points | |
1167 destf = opts.get(b'dest', None) | |
1168 srcf = opts.get(b'source', None) | |
1169 basef = opts.get(b'base', None) | |
1170 revf = opts.get(b'rev', []) | |
1171 # search default destination in this space | |
1172 # used in the 'hg pull --rebase' case, see issue 5214. | |
1173 destspace = opts.get(b'_destspace') | |
1174 if opts.get(b'interactive'): | 1166 if opts.get(b'interactive'): |
1175 try: | 1167 try: |
1176 if extensions.find(b'histedit'): | 1168 if extensions.find(b'histedit'): |
1177 enablehistedit = b'' | 1169 enablehistedit = b'' |
1178 except KeyError: | 1170 except KeyError: |
1205 isabort=(action == b'abort') | 1197 isabort=(action == b'abort') |
1206 ) | 1198 ) |
1207 if retcode is not None: | 1199 if retcode is not None: |
1208 return retcode | 1200 return retcode |
1209 else: | 1201 else: |
1202 # search default destination in this space | |
1203 # used in the 'hg pull --rebase' case, see issue 5214. | |
1204 destspace = opts.get(b'_destspace') | |
1210 destmap = _definedestmap( | 1205 destmap = _definedestmap( |
1211 ui, | 1206 ui, |
1212 repo, | 1207 repo, |
1213 inmemory, | 1208 inmemory, |
1214 destf, | 1209 opts.get(b'dest', None), |
1215 srcf, | 1210 opts.get(b'source', None), |
1216 basef, | 1211 opts.get(b'base', None), |
1217 revf, | 1212 opts.get(b'rev', []), |
1218 destspace=destspace, | 1213 destspace=destspace, |
1219 ) | 1214 ) |
1220 retcode = rbsrt._preparenewrebase(destmap) | 1215 retcode = rbsrt._preparenewrebase(destmap) |
1221 if retcode is not None: | 1216 if retcode is not None: |
1222 return retcode | 1217 return retcode |