Bug 1554987 - Invoke git push with a remote name for mach try. r=ahal
☠☠ backed out by e4f9cc8d6314 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Mon, 24 Jun 2019 14:40:21 +0000
changeset 542806 21826fb830de97ce71635ad784acf5a0b0bf237c
parent 542805 7877de0a1529873bca86c012608249e7bf4cae2d
child 542807 e1d6f371446fbfa3c37d6ff6a863d7fb743b2dc0
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1554987
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1554987 - Invoke git push with a remote name for mach try. r=ahal The git version shipped in some versions of OSX is patched by apple in a way such that doing `git push hg::ssh://...` fails with an error message like `Invalid remote name "hg::ssh://...`. So instead, we define a named remote via inline configuration, and use that remote's name for the push. Differential Revision: https://phabricator.services.mozilla.com/D35351
python/mozversioncontrol/mozversioncontrol/__init__.py
--- a/python/mozversioncontrol/mozversioncontrol/__init__.py
+++ b/python/mozversioncontrol/mozversioncontrol/__init__.py
@@ -451,17 +451,21 @@ class GitRepository(Repository):
         return not len(self._run(*args).strip())
 
     def push_to_try(self, message):
         if not self.has_git_cinnabar:
             raise MissingVCSExtension('cinnabar')
 
         self._run('commit', '--allow-empty', '-m', message)
         try:
-            subprocess.check_call((self._tool, 'push', 'hg::ssh://hg.mozilla.org/try',
+            subprocess.check_call((self._tool,
+                                   '-c',
+                                   'remote.try.url=hg::ssh://hg.mozilla.org/try',
+                                   'push',
+                                   'try',
                                    '+HEAD:refs/heads/branches/default/tip'), cwd=self.path)
         finally:
             self._run('reset', 'HEAD~')
 
 
 def get_repository_object(path, hg='hg', git='git'):
     '''Get a repository object for the repository at `path`.
     If `path` is not a known VCS repository, raise an exception.