# HG changeset patch # User mpm@selenic.com # Date 1127241481 25200 # Node ID c1a507ba398ba5cce35c9997ac5d180b63b10dc2 # Parent 50553b99a5c9de1a0e69d92713ebc7611e519563# Parent 84df9951532ac9acbf3f8e5d5cffd83b4218ea34 Merge with BOS diff --git a/doc/hg.1.txt b/doc/hg.1.txt --- a/doc/hg.1.txt +++ b/doc/hg.1.txt @@ -139,20 +139,24 @@ cat [options] :: -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 --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -629,7 +629,7 @@ def clone(ui, source, dest=None, **opts) 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 @@ table = { (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":