mercurial/commands.py
branchstable
changeset 15610 09b200396384
parent 15511 6cae68a361ed
child 15611 ec8a49c46d7e
child 15615 41885892796e
equal deleted inserted replaced
15609:8f4bad72d8b1 15610:09b200396384
   817     ('C', 'clean', None, _('reset branch name to parent branch name'))],
   817     ('C', 'clean', None, _('reset branch name to parent branch name'))],
   818     _('[-fC] [NAME]'))
   818     _('[-fC] [NAME]'))
   819 def branch(ui, repo, label=None, **opts):
   819 def branch(ui, repo, label=None, **opts):
   820     """set or show the current branch name
   820     """set or show the current branch name
   821 
   821 
       
   822     .. note::
       
   823        Branch names are permanent and global. Use :hg:`bookmark` to create a
       
   824        light-weight bookmark instead. See :hg:`help glossary` for more
       
   825        information about named branches and bookmarks.
       
   826 
   822     With no argument, show the current branch name. With one argument,
   827     With no argument, show the current branch name. With one argument,
   823     set the working directory branch name (the branch will not exist
   828     set the working directory branch name (the branch will not exist
   824     in the repository until the next commit). Standard practice
   829     in the repository until the next commit). Standard practice
   825     recommends that primary development take place on the 'default'
   830     recommends that primary development take place on the 'default'
   826     branch.
   831     branch.
   832     the parent of the working directory, negating a previous branch
   837     the parent of the working directory, negating a previous branch
   833     change.
   838     change.
   834 
   839 
   835     Use the command :hg:`update` to switch to an existing branch. Use
   840     Use the command :hg:`update` to switch to an existing branch. Use
   836     :hg:`commit --close-branch` to mark this branch as closed.
   841     :hg:`commit --close-branch` to mark this branch as closed.
   837 
       
   838     .. note::
       
   839        Branch names are permanent. Use :hg:`bookmark` to create a
       
   840        light-weight bookmark instead. See :hg:`help glossary` for more
       
   841        information about named branches and bookmarks.
       
   842 
   842 
   843     Returns 0 on success.
   843     Returns 0 on success.
   844     """
   844     """
   845 
   845 
   846     if opts.get('clean'):
   846     if opts.get('clean'):