Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: fetch.py

Issue 1360493002: Sort the fetch recipe listing. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fetch.py
diff --git a/fetch.py b/fetch.py
index 35e05d31f5512b683f9fa31cabdfc2322037ea45..ea745d178720d1b800e19af28418c61df9906513 100755
--- a/fetch.py
+++ b/fetch.py
@@ -235,9 +235,12 @@ def usage(msg=None):
--no-history Perform shallow clones, don't fetch the full git history.
Valid fetch recipes:""") % os.path.basename(sys.argv[0])
- for fname in os.listdir(os.path.join(SCRIPT_PATH, 'recipes')):
- if fname.endswith('.py'):
- print ' ' + fname[:-3]
+
+ recipes_dir = os.path.join(SCRIPT_PATH, 'recipes')
+ recipes = [f[:-3] for f in os.listdir(recipes_dir) if f.endswith('.py')]
+ recipes.sort()
+ for fname in recipes:
+ print ' ' + fname
sys.exit(bool(msg))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698