summaryrefslogtreecommitdiffstats
path: root/gitc_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitc_utils.py')
-rw-r--r--gitc_utils.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/gitc_utils.py b/gitc_utils.py
index 11284e20..8ff7699b 100644
--- a/gitc_utils.py
+++ b/gitc_utils.py
@@ -45,7 +45,8 @@ def _set_project_revisions(projects):
45 should not be overly large. Recommend calling this function multiple times 45 should not be overly large. Recommend calling this function multiple times
46 with each call not exceeding NUM_BATCH_RETRIEVE_REVISIONID projects. 46 with each call not exceeding NUM_BATCH_RETRIEVE_REVISIONID projects.
47 47
48 @param projects: List of project objects to set the revionExpr for. 48 Args:
49 projects: List of project objects to set the revionExpr for.
49 """ 50 """
50 # Retrieve the commit id for each project based off of it's current 51 # Retrieve the commit id for each project based off of it's current
51 # revisionExpr and it is not already a commit id. 52 # revisionExpr and it is not already a commit id.
@@ -73,7 +74,8 @@ def _manifest_groups(manifest):
73 This is the same logic used by Command.GetProjects(), which is used during 74 This is the same logic used by Command.GetProjects(), which is used during
74 repo sync 75 repo sync
75 76
76 @param manifest: The XmlManifest object 77 Args:
78 manifest: The XmlManifest object
77 """ 79 """
78 mp = manifest.manifestProject 80 mp = manifest.manifestProject
79 groups = mp.config.GetString('manifest.groups') 81 groups = mp.config.GetString('manifest.groups')
@@ -85,9 +87,10 @@ def _manifest_groups(manifest):
85def generate_gitc_manifest(gitc_manifest, manifest, paths=None): 87def generate_gitc_manifest(gitc_manifest, manifest, paths=None):
86 """Generate a manifest for shafsd to use for this GITC client. 88 """Generate a manifest for shafsd to use for this GITC client.
87 89
88 @param gitc_manifest: Current gitc manifest, or None if there isn't one yet. 90 Args:
89 @param manifest: A GitcManifest object loaded with the current repo manifest. 91 gitc_manifest: Current gitc manifest, or None if there isn't one yet.
90 @param paths: List of project paths we want to update. 92 manifest: A GitcManifest object loaded with the current repo manifest.
93 paths: List of project paths we want to update.
91 """ 94 """
92 95
93 print('Generating GITC Manifest by fetching revision SHAs for each ' 96 print('Generating GITC Manifest by fetching revision SHAs for each '
@@ -149,8 +152,9 @@ def generate_gitc_manifest(gitc_manifest, manifest, paths=None):
149def save_manifest(manifest, client_dir=None): 152def save_manifest(manifest, client_dir=None):
150 """Save the manifest file in the client_dir. 153 """Save the manifest file in the client_dir.
151 154
152 @param client_dir: Client directory to save the manifest in. 155 Args:
153 @param manifest: Manifest object to save. 156 manifest: Manifest object to save.
157 client_dir: Client directory to save the manifest in.
154 """ 158 """
155 if not client_dir: 159 if not client_dir:
156 client_dir = manifest.gitc_client_dir 160 client_dir = manifest.gitc_client_dir