mercurial/ui.py
changeset 46827 1ecf082386b7
parent 46826 83b0a5c0dfec
child 46828 395cf404e76a
equal deleted inserted replaced
46826:83b0a5c0dfec 46827:1ecf082386b7
  2315         if u.fragment:
  2315         if u.fragment:
  2316             branch = u.fragment
  2316             branch = u.fragment
  2317             u.fragment = None
  2317             u.fragment = None
  2318 
  2318 
  2319         self.url = u
  2319         self.url = u
       
  2320         # the url from the config/command line before dealing with `path://`
       
  2321         self.raw_url = u.copy()
  2320         self.branch = branch
  2322         self.branch = branch
  2321 
  2323 
  2322         self.name = name
  2324         self.name = name
  2323         self.rawloc = rawloc
  2325         self.rawloc = rawloc
  2324         self.loc = b'%s' % u
  2326         self.loc = b'%s' % u
  2336 
  2338 
  2337     def chain_path(self, ui, paths):
  2339     def chain_path(self, ui, paths):
  2338         if self.url.scheme == b'path':
  2340         if self.url.scheme == b'path':
  2339             assert self.url.path is None
  2341             assert self.url.path is None
  2340             subpath = paths[self.url.host]
  2342             subpath = paths[self.url.host]
       
  2343             if subpath.raw_url.scheme == b'path':
       
  2344                 m = _('cannot use `%s`, "%s" is also define as a `path://`')
       
  2345                 m %= (self.rawloc, self.url.host)
       
  2346                 raise error.Abort(m)
  2341             self.url = subpath.url
  2347             self.url = subpath.url
  2342             self.rawloc = subpath.rawloc
  2348             self.rawloc = subpath.rawloc
  2343             self.loc = subpath.loc
  2349             self.loc = subpath.loc
  2344             if self.branch is None:
  2350             if self.branch is None:
  2345                 self.branch = subpath.branch
  2351                 self.branch = subpath.branch