Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master-1, master-0, and 0.9.4

Preserve the order of configuration files.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Changeset 54c9fd66da6a

Parent 1d60c686ac00

committed by Jelmer Vernooij

authored by Benjamin Pollack

Changes to one file · Browse files at 54c9fd66da6a Showing diff from parent 1d60c686ac00 Diff from another changeset...

Change 1 of 4 Show Entire File dulwich/​config.py Stacked
 
28
29
30
 
31
32
33
 
81
82
83
84
 
85
86
87
 
122
123
124
125
 
126
127
128
 
236
237
238
239
 
240
241
242
 
28
29
30
31
32
33
34
 
82
83
84
 
85
86
87
88
 
123
124
125
 
126
127
128
129
 
237
238
239
 
240
241
242
243
@@ -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: