diff hgext/relink.py @ 11357:7914628b4751

relink: ensure deterministic directory walk in collect
author Martin Geisler <mg@aragost.com>
date Wed, 16 Jun 2010 12:22:14 +0200
parents 9011036ba79d
children c327bfa5e831
line wrap: on
line diff
--- a/hgext/relink.py	Wed Jun 16 15:20:22 2010 +0530
+++ b/hgext/relink.py	Wed Jun 16 12:22:14 2010 +0200
@@ -72,8 +72,9 @@
     ui.status(_("tip has %d files, estimated total number of files: %s\n")
               % (live, total))
     for dirpath, dirnames, filenames in os.walk(src):
+        dirnames.sort()
         relpath = dirpath[len(src) + seplen:]
-        for filename in filenames:
+        for filename in sorted(filenames):
             if not filename[-2:] in ('.d', '.i'):
                 continue
             st = os.stat(os.path.join(dirpath, filename))