Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 46827:1ecf082386b7
path: forbid chaining `path://` definitions
To have `path://xxx` referencing paths that use `path://` too, we need to
analyze dependencies to initialize them in the right order (and to detect
cycle).
I don't want to deal with that right now, so I just disallow it for now.
Differential Revision: https://phab.mercurial-scm.org/D10264
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 23 Mar 2021 23:55:33 +0100 |
parents | d4ba4d51f85f |
children | 64400d05db1e |
comparison
equal
deleted
inserted
replaced
46826:83b0a5c0dfec | 46827:1ecf082386b7 |
---|---|
3142 for a in (b'user', b'passwd', b'host', b'port', b'path', b'fragment'): | 3142 for a in (b'user', b'passwd', b'host', b'port', b'path', b'fragment'): |
3143 v = getattr(self, a) | 3143 v = getattr(self, a) |
3144 if v is not None: | 3144 if v is not None: |
3145 setattr(self, a, urlreq.unquote(v)) | 3145 setattr(self, a, urlreq.unquote(v)) |
3146 | 3146 |
3147 def copy(self): | |
3148 u = url(b'temporary useless value') | |
3149 u.path = self.path | |
3150 u.scheme = self.scheme | |
3151 u.user = self.user | |
3152 u.passwd = self.passwd | |
3153 u.host = self.host | |
3154 u.path = self.path | |
3155 u.query = self.query | |
3156 u.fragment = self.fragment | |
3157 u._localpath = self._localpath | |
3158 u._hostport = self._hostport | |
3159 u._origpath = self._origpath | |
3160 return u | |
3161 | |
3147 @encoding.strmethod | 3162 @encoding.strmethod |
3148 def __repr__(self): | 3163 def __repr__(self): |
3149 attrs = [] | 3164 attrs = [] |
3150 for a in ( | 3165 for a in ( |
3151 b'scheme', | 3166 b'scheme', |