Mercurial > evolve
changeset 1015:68d9c7e4a03d
evolve: rename `tr` variable (for troubled) to `tro`
tro is usually dedicated to transaction.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 06 Aug 2014 16:07:53 -0700 |
parents | 93507c20739e |
children | facb5efa8ea4 |
files | hgext/evolve.py |
diffstat | 1 files changed, 19 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Wed Aug 06 16:04:07 2014 -0700 +++ b/hgext/evolve.py Wed Aug 06 16:07:53 2014 -0700 @@ -1202,8 +1202,8 @@ graftcmd = commands.table['graft'][0] return graftcmd(ui, repo, old_obsolete=True, **{'continue': True}) - tr = _picknexttroubled(ui, repo, anyopt or allopt) - if tr is None: + tro = _picknexttroubled(ui, repo, anyopt or allopt) + if tro is None: if repo['.'].obsolete(): displayer = cmdutil.show_changeset( ui, repo, {'template': shorttemplate}) @@ -1255,33 +1255,33 @@ seen = 1 count = allopt and _counttroubled(ui, repo) or 1 - while tr is not None: + while tro is not None: progresscb() - result = _evolveany(ui, repo, tr, dryrunopt, progresscb=progresscb) + result = _evolveany(ui, repo, tro, dryrunopt, progresscb=progresscb) progresscb() seen += 1 if not allopt: return result progresscb() - tr = _picknexttroubled(ui, repo, anyopt or allopt) + tro = _picknexttroubled(ui, repo, anyopt or allopt) if allopt: ui.progress('evolve', None) -def _evolveany(ui, repo, tr, dryrunopt, progresscb): +def _evolveany(ui, repo, tro, dryrunopt, progresscb): repo = repo.unfiltered() - tr = repo[tr.rev()] + tro = repo[tro.rev()] cmdutil.bailifchanged(repo) - troubles = tr.troubles() + troubles = tro.troubles() if 'unstable' in troubles: - return _solveunstable(ui, repo, tr, dryrunopt, progresscb) + return _solveunstable(ui, repo, tro, dryrunopt, progresscb) elif 'bumped' in troubles: - return _solvebumped(ui, repo, tr, dryrunopt, progresscb) + return _solvebumped(ui, repo, tro, dryrunopt, progresscb) elif 'divergent' in troubles: repo = repo.unfiltered() - tr = repo[tr.rev()] - return _solvedivergent(ui, repo, tr, dryrunopt, progresscb) + tro = repo[tro.rev()] + return _solvedivergent(ui, repo, tro, dryrunopt, progresscb) else: assert False # WHAT? unknown troubles @@ -1296,21 +1296,21 @@ def _picknexttroubled(ui, repo, pickany=False, progresscb=None): """Pick a the next trouble changeset to solve""" if progresscb: progresscb() - tr = _stabilizableunstable(repo, repo['.']) - if tr is None: + tro = _stabilizableunstable(repo, repo['.']) + if tro is None: wdp = repo['.'] if 'divergent' in wdp.troubles(): - tr = wdp - if tr is None and pickany: + tro = wdp + if tro is None and pickany: troubled = list(repo.set('unstable()')) if not troubled: troubled = list(repo.set('bumped()')) if not troubled: troubled = list(repo.set('divergent()')) if troubled: - tr = troubled[0] - - return tr + tro = troubled[0] + + return tro def _stabilizableunstable(repo, pctx): """Return a changectx for an unstable changeset which can be