[PATCH] sort keys in serialized extra dict

Brendan Cully brendan at kublai.com
Fri Jul 6 12:29:40 CDT 2007


On Friday, 06 July 2007 at 12:25, Matt Mackall wrote:
> On Fri, Jul 06, 2007 at 10:23:05AM -0700, Brendan Cully wrote:
> > On Friday, 06 July 2007 at 13:16, Daniel Holth wrote:
> > > # HG changeset patch
> > > # User Daniel Holth <dholth at fastmail.fm>
> > > # Date 1183742043 14400
> > > # Node ID da55b07131aaa4e8c8c2ee8f3801a3df13ee9ff2
> > > # Parent  bb3a1efcb63f0d2b9824cb201e12a43d336e1baf
> > > sort keys in serialized extra dict
> > > 
> > > diff -r bb3a1efcb63f -r da55b07131aa mercurial/changelog.py
> > > +++ b/mercurial/changelog.py	Fri Jul 06 13:14:03 2007 -0400
> > > @@ -131,7 +131,7 @@ class changelog(revlog):
> > >          return extra
> > >  
> > >      def encode_extra(self, d):
> > > -        items = [_string_escape(":".join(t)) for t in d.iteritems()]
> > > +        items = [_string_escape(":".join((k, d[k]))) for k in sorted(d.iterkeys())]
> > >          return "\0".join(items)
> > >  
> > >      def extract(self, text):
> > 
> > I just pushed about the same thing a second ago...
> 
> Hopefully your version was Python2.3-compatible.

sorry. it is now.



More information about the Mercurial-devel mailing list