summaryrefslogtreecommitdiffstats
path: root/gitc_utils.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2020-12-11 04:02:19 -0500
committerMike Frysinger <vapier@google.com>2020-12-11 18:07:15 +0000
commitdc60e54d361863aa50440b2f4fd6d29dc51794b4 (patch)
tree3d872c709d266418a20e90fbb5bea7d5c0c2bf1c /gitc_utils.py
parent0a849b660ff30968454e5a9c79da759da86e7402 (diff)
downloadgit-repo-dc60e54d361863aa50440b2f4fd6d29dc51794b4.tar.gz
gitc: write the manifest directly
Rather than pull the client dir out to construct the manifest filename which the manifest itself already has, pull the filename out and use that. Change-Id: I33991084dcb3205f819bb841084e3c48d6ccb284 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/291264 Reviewed-by: Jonathan Nieder <jrn@google.com> Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'gitc_utils.py')
-rw-r--r--gitc_utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gitc_utils.py b/gitc_utils.py
index 8ff7699b..6354702f 100644
--- a/gitc_utils.py
+++ b/gitc_utils.py
@@ -157,8 +157,10 @@ def save_manifest(manifest, client_dir=None):
157 client_dir: Client directory to save the manifest in. 157 client_dir: Client directory to save the manifest in.
158 """ 158 """
159 if not client_dir: 159 if not client_dir:
160 client_dir = manifest.gitc_client_dir 160 manifest_file = manifest.manifestFile
161 with open(os.path.join(client_dir, '.manifest'), 'w') as f: 161 else:
162 manifest_file = os.path.join(client_dir, '.manifest')
163 with open(manifest_file, 'w') as f:
162 manifest.Save(f, groups=_manifest_groups(manifest)) 164 manifest.Save(f, groups=_manifest_groups(manifest))
163 # TODO(sbasi/jorg): Come up with a solution to remove the sleep below. 165 # TODO(sbasi/jorg): Come up with a solution to remove the sleep below.
164 # Give the GITC filesystem time to register the manifest changes. 166 # Give the GITC filesystem time to register the manifest changes.