##// END OF EJS Templates
remotenames: work around move of ABCs in collections...
Augie Fackler -
r36974:b710fdeb default
parent child Browse files
Show More
@@ -22,8 +22,6 b' remotenames.branches'
22
22
23 from __future__ import absolute_import
23 from __future__ import absolute_import
24
24
25 import collections
26
27 from mercurial.i18n import _
25 from mercurial.i18n import _
28
26
29 from mercurial.node import (
27 from mercurial.node import (
@@ -32,12 +30,20 b' from mercurial.node import ('
32 from mercurial import (
30 from mercurial import (
33 logexchange,
31 logexchange,
34 namespaces,
32 namespaces,
33 pycompat,
35 registrar,
34 registrar,
36 revsetlang,
35 revsetlang,
37 smartset,
36 smartset,
38 templateutil,
37 templateutil,
39 )
38 )
40
39
40 if pycompat.ispy3:
41 import collections.abc
42 mutablemapping = collections.abc.MutableMapping
43 else:
44 import collections
45 mutablemapping = collections.MutableMapping
46
41 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
47 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
42 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
48 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
43 # be specifying the version(s) of Mercurial they are tested with, or
49 # be specifying the version(s) of Mercurial they are tested with, or
@@ -56,7 +62,7 b" configitem('remotenames', 'branches',"
56 default=True,
62 default=True,
57 )
63 )
58
64
59 class lazyremotenamedict(collections.MutableMapping):
65 class lazyremotenamedict(mutablemapping):
60 """
66 """
61 Read-only dict-like Class to lazily resolve remotename entries
67 Read-only dict-like Class to lazily resolve remotename entries
62
68
General Comments 0
You need to be logged in to leave comments. Login now