diff --git a/hgext/share.py b/hgext/share.py
--- a/hgext/share.py
+++ b/hgext/share.py
@@ -9,7 +9,7 @@ import os
 from mercurial.i18n import _
 from mercurial import hg, commands
 
-def share(ui, source, dest, noupdate=False):
+def share(ui, source, dest=None, noupdate=False):
     """create a new shared repository (experimental)
 
     Initialize a new repository and working directory that shares its
@@ -25,7 +25,7 @@ cmdtable = {
     "share":
     (share,
      [('U', 'noupdate', None, _('do not create a working copy'))],
-     _('[-U] SOURCE DEST')),
+     _('[-U] SOURCE [DEST]')),
 }
 
 commands.norepo += " share"
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -81,12 +81,15 @@ def localpath(path):
         return path[5:]
     return path
 
-def share(ui, source, dest, update=True):
+def share(ui, source, dest=None, update=True):
     '''create a shared repository'''
 
     if not islocal(source):
         raise util.Abort(_('can only share local repositories'))
 
+    if not dest:
+        dest = os.path.basename(source)
+
     if isinstance(source, str):
         origsource = ui.expandpath(source)
         source, rev, checkout = parseurl(origsource, '')