From d648045366b3710c834531295bd643bceb0c612c Mon Sep 17 00:00:00 2001 From: Steve Rae Date: Wed, 10 Aug 2016 15:00:00 -0700 Subject: 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 --- git_config.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'git_config.py') 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): 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))) -- cgit v1.2.3-54-g00ecf