Title: [139399] trunk/Tools
- Revision
- 139399
- Author
- [email protected]
- Date
- 2013-01-10 19:18:36 -0800 (Thu, 10 Jan 2013)
Log Message
Fixing AuthenticationError when running test-webkitpy as a non-committer.
https://bugs.webkit.org/show_bug.cgi?id=106420
Patch by Tim 'mithro' Ansell <[email protected]> on 2013-01-10
Reviewed by Eric Seidel.
* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.push_local_commits_to_server):
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVNRepository):
(SVNRepository.has_authorization_for_realm):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (139398 => 139399)
--- trunk/Tools/ChangeLog 2013-01-11 03:00:10 UTC (rev 139398)
+++ trunk/Tools/ChangeLog 2013-01-11 03:18:36 UTC (rev 139399)
@@ -1,3 +1,17 @@
+2013-01-10 Tim 'mithro' Ansell <[email protected]>
+
+ Fixing AuthenticationError when running test-webkitpy as a non-committer.
+ https://bugs.webkit.org/show_bug.cgi?id=106420
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.push_local_commits_to_server):
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVNRepository):
+ (SVNRepository.has_authorization_for_realm):
+
2013-01-10 Christophe Dumez <[email protected]>
[EFL][jhbuild] Use tarballs for gstreamer instead of git
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py (139398 => 139399)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2013-01-11 03:00:10 UTC (rev 139398)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2013-01-11 03:18:36 UTC (rev 139399)
@@ -452,8 +452,8 @@
def push_local_commits_to_server(self, username=None, password=None):
dcommit_command = ['svn', 'dcommit']
- if (not username or not password) and not self.has_authorization_for_realm(SVN.svn_server_realm):
- raise AuthenticationError(SVN.svn_server_host, prompt_for_password=True)
+ if (not username or not password) and not self.has_authorization_for_realm(self.svn_server_realm):
+ raise AuthenticationError(self.svn_server_host, prompt_for_password=True)
if username:
dcommit_command.extend(["--username", username])
output = self._run_git(dcommit_command, error_handler=commit_error_handler, input=password)
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py (139398 => 139399)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py 2013-01-11 03:00:10 UTC (rev 139398)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py 2013-01-11 03:18:36 UTC (rev 139399)
@@ -125,7 +125,7 @@
# Exists to share svn repository creation code between the git and svn tests
-class SVNTestRepository:
+class SVNTestRepository(object):
@classmethod
def _svn_add(cls, path):
run_command(["svn", "add", path])
@@ -626,6 +626,7 @@
SVNTestRepository.setup(self)
os.chdir(self.svn_checkout_path)
self.scm = detect_scm_system(self.svn_checkout_path)
+ self.scm.svn_server_realm = None
# For historical reasons, we test some checkout code here too.
self.checkout = Checkout(self.scm)
@@ -714,7 +715,7 @@
self._shared_test_commit_with_message("[email protected]")
def test_commit_without_authorization(self):
- self.scm.has_authorization_for_realm = lambda realm: False
+ self.scm.svn_server_realm = SVN.svn_server_realm
self.assertRaises(AuthenticationError, self._shared_test_commit_with_message)
def test_has_authorization_for_realm_using_credentials_with_passtype(self):
@@ -1004,7 +1005,7 @@
def test_head_svn_revision(self):
scm = detect_scm_system(self.untracking_checkout_path)
- # If we cloned a git repo tracking an SVG repo, this would give the same result as
+ # If we cloned a git repo tracking an SVN repo, this would give the same result as
# self._shared_test_head_svn_revision().
self.assertEqual(scm.head_svn_revision(), '')
@@ -1038,6 +1039,7 @@
SVNTestRepository.setup(self)
self._setup_git_checkout()
self.scm = detect_scm_system(self.git_checkout_path)
+ self.scm.svn_server_realm = None
# For historical reasons, we test some checkout code here too.
self.checkout = Checkout(self.scm)
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py (139398 => 139399)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py 2013-01-11 03:00:10 UTC (rev 139398)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py 2013-01-11 03:18:36 UTC (rev 139399)
@@ -43,8 +43,15 @@
# A mixin class that represents common functionality for SVN and Git-SVN.
-class SVNRepository:
+class SVNRepository(object):
+ # FIXME: These belong in common.config.urls
+ svn_server_host = "svn.webkit.org"
+ svn_server_realm = "<http://svn.webkit.org:80> Mac OS Forge"
+
def has_authorization_for_realm(self, realm, home_directory=os.getenv("HOME")):
+ # If we are working on a file:// repository realm will be None
+ if realm is None:
+ return True
# ignore false positives for methods implemented in the mixee class. pylint: disable-msg=E1101
# Assumes find and grep are installed.
if not os.path.isdir(os.path.join(home_directory, ".subversion")):
@@ -63,9 +70,6 @@
class SVN(SCM, SVNRepository):
- # FIXME: These belong in common.config.urls
- svn_server_host = "svn.webkit.org"
- svn_server_realm = "<http://svn.webkit.org:80> Mac OS Forge"
executable_name = "svn"
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes