evolve: rename handlenotrouble to _handlenotrouble and add doc
authorLaurent Charignon <lcharignon@fb.com>
Tue, 05 May 2015 14:09:09 -0700
changeset 1327 7821a00fb6de
parent 1326 ae678c98b685
child 1331 5e82d78f5872
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.
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