Skip to content
Snippets Groups Projects
Commit bfd90356 authored by Georges Racinet's avatar Georges Racinet
Browse files

Compatibility with future hg-git 0.11

hg-git 0.11 drops support for Python 2, and as a result, does not
rewrap `OrderedDict` anymore. Since py-heptapod dropped Python 2 a
while ago, we can import from `collections` directly.
parent 02ad4cac
Branches
Tags
1 merge request!61Compatibility with Mercurial 5.8 / future hg-git 0.11
......@@ -8,6 +8,7 @@
This extension should enclose all Mercurial modifications and commands
needed for Heptapod server operations.
"""
import collections
import json
from mercurial.i18n import _
......@@ -361,7 +362,7 @@
parsed = config.config()
parsed.parse(b'.hgsub', b"".join(lines))
subs = parsed[b'']
return hggit.util.OrderedDict() if not subs else subs
return collections.OrderedDict() if not subs else subs
if hggit is not None:
......
......@@ -4,5 +4,6 @@
# GNU General Public License version 2 or any later version.
#
# SPDX-License-Identifier: GPL-2.0-or-later
from collections import OrderedDict
from hgext3rd.heptapod import hggit_parse_hgsub
......@@ -7,6 +8,5 @@
from hgext3rd.heptapod import hggit_parse_hgsub
from hggit.util import OrderedDict
def parse_hgsub(lines):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment