mercurial/ui.py
changeset 4213 0a95d0e83b4c
parent 4085 719488a98ebe
parent 4212 76d541c6f3c0
child 4267 b11a2fb59cf5
equal deleted inserted replaced
4211:1253703853a8 4213:0a95d0e83b4c
   359         if not self.verbose: user = util.shortuser(user)
   359         if not self.verbose: user = util.shortuser(user)
   360         return user
   360         return user
   361 
   361 
   362     def expandpath(self, loc, default=None):
   362     def expandpath(self, loc, default=None):
   363         """Return repository location relative to cwd or from [paths]"""
   363         """Return repository location relative to cwd or from [paths]"""
   364         if "://" in loc or os.path.isdir(loc):
   364         if "://" in loc or os.path.isdir(os.path.join(loc, '.hg')):
   365             return loc
   365             return loc
   366 
   366 
   367         path = self.config("paths", loc)
   367         path = self.config("paths", loc)
   368         if not path and default is not None:
   368         if not path and default is not None:
   369             path = self.config("paths", default)
   369             path = self.config("paths", default)