Mercurial > hg
changeset 4601:e69da61e467e
Notify the user that hg branch does not create a branch until commit
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Mon, 18 Jun 2007 10:44:43 -0700 |
parents | 64c415d2553a |
children | d9d177ef748a |
files | mercurial/commands.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Jun 17 20:09:35 2007 -0700 +++ b/mercurial/commands.py Mon Jun 18 10:44:43 2007 -0700 @@ -219,8 +219,9 @@ def branch(ui, repo, label=None, **opts): """set or show the current branch name - With <name>, set the current branch name. Otherwise, show the - current branch name. + With no argument, show the current branch name. With one argument, + set the working directory branch name (the branch does not exist in + the repository until the next commit). Unless --force is specified, branch will not let you set a branch name that shadows an existing branch. @@ -232,6 +233,7 @@ raise util.Abort(_('a branch of the same name already exists' ' (use --force to override)')) repo.dirstate.setbranch(util.fromlocal(label)) + ui.status(_('marked working directory as branch %s\n') % label) else: ui.write("%s\n" % util.tolocal(repo.dirstate.branch()))