mercurial/commands.py
changeset 19184 05390cfe678a
parent 19147 5b1835485442
parent 19180 12dbdd348bb0
child 19201 309c439cdbaa
equal deleted inserted replaced
19182:fae47ecaa952 19184:05390cfe678a
   953     Use the command :hg:`update` to switch to an existing branch. Use
   953     Use the command :hg:`update` to switch to an existing branch. Use
   954     :hg:`commit --close-branch` to mark this branch as closed.
   954     :hg:`commit --close-branch` to mark this branch as closed.
   955 
   955 
   956     Returns 0 on success.
   956     Returns 0 on success.
   957     """
   957     """
       
   958     if label:
       
   959         label = label.strip()
       
   960 
   958     if not opts.get('clean') and not label:
   961     if not opts.get('clean') and not label:
   959         ui.write("%s\n" % repo.dirstate.branch())
   962         ui.write("%s\n" % repo.dirstate.branch())
   960         return
   963         return
   961 
   964 
   962     wlock = repo.wlock()
   965     wlock = repo.wlock()