1260 return |
1260 return |
1261 |
1261 |
1262 def _completeorphan(ui, repo, evolvestate): |
1262 def _completeorphan(ui, repo, evolvestate): |
1263 """function to complete the interrupted orphan resolution""" |
1263 """function to complete the interrupted orphan resolution""" |
1264 |
1264 |
|
1265 node = _completerelocation(ui, repo, evolvestate) |
|
1266 # resolving conflicts can lead to empty wdir and node can be None in |
|
1267 # those cases |
|
1268 ctx = repo[evolvestate['current']] |
|
1269 newctx = repo[node] if node is not None else repo['.'] |
|
1270 compat.createmarkers(repo, [(ctx, (newctx,))], operation='evolve') |
|
1271 |
|
1272 # make sure we are continuing evolve and not `hg next --evolve` |
|
1273 if evolvestate['command'] == 'evolve': |
|
1274 evolvestate['replacements'][ctx.node()] = node |
|
1275 if evolvestate['orphanmerge']: |
|
1276 # processing a merge changeset with both parents obsoleted, |
|
1277 # stabilized on second parent, insert in front of list to |
|
1278 # re-process to stabilize on first parent |
|
1279 evolvestate['revs'].insert(0, repo[node].rev()) |
|
1280 evolvestate['orphanmerge'] = False |
|
1281 |
|
1282 def _completerelocation(ui, repo, evolvestate): |
|
1283 """function to complete the interrupted relocation of a commit |
|
1284 return the new node formed |
|
1285 """ |
|
1286 |
1265 orig = repo[evolvestate['current']] |
1287 orig = repo[evolvestate['current']] |
1266 ctx = orig |
1288 ctx = orig |
1267 source = ctx.extra().get('source') |
1289 source = ctx.extra().get('source') |
1268 extra = {} |
1290 extra = {} |
1269 if source: |
1291 if source: |
1311 pass |
1333 pass |
1312 |
1334 |
1313 with repo.ui.configoverride(overrides, 'evolve-continue'): |
1335 with repo.ui.configoverride(overrides, 'evolve-continue'): |
1314 node = repo.commit(text=message, user=user, |
1336 node = repo.commit(text=message, user=user, |
1315 date=date, extra=extra) |
1337 date=date, extra=extra) |
1316 |
1338 return node |
1317 # resolving conflicts can lead to empty wdir and node can be None in |
|
1318 # those cases |
|
1319 newctx = repo[node] if node is not None else repo['.'] |
|
1320 compat.createmarkers(repo, [(ctx, (newctx,))], operation='evolve') |
|
1321 |
|
1322 # make sure we are continuing evolve and not `hg next --evolve` |
|
1323 if evolvestate['command'] == 'evolve': |
|
1324 evolvestate['replacements'][ctx.node()] = node |
|
1325 if evolvestate['orphanmerge']: |
|
1326 # processing a merge changeset with both parents obsoleted, |
|
1327 # stabilized on second parent, insert in front of list to |
|
1328 # re-process to stabilize on first parent |
|
1329 evolvestate['revs'].insert(0, repo[node].rev()) |
|
1330 evolvestate['orphanmerge'] = False |
|