Changes to one file · Browse files at 54c9fd66da6a Showing diff from parent 1d60c686ac00 Diff from another changeset...
@@ -28,6 +28,7 @@ import os
import re
+from collections import OrderedDict
from UserDict import DictMixin
from dulwich.file import GitFile
@@ -81,7 +82,7 @@ def __init__(self, values=None):
"""Create a new ConfigDict."""
if values is None:
- values = {}
+ values = OrderedDict()
self._values = values
def __repr__(self):
@@ -122,7 +123,7 @@ def set(self, section, name, value):
if isinstance(section, basestring):
section = (section, )
- self._values.setdefault(section, {})[name] = value
+ self._values.setdefault(section, OrderedDict())[name] = value
def _format_string(value):
@@ -236,7 +237,7 @@ section = (pts[0], pts[1])
else:
section = (pts[0], )
- ret._values[section] = {}
+ ret._values[section] = OrderedDict()
if _strip_comments(line).strip() == "":
continue
if section is None:
|
Loading...