Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hg.py @ 10099:f5e46dfb38c7 stable
share: use defaultdest to compute unspecified destination
This harmonizes with clone, and avoids creating a .hg in the current directory if
the source ends with a /
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Sat, 19 Dec 2009 22:55:33 -0800 |
parents | 439d7ea6fe3a |
children | 25e572394f5c |
comparison
equal
deleted
inserted
replaced
10097:ffa6f2eb934e | 10099:f5e46dfb38c7 |
---|---|
86 | 86 |
87 if not islocal(source): | 87 if not islocal(source): |
88 raise util.Abort(_('can only share local repositories')) | 88 raise util.Abort(_('can only share local repositories')) |
89 | 89 |
90 if not dest: | 90 if not dest: |
91 dest = os.path.basename(source) | 91 dest = defaultdest(source) |
92 else: | 92 else: |
93 dest = ui.expandpath(dest) | 93 dest = ui.expandpath(dest) |
94 | 94 |
95 if isinstance(source, str): | 95 if isinstance(source, str): |
96 origsource = ui.expandpath(source) | 96 origsource = ui.expandpath(source) |