summaryrefslogtreecommitdiffstats
path: root/subcmds/gitc_init.py
diff options
context:
space:
mode:
authorSimran Basi <sbasi@google.com>2015-08-27 11:44:42 -0700
committerDan Willemsen <dwillemsen@google.com>2015-08-28 18:09:05 +0000
commitf7a51898d3c989321c29f4ebaf7c3e9d106bc509 (patch)
tree600309dc1799351b36a9cc588c27b8856a808f6a /subcmds/gitc_init.py
parentb9a1b73425773dc97843f92aeee9c57c9a08c0f7 (diff)
downloadgit-repo-f7a51898d3c989321c29f4ebaf7c3e9d106bc509.tar.gz
GITC: Expand relative remote URLs.
The GITC filesystem does not understand relative URLs for remotes, so now if a remote uses a relative URL, it will be be expanded to be relative to the manifest URL. Change-Id: Ie1210758560aeb1934da3f71496aaf19c2728214
Diffstat (limited to 'subcmds/gitc_init.py')
-rw-r--r--subcmds/gitc_init.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/subcmds/gitc_init.py b/subcmds/gitc_init.py
index 6f5278b2..92b34f72 100644
--- a/subcmds/gitc_init.py
+++ b/subcmds/gitc_init.py
@@ -66,8 +66,10 @@ use for this GITC client.
66 if not os.path.exists(self.client_dir): 66 if not os.path.exists(self.client_dir):
67 os.mkdir(self.client_dir) 67 os.mkdir(self.client_dir)
68 super(GitcInit, self).Execute(opt, args) 68 super(GitcInit, self).Execute(opt, args)
69 # Make the destination manifest file a symlink to repo's so both repo and 69
70 # GITC refer to the same manifest. 70 for name, remote in self.manifest.remotes.iteritems():
71 remote.fetchUrl = remote.resolvedFetchUrl
72
71 if opt.manifest_file: 73 if opt.manifest_file:
72 if not os.path.exists(opt.manifest_file): 74 if not os.path.exists(opt.manifest_file):
73 print('fatal: Specified manifest file %s does not exist.' % 75 print('fatal: Specified manifest file %s does not exist.' %