comparison mercurial/ui.py @ 4216:76d541c6f3c0

Only hg repositories override [paths], not simple directories (fixes issue510)
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 14 Mar 2007 22:38:40 +0100
parents 78a0dd93db0b
children 0a95d0e83b4c
comparison
equal deleted inserted replaced
4180:f80cf8b7bbd9 4216:76d541c6f3c0
360 if not self.verbose: user = util.shortuser(user) 360 if not self.verbose: user = util.shortuser(user)
361 return user 361 return user
362 362
363 def expandpath(self, loc, default=None): 363 def expandpath(self, loc, default=None):
364 """Return repository location relative to cwd or from [paths]""" 364 """Return repository location relative to cwd or from [paths]"""
365 if "://" in loc or os.path.isdir(loc): 365 if "://" in loc or os.path.isdir(os.path.join(loc, '.hg')):
366 return loc 366 return loc
367 367
368 path = self.config("paths", loc) 368 path = self.config("paths", loc)
369 if not path and default is not None: 369 if not path and default is not None:
370 path = self.config("paths", default) 370 path = self.config("paths", default)