Show More
@@ -47,6 +47,7 b' allowsymbolimports = (' | |||||
47 | 'mercurial.thirdparty.zope', |
|
47 | 'mercurial.thirdparty.zope', | |
48 | 'mercurial.thirdparty.zope.interface', |
|
48 | 'mercurial.thirdparty.zope.interface', | |
49 | 'typing', |
|
49 | 'typing', | |
|
50 | 'xml.etree.ElementTree', | |||
50 | ) |
|
51 | ) | |
51 |
|
52 | |||
52 | # Allow list of symbols that can be directly imported. |
|
53 | # Allow list of symbols that can be directly imported. |
@@ -8,6 +8,10 b'' | |||||
8 | import os |
|
8 | import os | |
9 | import re |
|
9 | import re | |
10 | import shutil |
|
10 | import shutil | |
|
11 | from xml.etree.ElementTree import ( | |||
|
12 | ElementTree, | |||
|
13 | XMLParser, | |||
|
14 | ) | |||
11 |
|
15 | |||
12 | from mercurial.i18n import _ |
|
16 | from mercurial.i18n import _ | |
13 | from mercurial import ( |
|
17 | from mercurial import ( | |
@@ -20,26 +24,6 b' from . import common' | |||||
20 |
|
24 | |||
21 | NoRepo = common.NoRepo |
|
25 | NoRepo = common.NoRepo | |
22 |
|
26 | |||
23 | # The naming drift of ElementTree is fun! |
|
|||
24 |
|
||||
25 | try: |
|
|||
26 | import xml.etree.cElementTree.ElementTree as ElementTree |
|
|||
27 | import xml.etree.cElementTree.XMLParser as XMLParser |
|
|||
28 | except ImportError: |
|
|||
29 | try: |
|
|||
30 | import xml.etree.ElementTree.ElementTree as ElementTree |
|
|||
31 | import xml.etree.ElementTree.XMLParser as XMLParser |
|
|||
32 | except ImportError: |
|
|||
33 | try: |
|
|||
34 | import elementtree.cElementTree.ElementTree as ElementTree |
|
|||
35 | import elementtree.cElementTree.XMLParser as XMLParser |
|
|||
36 | except ImportError: |
|
|||
37 | try: |
|
|||
38 | import elementtree.ElementTree.ElementTree as ElementTree |
|
|||
39 | import elementtree.ElementTree.XMLParser as XMLParser |
|
|||
40 | except ImportError: |
|
|||
41 | pass |
|
|||
42 |
|
||||
43 |
|
27 | |||
44 | class darcs_source(common.converter_source, common.commandline): |
|
28 | class darcs_source(common.converter_source, common.commandline): | |
45 | def __init__(self, ui, repotype, path, revs=None): |
|
29 | def __init__(self, ui, repotype, path, revs=None): |
General Comments 0
You need to be logged in to leave comments.
Login now