diff -r 14a0bdd59848 -r 8bf6eb68ddaf mercurial/hg.py --- a/mercurial/hg.py Sat Jun 13 18:08:51 2009 -0500 +++ b/mercurial/hg.py Sat Jun 13 18:16:44 2009 -0500 @@ -81,12 +81,15 @@ 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, '')