Show More
@@ -219,8 +219,9 b' def backout(ui, repo, node=None, rev=Non' | |||||
219 | def branch(ui, repo, label=None, **opts): |
|
219 | def branch(ui, repo, label=None, **opts): | |
220 | """set or show the current branch name |
|
220 | """set or show the current branch name | |
221 |
|
221 | |||
222 |
With |
|
222 | With no argument, show the current branch name. With one argument, | |
223 | current branch name. |
|
223 | set the working directory branch name (the branch does not exist in | |
|
224 | the repository until the next commit). | |||
224 |
|
225 | |||
225 | Unless --force is specified, branch will not let you set a |
|
226 | Unless --force is specified, branch will not let you set a | |
226 | branch name that shadows an existing branch. |
|
227 | branch name that shadows an existing branch. | |
@@ -232,6 +233,7 b' def branch(ui, repo, label=None, **opts)' | |||||
232 | raise util.Abort(_('a branch of the same name already exists' |
|
233 | raise util.Abort(_('a branch of the same name already exists' | |
233 | ' (use --force to override)')) |
|
234 | ' (use --force to override)')) | |
234 | repo.dirstate.setbranch(util.fromlocal(label)) |
|
235 | repo.dirstate.setbranch(util.fromlocal(label)) | |
|
236 | ui.status(_('marked working directory as branch %s\n') % label) | |||
235 | else: |
|
237 | else: | |
236 | ui.write("%s\n" % util.tolocal(repo.dirstate.branch())) |
|
238 | ui.write("%s\n" % util.tolocal(repo.dirstate.branch())) | |
237 |
|
239 |
General Comments 0
You need to be logged in to leave comments.
Login now