Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5423)

Unified Diff: Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py

Issue 397383002: Fix webkitpy scm_unittests so that they pass again. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: patch for review Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
diff --git a/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py b/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
index 2b172ecff8d419fb3304441d253d9ddff3250c23..795eea1bf7f9b3069ee333491ac95ac14288a022 100644
--- a/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
@@ -380,6 +380,11 @@ class GitSVNTest(SCMTestBase):
# --quiet doesn't make git svn silent
self._run_silent(['git', 'svn', 'clone', '-T', 'trunk', self.svn_repo_url, self.git_checkout_path])
self._chdir(self.git_checkout_path)
+ self.git_v2 = self._run(['git', '--version']).startswith('git version 2')
+ if self.git_v2:
+ # The semantics of 'git svn clone -T' changed in v2 (apparently), so the branch names are different.
+ # This works around it, for compatibility w/ v1.
+ self._run_silent(['git', 'branch', 'trunk', 'origin/trunk'])
def _tear_down_gitsvn_checkout(self):
self._rmtree(self.git_checkout_path)
@@ -486,7 +491,11 @@ class GitSVNTest(SCMTestBase):
self.assertEqual(self.scm._upstream_branch(), 'my-branch')
def test_remote_branch_ref(self):
- self.assertEqual(self.scm._remote_branch_ref(), 'refs/remotes/trunk')
+ remote_branch_ref = self.scm._remote_branch_ref()
+ if self.git_v2:
+ self.assertEqual(remote_branch_ref, 'refs/remotes/origin/trunk')
+ else:
+ self.assertEqual(remote_branch_ref, 'refs/remotes/trunk')
def test_create_patch_local_plus_working_copy(self):
self._one_local_commit_plus_working_copy_changes()
« no previous file with comments | « Tools/Scripts/webkitpy/common/checkout/scm/scm.py ('k') | Tools/Scripts/webkitpy/common/checkout/scm/svn.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698