--- 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, '')