Mercurial > hg
comparison mercurial/filelog.py @ 10490:f2618cacb485 stable
filelog: sort meta entries, ensure deterministic order
author | Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> |
---|---|
date | Tue, 16 Feb 2010 21:04:04 +0100 |
parents | 08a0f04b56bd |
children | cfc89fecfe51 194342b34870 |
comparison
equal
deleted
inserted
replaced
10489:3232dba5d521 | 10490:f2618cacb485 |
---|---|
33 | 33 |
34 def add(self, text, meta, transaction, link, p1=None, p2=None): | 34 def add(self, text, meta, transaction, link, p1=None, p2=None): |
35 if meta or text.startswith('\1\n'): | 35 if meta or text.startswith('\1\n'): |
36 mt = "" | 36 mt = "" |
37 if meta: | 37 if meta: |
38 mt = ["%s: %s\n" % (k, v) for k, v in meta.iteritems()] | 38 mt = ["%s: %s\n" % (k, v) for k, v in sorted(meta.iteritems())] |
39 text = "\1\n%s\1\n%s" % ("".join(mt), text) | 39 text = "\1\n%s\1\n%s" % ("".join(mt), text) |
40 return self.addrevision(text, transaction, link, p1, p2) | 40 return self.addrevision(text, transaction, link, p1, p2) |
41 | 41 |
42 def renamed(self, node): | 42 def renamed(self, node): |
43 if self.parents(node)[0] != revlog.nullid: | 43 if self.parents(node)[0] != revlog.nullid: |