comparison hgext/evolve.py @ 1327: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
comparison
equal deleted inserted replaced
1326:ae678c98b685 1327:7821a00fb6de
1166 tr.close() 1166 tr.close()
1167 return result 1167 return result
1168 finally: 1168 finally:
1169 lockmod.release(tr, lock, wlock) 1169 lockmod.release(tr, lock, wlock)
1170 1170
1171 def handlenotrouble(ui, repo, startnode, dryrunopt): 1171 def _handlenotrouble(ui, repo, startnode, dryrunopt):
1172 """Used by the evolve function to display an error message when
1173 no troubles can be resolved"""
1172 if repo['.'].obsolete(): 1174 if repo['.'].obsolete():
1173 displayer = cmdutil.show_changeset( 1175 displayer = cmdutil.show_changeset(
1174 ui, repo, {'template': shorttemplate}) 1176 ui, repo, {'template': shorttemplate})
1175 successors = set() 1177 successors = set()
1176 1178
1306 _cleanup(ui, repo, startnode, showprogress) 1308 _cleanup(ui, repo, startnode, showprogress)
1307 return 1309 return
1308 nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt) 1310 nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt)
1309 # No trouble to resolve 1311 # No trouble to resolve
1310 if not nexttrouble: 1312 if not nexttrouble:
1311 return handlenotrouble(ui, repo, startnode, dryrunopt) 1313 return _handlenotrouble(ui, repo, startnode, dryrunopt)
1312 1314
1313 if allopt: 1315 if allopt:
1314 # Resolving all the troubles 1316 # Resolving all the troubles
1315 while nexttrouble: 1317 while nexttrouble:
1316 progresscb() 1318 progresscb()