Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Fri, 27 Nov 2009 18:03:29 +0000
changeset 661 55e769bd66f7
parent 659 55453609c3d4 (current diff)
parent 660 583a0371249c (diff)
child 662 25e813ce68e2
Merge with stable
--- a/hgkw/keyword.py	Mon Oct 19 22:42:05 2009 +0200
+++ b/hgkw/keyword.py	Fri Nov 27 18:03:29 2009 +0000
@@ -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)
--- a/tests/test-keyword.out	Mon Oct 19 22:42:05 2009 +0200
+++ b/tests/test-keyword.out	Fri Nov 27 18:03:29 2009 +0000
@@ -4,20 +4,20 @@
 [keyword]
 demo.txt = 
 [keywordmaps]
-RCSFile = {file|basename},v
 Author = {author|user}
+Date = {date|utcdate}
 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
-Source = {root}/{file},v
-Date = {date|utcdate}
 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
+RCSFile = {file|basename},v
 Revision = {node|short}
-$RCSFile: demo.txt,v $
+Source = {root}/{file},v
 $Author: test $
+$Date: 2000/00/00 00:00:00 $
 $Header: /TMP/demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
+$Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
+$RCSFile: demo.txt,v $
+$Revision: xxxxxxxxxxxx $
 $Source: /TMP/demo.txt,v $
-$Date: 2000/00/00 00:00:00 $
-$Id: demo.txt,v xxxxxxxxxxxx 2000/00/00 00:00:00 test $
-$Revision: xxxxxxxxxxxx $
 [extensions]
 hgext.keyword = 
 [keyword]