Sort files before overwriting
authorChristian Ebert <blacktrash@gmx.net>
Wed, 17 Oct 2007 17:06:08 +0200
changeset 274 231b408b1f6b
parent 273 a283665ad7cd
child 275 cb2b11e63906
Sort files before overwriting
hgkw/keyword.py
--- a/hgkw/keyword.py	Wed Oct 17 17:03:59 2007 +0200
+++ b/hgkw/keyword.py	Wed Oct 17 17:06:08 2007 +0200
@@ -344,6 +344,7 @@
             if not f in files and match(f) and _iskwfile(ui, man, f):
                 files.append(f)
         if files:
+            files.sort()
             kwt = kwtemplater(ui, repo, expand, node=ctx.node())
             # 3rd argument sets commit to False
             kwt.overwrite(files, man, False)
@@ -553,6 +554,7 @@
                     candidates = [f for f in cl[3] if mn.has_key(f)
                                   and _iskwfile(ui, mn, f)]
                     if candidates:
+                        candidates.sort()
                         # 3rd argument sets expansion to True
                         kwt = kwtemplater(ui, self, True, node=node)
                         # 3rd argument sets commit to True