mirror of
https://git.codelinaro.org/clo/tools/repo.git
synced 2025-05-26 02:06:44 +08:00
implement optional 'pushurl' in the manifest file
Allow the 'remote' element in the manifest file to define an optional 'pushurl' attribute which is passed into the .git/config file. Change-Id: If342d299d371374aedc4440645798888869c9714 Signed-off-by: Steve Rae <steve.rae@raedomain.com>
This commit is contained in:
@ -572,6 +572,7 @@ class Remote(object):
|
||||
self._config = config
|
||||
self.name = name
|
||||
self.url = self._Get('url')
|
||||
self.pushUrl = self._Get('pushurl')
|
||||
self.review = self._Get('review')
|
||||
self.projectname = self._Get('projectname')
|
||||
self.fetch = list(map(RefSpec.FromString,
|
||||
@ -701,6 +702,10 @@ class Remote(object):
|
||||
"""Save this remote to the configuration.
|
||||
"""
|
||||
self._Set('url', self.url)
|
||||
if self.pushUrl is not None:
|
||||
self._Set('pushurl', self.pushUrl + '/' + self.projectname)
|
||||
else:
|
||||
self._Set('pushurl', self.pushUrl)
|
||||
self._Set('review', self.review)
|
||||
self._Set('projectname', self.projectname)
|
||||
self._Set('fetch', list(map(str, self.fetch)))
|
||||
|
Reference in New Issue
Block a user