changeset 1423:7821a00fb6de

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.
author Laurent Charignon <lcharignon@fb.com>
date Tue, 05 May 2015 14:09:09 -0700
parents ae678c98b685
children 5e82d78f5872
files hgext/evolve.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -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