Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/util.py Thu Mar 18 12:02:01 2021 +0100 +++ b/mercurial/util.py Tue Mar 23 23:55:33 2021 +0100 @@ -3144,6 +3144,21 @@ if v is not None: setattr(self, a, urlreq.unquote(v)) + def copy(self): + u = url(b'temporary useless value') + u.path = self.path + u.scheme = self.scheme + u.user = self.user + u.passwd = self.passwd + u.host = self.host + u.path = self.path + u.query = self.query + u.fragment = self.fragment + u._localpath = self._localpath + u._hostport = self._hostport + u._origpath = self._origpath + return u + @encoding.strmethod def __repr__(self): attrs = []