equal
deleted
inserted
replaced
130 fsencode = pycompat.fsencode # since 3.9 (or f4a5e0e86a7e) |
130 fsencode = pycompat.fsencode # since 3.9 (or f4a5e0e86a7e) |
131 if pycompat.ispy3: |
131 if pycompat.ispy3: |
132 _maxint = sys.maxsize # per py3 docs for replacing maxint |
132 _maxint = sys.maxsize # per py3 docs for replacing maxint |
133 else: |
133 else: |
134 _maxint = sys.maxint |
134 _maxint = sys.maxint |
135 except (ImportError, AttributeError): |
135 except (NameError, ImportError, AttributeError): |
136 import inspect |
136 import inspect |
137 getargspec = inspect.getargspec |
137 getargspec = inspect.getargspec |
138 _byteskwargs = identity |
138 _byteskwargs = identity |
139 fsencode = identity # no py3 support |
139 fsencode = identity # no py3 support |
140 _maxint = sys.maxint # no py3 support |
140 _maxint = sys.maxint # no py3 support |
142 _xrange = xrange |
142 _xrange = xrange |
143 |
143 |
144 try: |
144 try: |
145 # 4.7+ |
145 # 4.7+ |
146 queue = pycompat.queue.Queue |
146 queue = pycompat.queue.Queue |
147 except (AttributeError, ImportError): |
147 except (NameError, AttributeError, ImportError): |
148 # <4.7. |
148 # <4.7. |
149 try: |
149 try: |
150 queue = pycompat.queue |
150 queue = pycompat.queue |
151 except (AttributeError, ImportError): |
151 except (NameError, AttributeError, ImportError): |
152 queue = util.queue |
152 queue = util.queue |
153 |
153 |
154 try: |
154 try: |
155 from mercurial import logcmdutil |
155 from mercurial import logcmdutil |
156 makelogtemplater = logcmdutil.maketemplater |
156 makelogtemplater = logcmdutil.maketemplater |