comparison hgext/rebase.py @ 33842:30573b3d2ebc

rebase: move obsoleted not rebased messages earlier (BC) A later patch will clean up those states. This patch moves the messages earlier. Marked as BC since the order of message has changed. Differential Revision: https://phab.mercurial-scm.org/D23
author Jun Wu <quark@fb.com>
date Sat, 08 Jul 2017 20:14:33 -0700
parents 35fc5e919675
children d8d0ef5f5975
comparison
equal deleted inserted replaced
33841:35fc5e919675 33842:30573b3d2ebc
444 elif self.state[rev] == nullmerge: 444 elif self.state[rev] == nullmerge:
445 ui.debug('ignoring null merge rebase of %s\n' % rev) 445 ui.debug('ignoring null merge rebase of %s\n' % rev)
446 elif self.state[rev] == revignored: 446 elif self.state[rev] == revignored:
447 ui.status(_('not rebasing ignored %s\n') % desc) 447 ui.status(_('not rebasing ignored %s\n') % desc)
448 elif self.state[rev] == revprecursor: 448 elif self.state[rev] == revprecursor:
449 destctx = repo[self.obsoletenotrebased[rev]] 449 pass
450 descdest = '%d:%s "%s"' % (destctx.rev(), destctx,
451 destctx.description().split('\n', 1)[0])
452 msg = _('note: not rebasing %s, already in destination as %s\n')
453 ui.status(msg % (desc, descdest))
454 elif self.state[rev] == revpruned: 450 elif self.state[rev] == revpruned:
455 msg = _('note: not rebasing %s, it has no successor\n') 451 pass
456 ui.status(msg % desc)
457 else: 452 else:
458 ui.status(_('already rebased %s as %s\n') % 453 ui.status(_('already rebased %s as %s\n') %
459 (desc, repo[self.state[rev]])) 454 (desc, repo[self.state[rev]]))
460 455
461 ui.progress(_('rebasing'), None) 456 ui.progress(_('rebasing'), None)
1411 # the revision should be ignored but that `defineparents` should search 1406 # the revision should be ignored but that `defineparents` should search
1412 # a rebase destination that make sense regarding rebased topology. 1407 # a rebase destination that make sense regarding rebased topology.
1413 rebasedomain = set(repo.revs('%ld::%ld', rebaseset, rebaseset)) 1408 rebasedomain = set(repo.revs('%ld::%ld', rebaseset, rebaseset))
1414 for ignored in set(rebasedomain) - set(rebaseset): 1409 for ignored in set(rebasedomain) - set(rebaseset):
1415 state[ignored] = revignored 1410 state[ignored] = revignored
1411 unfi = repo.unfiltered()
1416 for r in obsoletenotrebased: 1412 for r in obsoletenotrebased:
1417 if obsoletenotrebased[r] is None: 1413 desc = _ctxdesc(unfi[r])
1414 succ = obsoletenotrebased[r]
1415 if succ is None:
1416 msg = _('note: not rebasing %s, it has no successor\n') % desc
1418 state[r] = revpruned 1417 state[r] = revpruned
1419 else: 1418 else:
1419 destctx = unfi[succ]
1420 destdesc = '%d:%s "%s"' % (destctx.rev(), destctx,
1421 destctx.description().split('\n', 1)[0])
1422 msg = (_('note: not rebasing %s, already in destination as %s\n')
1423 % (desc, destdesc))
1420 state[r] = revprecursor 1424 state[r] = revprecursor
1425 repo.ui.status(msg)
1421 return originalwd, dest.rev(), state 1426 return originalwd, dest.rev(), state
1422 1427
1423 def clearrebased(ui, repo, dest, state, skipped, collapsedas=None): 1428 def clearrebased(ui, repo, dest, state, skipped, collapsedas=None):
1424 """dispose of rebased revision at the end of the rebase 1429 """dispose of rebased revision at the end of the rebase
1425 1430