changeset 1282:c1a507ba398b

Merge with BOS
author mpm@selenic.com
date Tue, 20 Sep 2005 11:38:01 -0700
parents 50553b99a5c9 (current diff) 84df9951532a (diff)
children f5faab34f32e
files
diffstat 2 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/doc/hg.1.txt	Tue Sep 20 10:45:26 2005 -0700
+++ b/doc/hg.1.txt	Tue Sep 20 11:38:01 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	Tue Sep 20 10:45:26 2005 -0700
+++ b/mercurial/commands.py	Tue Sep 20 11:38:01 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":