Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/ui.py @ 2494:73ac95671788
push, outgoing, bundle: fall back to "default" if "default-push" not defined
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 23 Jun 2006 18:09:44 -0700 |
parents | fe1689273f84 |
children | 4a2a4d988ead |
line wrap: on
line diff
--- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -197,12 +197,12 @@ class ui(object): if not self.verbose: user = util.shortuser(user) return user - def expandpath(self, loc): + def expandpath(self, loc, default=None): """Return repository location relative to cwd or from [paths]""" if loc.find("://") != -1 or os.path.exists(loc): return loc - return self.config("paths", loc, loc) + return self.config("paths", loc, default or loc) def write(self, *args): if self.header: