hg clone fails on non-GNU systems
Jed Davis
jdev at panix.com
Thu Jul 14 05:38:31 UTC 2005
In article <db4jjt$eb$1 at sea.gmane.org>, Jed Davis <jdev at panix.com> wrote:
> Let's try that again, with a slight change to address the trailing path
> separators:
And then I forget to tack on the .hg. Once more, with feeling, and with
spaces after all the commas (and I hope this actually reaches the list;
the news gateway I'm using was having network problems earlier):
------------------------------------------------------------------------
diff -r d7d68d27ebe5 mercurial/commands.py
--- a/mercurial/commands.py Tue Jul 12 08:51:49 2005
+++ b/mercurial/commands.py Thu Jul 14 01:35:28 2005
@@ -392,7 +392,13 @@
if other.dev() != -1 and os.stat(dest).st_dev == other.dev():
ui.note("cloning by hardlink\n")
- util.system("cp -al '%s'/.hg '%s'/.hg" % (source, dest))
+ for (sdir,dlist,flist) in os.walk(os.path.join(abspath, '.hg')):
+ ddir = dest + sdir[len(abspath):]
+ try:
+ os.mkdir(ddir)
+ except: pass
+ for f in flist:
+ os.link(os.path.join(sdir, f), os.path.join(ddir, f))
try:
os.remove(os.path.join(dest, ".hg", "dirstate"))
except: pass
------------------------------------------------------------------------
--
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l)))))) (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k))))))) '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))
More information about the Mercurial
mailing list