Mercurial > hg
diff mercurial/hg.py @ 8807:8bf6eb68ddaf
share: allow dest to default to the basename of source
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 13 Jun 2009 18:16:44 -0500 |
parents | 971e38a9344b |
children | ab668c92a036 |
line wrap: on
line diff
--- 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, '')