From bc7e16ef1dc66d64010d19b38e7f7cd178c88055 Mon Sep 17 00:00:00 2001 From: Adrian Perez Date: Wed, 30 Nov 2011 22:41:12 +0200 Subject: [PATCH] doctool: Sort input filenames when generating indexes Order of inputs may not be pre-sorted if the shell does not sort arguments before passing them to commands. As shells are not required to sort arguments, make sure they are sorted in doctool itself. --- doc/tools/doctool | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/tools/doctool b/doc/tools/doctool index 6088cdab3..166abb664 100755 --- a/doc/tools/doctool +++ b/doc/tools/doctool @@ -240,7 +240,7 @@ class DocTool(object): out = DupRefsRemover(sys.stdout) - for name in args: + for name in sorted(args): if not name.endswith(".rst"): continue @@ -263,7 +263,7 @@ class DocTool(object): f.close() print - for name in args: + for name in sorted(args): # Skip non-RST inputs if not name.endswith(".rst"): continue