[projects/git-slug: 150/170] fetch_packages can return list of all repositories
glen
glen at pld-linux.org
Mon Sep 21 21:51:25 CEST 2015
commit 09722d547e9703a43dc5ca6ef3c851a464912e4e
Author: Kacper Kornet <draenog at pld-linux.org>
Date: Mon Nov 19 16:52:36 2012 +0000
fetch_packages can return list of all repositories
slug.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/slug.py b/slug.py
index 4452f89..6a549c0 100755
--- a/slug.py
+++ b/slug.py
@@ -114,7 +114,7 @@ def getrefs(*args):
sys.exit(2)
return refs
-def fetch_packages(options):
+def fetch_packages(options, return_all=False):
fetch_queue = queue.Queue()
updated_repos = Store()
for i in range(options.jobs):
@@ -155,7 +155,10 @@ def fetch_packages(options):
if len(refs.heads[pkgdir]) == 0 and os.path.isdir(os.path.join(fulldir, '.git')):
print('Removing', fulldir)
shutil.rmtree(fulldir)
- return updated_repos.items
+ if return_all:
+ return refs.heads
+ else:
+ return updated_repos.items
def checkout_packages(options):
if options.checkout is None:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5
More information about the pld-cvs-commit
mailing list