Fix clone bug wth trailing slash
authormpm@selenic.com
Wed, 29 Jun 2005 21:55:25 -0800
changeset 528 648386fabf9c
parent 527 58790c83ce52
child 529 aace5b681fe9
Fix clone bug wth trailing slash -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Fix clone bug wth trailing slash manifest hash: ca78730f00063c57b70db69cf9ecfc3f83c02e84 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCw4lNywK+sNU5EO8RApq+AJ9YTl92lLnk9UMvWWSeEue/siS6pACgsg68 FLAc0OVzeULP7ORKRHCtpQI= =IL3R -----END PGP SIGNATURE-----
mercurial/commands.py
--- a/mercurial/commands.py	Wed Jun 29 14:20:54 2005 -0800
+++ b/mercurial/commands.py	Wed Jun 29 21:55:25 2005 -0800
@@ -272,7 +272,7 @@
     success = False
 
     if dest is None:
-        dest = os.path.basename(source)
+        dest = os.path.basename(os.path.normpath(source))
         if dest == source:
             ui.warn('abort: source and destination are the same\n')
             sys.exit(1)
@@ -287,7 +287,7 @@
             if d1 == d2: link = 1
 
         if link:
-            ui.debug("copying by hardlink\n")
+            ui.note("copying by hardlink\n")
             util.system("cp -al '%s'/.hg '%s'/.hg" % (source, dest))
             try:
                 os.remove(os.path.join(dest, ".hg", "dirstate"))