changeset 10099:f5e46dfb38c7 stable

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 /
author Brendan Cully <brendan@kublai.com>
date Sat, 19 Dec 2009 22:55:33 -0800
parents ffa6f2eb934e
children be442c7d84b4 37679dbf2ee3
files mercurial/hg.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)