hgext/keyword.py
branchstable
changeset 9942 b6d484168350
parent 9494 bdd8a41ea6f6
child 9943 f8d779791161
--- a/hgext/keyword.py	Thu Nov 26 20:06:45 2009 +0100
+++ b/hgext/keyword.py	Thu Nov 26 20:50:16 2009 +0100
@@ -288,7 +288,7 @@
     '''
     def demoitems(section, items):
         ui.write('[%s]\n' % section)
-        for k, v in items:
+        for k, v in sorted(items):
             ui.write('%s = %s\n' % (k, v))
 
     msg = 'hg keyword config and expansion example'
@@ -336,7 +336,7 @@
     ui.write('[extensions]\n%s\n' % extension)
     demoitems('keyword', ui.configitems('keyword'))
     demoitems('keywordmaps', kwmaps.iteritems())
-    keywords = '$' + '$\n$'.join(kwmaps.keys()) + '$\n'
+    keywords = '$' + '$\n$'.join(sorted(kwmaps.keys())) + '$\n'
     repo.wopener(fn, 'w').write(keywords)
     repo.add([fn])
     path = repo.wjoin(fn)