1078 Use -C/--clean to reset the working directory branch to that of |
1078 Use -C/--clean to reset the working directory branch to that of |
1079 the parent of the working directory, negating a previous branch |
1079 the parent of the working directory, negating a previous branch |
1080 change. |
1080 change. |
1081 |
1081 |
1082 Use the command :hg:`update` to switch to an existing branch. Use |
1082 Use the command :hg:`update` to switch to an existing branch. Use |
1083 :hg:`commit --close-branch` to mark this branch as closed. |
1083 :hg:`commit --close-branch` to mark this branch head as closed. |
|
1084 When all heads of the branch are closed, the branch will be |
|
1085 considered closed. |
1084 |
1086 |
1085 Returns 0 on success. |
1087 Returns 0 on success. |
1086 """ |
1088 """ |
1087 if label: |
1089 if label: |
1088 label = label.strip() |
1090 label = label.strip() |
1416 |
1418 |
1417 @command('^commit|ci', |
1419 @command('^commit|ci', |
1418 [('A', 'addremove', None, |
1420 [('A', 'addremove', None, |
1419 _('mark new/missing files as added/removed before committing')), |
1421 _('mark new/missing files as added/removed before committing')), |
1420 ('', 'close-branch', None, |
1422 ('', 'close-branch', None, |
1421 _('mark a branch as closed, hiding it from the branch list')), |
1423 _('mark a branch head as closed')), |
1422 ('', 'amend', None, _('amend the parent of the working directory')), |
1424 ('', 'amend', None, _('amend the parent of the working directory')), |
1423 ('s', 'secret', None, _('use the secret phase for committing')), |
1425 ('s', 'secret', None, _('use the secret phase for committing')), |
1424 ('e', 'edit', None, _('invoke editor on commit messages')), |
1426 ('e', 'edit', None, _('invoke editor on commit messages')), |
1425 ('i', 'interactive', None, _('use interactive mode')), |
1427 ('i', 'interactive', None, _('use interactive mode')), |
1426 ] + walkopts + commitopts + commitopts2 + subrepoopts, |
1428 ] + walkopts + commitopts + commitopts2 + subrepoopts, |
1441 |
1443 |
1442 If no commit message is specified, Mercurial starts your |
1444 If no commit message is specified, Mercurial starts your |
1443 configured editor where you can enter a message. In case your |
1445 configured editor where you can enter a message. In case your |
1444 commit fails, you will find a backup of your message in |
1446 commit fails, you will find a backup of your message in |
1445 ``.hg/last-message.txt``. |
1447 ``.hg/last-message.txt``. |
|
1448 |
|
1449 The --close-branch flag can be used to mark the current branch |
|
1450 head closed. When all heads of a branch are closed, the branch |
|
1451 will be considered closed and no longer listed. |
1446 |
1452 |
1447 The --amend flag can be used to amend the parent of the |
1453 The --amend flag can be used to amend the parent of the |
1448 working directory with a new commit that contains the changes |
1454 working directory with a new commit that contains the changes |
1449 in the parent in addition to those currently reported by :hg:`status`, |
1455 in the parent in addition to those currently reported by :hg:`status`, |
1450 if there are any. The old commit is stored in a backup bundle in |
1456 if there are any. The old commit is stored in a backup bundle in |