Mercurial > hg
changeset 1281:84df9951532a
Add --pull option to clone.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 20 Sep 2005 11:20:48 -0700 |
parents | 8ab1c07d4e0b |
children | c1a507ba398b |
files | doc/hg.1.txt mercurial/commands.py |
diffstat | 2 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/hg.1.txt Mon Sep 19 18:24:37 2005 -0700 +++ b/doc/hg.1.txt Tue Sep 20 11:20:48 2005 -0700 @@ -139,20 +139,24 @@ -o, --output <filespec> print output to file with formatted name -r, --rev <rev> print the given revision -clone [-U] <source> [dest]:: +clone [options] <source> [dest]:: Create a copy of an existing repository in a new directory. If no destination directory name is specified, it defaults to the basename of the source. - The source is added to the new repository's .hg/hgrc file to be used in - future pulls. + The location of the source is added to the new repository's + .hg/hgrc file, as the default to be used for future pulls. - For efficiency, hardlinks are used for cloning whenever the - source and destination are on the same filesystem. + For efficiency, hardlinks are used for cloning whenever the source + and destination are on the same filesystem. Some filesystems, + such as AFS, implement hardlinking incorrectly, but do not report + errors. In these cases, use the --pull option to avoid + hardlinking. options: -U, --noupdate do not update the new working directory + --pull use pull protocol to copy metadata -e, --ssh specify ssh command to use --remotecmd specify hg command to run on the remote side
--- a/mercurial/commands.py Mon Sep 19 18:24:37 2005 -0700 +++ b/mercurial/commands.py Tue Sep 20 11:20:48 2005 -0700 @@ -629,7 +629,7 @@ other = hg.repository(ui, source) copy = False - if other.dev() != -1: + if not opts['pull'] and other.dev() != -1: abspath = os.path.abspath(source) copy = True @@ -1782,6 +1782,7 @@ (clone, [('U', 'noupdate', None, 'skip update after cloning'), ('e', 'ssh', "", 'ssh command'), + ('', 'pull', None, 'use pull protocol to copy metadata'), ('', 'remotecmd', "", 'remote hg command')], 'hg clone [OPTION]... SOURCE [DEST]'), "^commit|ci":