diff options
author | Steve Rae <steve.rae@raedomain.com> | 2016-08-10 15:00:00 -0700 |
---|---|---|
committer | Steve Rae <steve.rae@raedomain.com> | 2016-09-20 15:31:20 +0000 |
commit | d648045366b3710c834531295bd643bceb0c612c (patch) | |
tree | 3cb2563ade2dbc4617c3ed7b4517c86d17a4428e /git_config.py | |
parent | 628456833a9be237c7373254fbe0771b2e802a88 (diff) | |
download | git-repo-d648045366b3710c834531295bd643bceb0c612c.tar.gz |
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>
Diffstat (limited to 'git_config.py')
-rw-r--r-- | git_config.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/git_config.py b/git_config.py index f76cd04e..f474a1c9 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -572,6 +572,7 @@ class Remote(object): | |||
572 | self._config = config | 572 | self._config = config |
573 | self.name = name | 573 | self.name = name |
574 | self.url = self._Get('url') | 574 | self.url = self._Get('url') |
575 | self.pushUrl = self._Get('pushurl') | ||
575 | self.review = self._Get('review') | 576 | self.review = self._Get('review') |
576 | self.projectname = self._Get('projectname') | 577 | self.projectname = self._Get('projectname') |
577 | self.fetch = list(map(RefSpec.FromString, | 578 | self.fetch = list(map(RefSpec.FromString, |
@@ -701,6 +702,10 @@ class Remote(object): | |||
701 | """Save this remote to the configuration. | 702 | """Save this remote to the configuration. |
702 | """ | 703 | """ |
703 | self._Set('url', self.url) | 704 | self._Set('url', self.url) |
705 | if self.pushUrl is not None: | ||
706 | self._Set('pushurl', self.pushUrl + '/' + self.projectname) | ||
707 | else: | ||
708 | self._Set('pushurl', self.pushUrl) | ||
704 | self._Set('review', self.review) | 709 | self._Set('review', self.review) |
705 | self._Set('projectname', self.projectname) | 710 | self._Set('projectname', self.projectname) |
706 | self._Set('fetch', list(map(str, self.fetch))) | 711 | self._Set('fetch', list(map(str, self.fetch))) |