comparison mercurial/ui.py @ 2624:46e52bbb9b1a

expand the path if destination is not a directory
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 16 Jul 2006 00:01:41 +0200
parents b898afee9d0d
children e6a41cbaa260
comparison
equal deleted inserted replaced
2617:0b4bff2b0ce3 2624:46e52bbb9b1a
207 if not self.verbose: user = util.shortuser(user) 207 if not self.verbose: user = util.shortuser(user)
208 return user 208 return user
209 209
210 def expandpath(self, loc, default=None): 210 def expandpath(self, loc, default=None):
211 """Return repository location relative to cwd or from [paths]""" 211 """Return repository location relative to cwd or from [paths]"""
212 if "://" in loc or os.path.exists(loc): 212 if "://" in loc or os.path.isdir(loc):
213 return loc 213 return loc
214 214
215 path = self.config("paths", loc) 215 path = self.config("paths", loc)
216 if not path and default is not None: 216 if not path and default is not None:
217 path = self.config("paths", default) 217 path = self.config("paths", default)