def rename_branch():
 branch = choose_branch(N_(u'Rename Existing Branch'), N_(u'Select'))
 if (not branch):
  return
 new_branch = choose_branch(N_(u'Enter New Branch Name'), N_(u'Rename'))
 if (not new_branch):
  return
 cmds.do(cmds.RenameBranch, branch, new_branch)

def rename_branch ( ) : branch = choose_branch ( N_ ( u'Rename Existing Branch' ) , N_ ( u'Select' ) ) if ( not branch ) : return new_branch = choose_branch ( N_ ( u'Enter New Branch Name' ) , N_ ( u'Rename' ) ) if ( not new_branch ) : return cmds . do ( cmds . RenameBranch , branch , new_branch )
launch the rename branch dialogs .