# HG changeset patch # User Bryan O'Sullivan # Date 1127240448 25200 # Node ID 84df9951532ac9acbf3f8e5d5cffd83b4218ea34 # Parent 8ab1c07d4e0bbc29c1c028e953fc691fa4654eb8 Add --pull option to clone. diff -r 8ab1c07d4e0b -r 84df9951532a doc/hg.1.txt --- 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 print output to file with formatted name -r, --rev print the given revision -clone [-U] [dest]:: +clone [options] [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 diff -r 8ab1c07d4e0b -r 84df9951532a mercurial/commands.py --- 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":