Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 7942:553cef16031f
mention default branch in branch and clone help
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 03 Apr 2009 12:37:06 -0500 |
parents | 7ca2be800804 |
children | de377b1a9a84 |
comparison
equal
deleted
inserted
replaced
7941:f5d4f59a9996 | 7942:553cef16031f |
---|---|
391 | 391 |
392 def branch(ui, repo, label=None, **opts): | 392 def branch(ui, repo, label=None, **opts): |
393 """set or show the current branch name | 393 """set or show the current branch name |
394 | 394 |
395 With no argument, show the current branch name. With one argument, | 395 With no argument, show the current branch name. With one argument, |
396 set the working directory branch name (the branch does not exist in | 396 set the working directory branch name (the branch does not exist |
397 the repository until the next commit). | 397 in the repository until the next commit). It is recommended to use |
398 the 'default' branch as your primary development branch. | |
398 | 399 |
399 Unless --force is specified, branch will not let you set a | 400 Unless --force is specified, branch will not let you set a |
400 branch name that shadows an existing branch. | 401 branch name that shadows an existing branch. |
401 | 402 |
402 Use --clean to reset the working directory branch to that of the | 403 Use --clean to reset the working directory branch to that of the |
561 basename of the source. | 562 basename of the source. |
562 | 563 |
563 The location of the source is added to the new repository's | 564 The location of the source is added to the new repository's |
564 .hg/hgrc file, as the default to be used for future pulls. | 565 .hg/hgrc file, as the default to be used for future pulls. |
565 | 566 |
567 If you use the -r option to clone up to a specific revision, no | |
568 subsequent revisions (including subsequent tags) will be present | |
569 in the cloned repository. This option implies --pull, even on | |
570 local repositories. | |
571 | |
572 By default, clone will check out the head of the 'default' branch. | |
573 If the -U option is used, the new clone will contain only a repository | |
574 (.hg) and no working copy (the working copy parent is the null revision). | |
575 | |
576 See 'hg help urls' for valid source format details. | |
577 | |
578 It is possible to specify an ssh:// URL as the destination, but no | |
579 .hg/hgrc and working directory will be created on the remote side. | |
580 Look at the help text for urls for important details about ssh:// URLs. | |
581 | |
566 For efficiency, hardlinks are used for cloning whenever the source | 582 For efficiency, hardlinks are used for cloning whenever the source |
567 and destination are on the same filesystem (note this applies only | 583 and destination are on the same filesystem (note this applies only |
568 to the repository data, not to the checked out files). Some | 584 to the repository data, not to the checked out files). Some |
569 filesystems, such as AFS, implement hardlinking incorrectly, but | 585 filesystems, such as AFS, implement hardlinking incorrectly, but |
570 do not report errors. In these cases, use the --pull option to | 586 do not report errors. In these cases, use the --pull option to |
580 the operation is up to you) and you have to make sure your editor | 596 the operation is up to you) and you have to make sure your editor |
581 breaks hardlinks (Emacs and most Linux Kernel tools do so). Also, | 597 breaks hardlinks (Emacs and most Linux Kernel tools do so). Also, |
582 this is not compatible with certain extensions that place their | 598 this is not compatible with certain extensions that place their |
583 metadata under the .hg directory, such as mq. | 599 metadata under the .hg directory, such as mq. |
584 | 600 |
585 If you use the -r option to clone up to a specific revision, no | |
586 subsequent revisions will be present in the cloned repository. | |
587 This option implies --pull, even on local repositories. | |
588 | |
589 If the -U option is used, the new clone will contain only a repository | |
590 (.hg) and no working copy (the working copy parent is the null revision). | |
591 | |
592 See 'hg help urls' for valid source format details. | |
593 | |
594 It is possible to specify an ssh:// URL as the destination, but no | |
595 .hg/hgrc and working directory will be created on the remote side. | |
596 Look at the help text for urls for important details about ssh:// URLs. | |
597 """ | 601 """ |
598 cmdutil.setremoteconfig(ui, opts) | 602 cmdutil.setremoteconfig(ui, opts) |
599 hg.clone(ui, source, dest, | 603 hg.clone(ui, source, dest, |
600 pull=opts.get('pull'), | 604 pull=opts.get('pull'), |
601 stream=opts.get('uncompressed'), | 605 stream=opts.get('uncompressed'), |