# HG changeset patch # User Laurent Charignon # Date 1430860149 25200 # Node ID 7821a00fb6ded05f8323c4f68f579304a7e4edfc # Parent ae678c98b685e0b0f0abc1490250220fe1bde64f evolve: rename handlenotrouble to _handlenotrouble and add doc As suggested by Pierre-Yves on his comments on f113636997660b807c36cf1d0a06b76d53ada1a4 we make it clear that this function is private and explain what it does. diff -r ae678c98b685 -r 7821a00fb6de hgext/evolve.py --- a/hgext/evolve.py Tue May 05 18:20:40 2015 -0700 +++ b/hgext/evolve.py Tue May 05 14:09:09 2015 -0700 @@ -1168,7 +1168,9 @@ finally: lockmod.release(tr, lock, wlock) -def handlenotrouble(ui, repo, startnode, dryrunopt): +def _handlenotrouble(ui, repo, startnode, dryrunopt): + """Used by the evolve function to display an error message when + no troubles can be resolved""" if repo['.'].obsolete(): displayer = cmdutil.show_changeset( ui, repo, {'template': shorttemplate}) @@ -1308,7 +1310,7 @@ nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt) # No trouble to resolve if not nexttrouble: - return handlenotrouble(ui, repo, startnode, dryrunopt) + return _handlenotrouble(ui, repo, startnode, dryrunopt) if allopt: # Resolving all the troubles