Title: [92632] trunk/Tools
Revision
92632
Author
[email protected]
Date
2011-08-08 14:04:31 -0700 (Mon, 08 Aug 2011)

Log Message

Fix SCM webkitpy unit test failures
https://bugs.webkit.org/show_bug.cgi?id=65823

Patch by Jochen Eisinger <[email protected]> on 2011-08-08
Reviewed by Eric Seidel.

* Scripts/webkitpy/common/checkout/scm/git.py:
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (92631 => 92632)


--- trunk/Tools/ChangeLog	2011-08-08 20:49:33 UTC (rev 92631)
+++ trunk/Tools/ChangeLog	2011-08-08 21:04:31 UTC (rev 92632)
@@ -1,3 +1,13 @@
+2011-08-08  Jochen Eisinger  <[email protected]>
+
+        Fix SCM webkitpy unit test failures
+        https://bugs.webkit.org/show_bug.cgi?id=65823
+
+        Reviewed by Eric Seidel.
+
+        * Scripts/webkitpy/common/checkout/scm/git.py:
+        * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+
 2011-08-08  Eric Seidel  <[email protected]>
 
         Move the --leaks bot back over to NRWT now that I'm back

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py (92631 => 92632)


--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py	2011-08-08 20:49:33 UTC (rev 92631)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py	2011-08-08 21:04:31 UTC (rev 92632)
@@ -202,6 +202,10 @@
         return self._changes_files_for_commit(commit_id)
 
     def revisions_changing_file(self, path, limit=5):
+        # raise a script error if path does not exists to match the behavior of  the svn implementation.
+        if not self._filesystem.exists(path):
+            raise ScriptError(message="Path %s does not exist." % path)
+
         # git rev-list head --remove-empty --limit=5 -- path would be equivalent.
         commit_ids = self.run(["git", "log", "--remove-empty", "--pretty=format:%H", "-%s" % limit, "--", path]).splitlines()
         return filter(lambda revision: revision, map(self.svn_revision_from_git_commit, commit_ids))

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py (92631 => 92632)


--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py	2011-08-08 20:49:33 UTC (rev 92631)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py	2011-08-08 21:04:31 UTC (rev 92632)
@@ -558,7 +558,7 @@
 +++ ChangeLog	(working copy)
 @@ -1,5 +1,13 @@
  2009-10-26  Eric Seidel  <[email protected]>
-
+%(whitespace)s
 +        Reviewed by NOBODY (OOPS!).
 +
 +        Second most awesome change ever.
@@ -568,9 +568,9 @@
 +2009-10-26  Eric Seidel  <[email protected]>
 +
          Reviewed by Foo Bar.
-
+%(whitespace)s
          Most awesome change ever.
-"""
+""" % {'whitespace': ' '}
         _one_line_overlap_entry_ = """DATE_HERE  Eric Seidel  <[email protected]>
 
         Reviewed by REVIEWER_HERE.
@@ -584,9 +584,9 @@
 --- ChangeLog	(revision 5)
 +++ ChangeLog	(working copy)
 @@ -2,6 +2,14 @@
-
+%(whitespace)s
          Reviewed by Foo Bar.
-
+%(whitespace)s
 +        Second most awesome change ever.
 +
 +        * scm_unittest.py:
@@ -596,9 +596,9 @@
 +        Reviewed by Foo Bar.
 +
          Most awesome change ever.
-
+%(whitespace)s
          * scm_unittest.py:
-"""
+""" % {'whitespace': ' '}
         two_line_overlap_entry = """DATE_HERE  Eric Seidel  <[email protected]>
 
         Reviewed by Foo Bar.
@@ -946,7 +946,7 @@
     def test_create_patch(self):
         write_into_file_at_path('test_file_commit1', 'contents')
         run_command(['git', 'add', 'test_file_commit1'])
-        scm = detect_scm_system(self.untracking_checkout_path)
+        scm = self.tracking_scm
         scm.commit_locally_with_message('message')
 
         patch = scm.create_patch()
@@ -1511,7 +1511,7 @@
 
     def test_create_patch(self):
         scm = self.make_scm(logging_executive=True)
-        expected_stderr = "MOCK run_command: ['git', 'merge-base', u'refs/remotes/origin/master', 'HEAD'], cwd=/mock-checkoutMOCK run_command: ['git', 'diff', '--binary', '--no-ext-diff', '--full-index', '-M', 'MOCK output of child process', '--'], cwd=/mock-checkoutMOCK run_command: ['git', 'log', '-25'], cwd=/mock-checkout\n"
+        expected_stderr = "MOCK run_command: ['git', 'merge-base', u'refs/remotes/origin/master', 'HEAD'], cwd=%(checkout)s\nMOCK run_command: ['git', 'diff', '--binary', '--no-ext-diff', '--full-index', '-M', 'MOCK output of child process', '--'], cwd=%(checkout)s\nMOCK run_command: ['git', 'log', '-25'], cwd=None\n" % {'checkout': scm.checkout_root}
         OutputCapture().assert_outputs(self, scm.create_patch, expected_stderr=expected_stderr)
 
     def test_push_local_commits_to_server_with_username_and_password(self):
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to