# HG changeset patch # User Laurent Charignon # Date 1430427607 25200 # Node ID 48f78feb0b47b6a9725bbe6b28503b3f65c0cebf # Parent f113636997660b807c36cf1d0a06b76d53ada1a4 evolve: renaming of a variable tro was not a really descriptive name, replacing it with nexttrouble. diff -r f11363699766 -r 48f78feb0b47 hgext/evolve.py --- a/hgext/evolve.py Mon May 04 16:01:45 2015 -0700 +++ b/hgext/evolve.py Thu Apr 30 14:00:07 2015 -0700 @@ -1252,10 +1252,6 @@ graftcmd = commands.table['graft'][0] return graftcmd(ui, repo, old_obsolete=True, **{'continue': True}) - tro = _picknexttroubled(ui, repo, anyopt or allopt) - if tro is None: - return handlenotrouble(ui, repo, startnode, dryrunopt) - def progresscb(): if allopt: ui.progress('evolve', seen, unit='changesets', total=count) @@ -1263,14 +1259,20 @@ seen = 1 count = allopt and _counttroubled(ui, repo) or 1 - while tro is not None: + nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt) + + # No trouble to resolve + if not nexttrouble: + return handlenotrouble(ui, repo, startnode, dryrunopt) + + while nexttrouble is not None: progresscb() wlock = lock = tr = None try: wlock = repo.wlock() lock = repo.lock() tr = repo.transaction("evolve") - result = _evolveany(ui, repo, tro, dryrunopt, confirmopt, + result = _evolveany(ui, repo, nexttrouble, dryrunopt, confirmopt, progresscb=progresscb) tr.close() finally: @@ -1282,7 +1284,7 @@ ui.status(_('working directory is now at %s\n') % repo['.']) return result progresscb() - tro = _picknexttroubled(ui, repo, anyopt or allopt) + nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt) if allopt: ui.progress('evolve', None)