##// END OF EJS Templates
Fix clone bug wth trailing slash...
mpm@selenic.com -
r528:648386fa default
parent child Browse files
Show More
@@ -272,7 +272,7 b' def clone(ui, source, dest = None, **opt'
272 success = False
272 success = False
273
273
274 if dest is None:
274 if dest is None:
275 dest = os.path.basename(source)
275 dest = os.path.basename(os.path.normpath(source))
276 if dest == source:
276 if dest == source:
277 ui.warn('abort: source and destination are the same\n')
277 ui.warn('abort: source and destination are the same\n')
278 sys.exit(1)
278 sys.exit(1)
@@ -287,7 +287,7 b' def clone(ui, source, dest = None, **opt'
287 if d1 == d2: link = 1
287 if d1 == d2: link = 1
288
288
289 if link:
289 if link:
290 ui.debug("copying by hardlink\n")
290 ui.note("copying by hardlink\n")
291 util.system("cp -al '%s'/.hg '%s'/.hg" % (source, dest))
291 util.system("cp -al '%s'/.hg '%s'/.hg" % (source, dest))
292 try:
292 try:
293 os.remove(os.path.join(dest, ".hg", "dirstate"))
293 os.remove(os.path.join(dest, ".hg", "dirstate"))
General Comments 0
You need to be logged in to leave comments. Login now