mercurial/hg.py
changeset 8807 8bf6eb68ddaf
parent 8800 971e38a9344b
child 8814 ab668c92a036
--- 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, '')