# HG changeset patch # User Brendan Cully # Date 2009-12-20 06:55:33 # Node ID f5e46dfb38c7bcabf21f3f83159ca2daae523fec # Parent ffa6f2eb934e08a7e3016ddd63dcd7869282a9f0 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 / diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -88,7 +88,7 @@ def share(ui, source, dest=None, update= raise util.Abort(_('can only share local repositories')) if not dest: - dest = os.path.basename(source) + dest = defaultdest(source) else: dest = ui.expandpath(dest)