mercurial/ui.py
changeset 2495 4a2a4d988ead
parent 2494 73ac95671788
child 2498 1e2ec4fd16df
equal deleted inserted replaced
2494:73ac95671788 2495:4a2a4d988ead
   200     def expandpath(self, loc, default=None):
   200     def expandpath(self, loc, default=None):
   201         """Return repository location relative to cwd or from [paths]"""
   201         """Return repository location relative to cwd or from [paths]"""
   202         if loc.find("://") != -1 or os.path.exists(loc):
   202         if loc.find("://") != -1 or os.path.exists(loc):
   203             return loc
   203             return loc
   204 
   204 
   205         return self.config("paths", loc, default or loc)
   205         path = self.config("paths", loc)
       
   206         if not path and default is not None:
       
   207             path = self.config("paths", default)
       
   208         return path
   206 
   209 
   207     def write(self, *args):
   210     def write(self, *args):
   208         if self.header:
   211         if self.header:
   209             if self.header != self.prev_header:
   212             if self.header != self.prev_header:
   210                 self.prev_header = self.header
   213                 self.prev_header = self.header