share: use defaultdest to compute unspecified destination stable
authorBrendan Cully <brendan@kublai.com>
Sat, 19 Dec 2009 22:55:33 -0800
branchstable
changeset 10099 f5e46dfb38c7
parent 10097 ffa6f2eb934e
child 10100 be442c7d84b4
child 10103 37679dbf2ee3
share: use defaultdest to compute unspecified destination This harmonizes with clone, and avoids creating a .hg in the current directory if the source ends with a /
mercurial/hg.py
--- a/mercurial/hg.py	Fri Dec 18 15:05:42 2009 -0500
+++ b/mercurial/hg.py	Sat Dec 19 22:55:33 2009 -0800
@@ -88,7 +88,7 @@
         raise util.Abort(_('can only share local repositories'))
 
     if not dest:
-        dest = os.path.basename(source)
+        dest = defaultdest(source)
     else:
         dest = ui.expandpath(dest)