summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/webkitpy/common
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/common')
-rw-r--r--WebKitTools/Scripts/webkitpy/common/checkout/scm.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py15
-rw-r--r--WebKitTools/Scripts/webkitpy/common/config/committers.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/common/net/rietveld.py7
-rw-r--r--WebKitTools/Scripts/webkitpy/common/system/user.py13
5 files changed, 27 insertions, 12 deletions
diff --git a/WebKitTools/Scripts/webkitpy/common/checkout/scm.py b/WebKitTools/Scripts/webkitpy/common/checkout/scm.py
index e68ccfa..eea76be 100644
--- a/WebKitTools/Scripts/webkitpy/common/checkout/scm.py
+++ b/WebKitTools/Scripts/webkitpy/common/checkout/scm.py
@@ -609,7 +609,7 @@ class Git(SCM):
return squash
def _svn_branch_has_extra_commits(self):
- return len(run_command(['git', 'rev-list', '--max-count=1', self.svn_branch_name(), '^head']))
+ return len(run_command(['git', 'rev-list', '--max-count=1', self.svn_branch_name(), '^HEAD']))
def commit_with_message(self, message, username=None, git_commit=None, squash=None):
# Username is ignored during Git commits.
diff --git a/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py b/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py
index b6ae388..8eea4d8 100644
--- a/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py
@@ -813,6 +813,12 @@ class GitTest(SCMTest):
run_command(['git', 'add', 'test_file_commit2'])
self.scm.commit_locally_with_message("yet another test commit")
+ def _three_local_commits(self):
+ write_into_file_at_path('test_file_commit0', 'more test content')
+ run_command(['git', 'add', 'test_file_commit0'])
+ self.scm.commit_locally_with_message("another test commit")
+ self._two_local_commits()
+
def test_commit_with_message_git_commit(self):
self._two_local_commits()
@@ -825,13 +831,14 @@ class GitTest(SCMTest):
self.assertFalse(re.search(r'test_file_commit2', svn_log))
def test_commit_with_message_git_commit_range(self):
- self._two_local_commits()
+ self._three_local_commits()
scm = detect_scm_system(self.git_checkout_path)
commit_text = scm.commit_with_message("another test commit", git_commit="HEAD~2..HEAD")
self.assertEqual(scm.svn_revision_from_commit_text(commit_text), '6')
svn_log = run_command(['git', 'svn', 'log', '--limit=1', '--verbose'])
+ self.assertFalse(re.search(r'test_file_commit0', svn_log))
self.assertTrue(re.search(r'test_file_commit1', svn_log))
self.assertTrue(re.search(r'test_file_commit2', svn_log))
@@ -922,9 +929,10 @@ class GitTest(SCMTest):
self.assertFalse(re.search(r'test_file_commit2', patch))
def test_create_patch_git_commit_range(self):
- self._two_local_commits()
+ self._three_local_commits()
scm = detect_scm_system(self.git_checkout_path)
patch = scm.create_patch(git_commit="HEAD~2..HEAD")
+ self.assertFalse(re.search(r'test_file_commit0', patch))
self.assertTrue(re.search(r'test_file_commit2', patch))
self.assertTrue(re.search(r'test_file_commit1', patch))
@@ -1007,9 +1015,10 @@ class GitTest(SCMTest):
self.assertFalse('test_file_commit2' in files)
def test_changed_files_git_commit_range(self):
- self._two_local_commits()
+ self._three_local_commits()
scm = detect_scm_system(self.git_checkout_path)
files = scm.changed_files(git_commit="HEAD~2..HEAD")
+ self.assertTrue('test_file_commit0' not in files)
self.assertTrue('test_file_commit1' in files)
self.assertTrue('test_file_commit2' in files)
diff --git a/WebKitTools/Scripts/webkitpy/common/config/committers.py b/WebKitTools/Scripts/webkitpy/common/config/committers.py
index 02f1aed..d9c541f 100644
--- a/WebKitTools/Scripts/webkitpy/common/config/committers.py
+++ b/WebKitTools/Scripts/webkitpy/common/config/committers.py
@@ -86,7 +86,6 @@ committers_unable_to_review = [
Committer("Carol Szabo", "carol.szabo@nokia.com"),
Committer("Chang Shu", "Chang.Shu@nokia.com"),
Committer("Chris Evans", "cevans@google.com"),
- Committer("Chris Fleizach", "cfleizach@apple.com"),
Committer("Chris Marrin", "cmarrin@apple.com", "cmarrin"),
Committer("Chris Petersen", "cpetersen@apple.com", "cpetersen"),
Committer("Christian Dywan", ["christian@twotoasts.de", "christian@webkit.org"]),
@@ -193,6 +192,7 @@ reviewers_list = [
Reviewer("Brady Eidson", "beidson@apple.com", "bradee-oh"),
Reviewer("Cameron Zwarich", ["zwarich@apple.com", "cwzwarich@apple.com", "cwzwarich@webkit.org"]),
Reviewer("Chris Blumenberg", "cblu@apple.com", "cblu"),
+ Reviewer("Chris Fleizach", "cfleizach@apple.com", "cfleizach"),
Reviewer("Chris Jerdonek", "cjerdonek@webkit.org", "cjerdonek"),
Reviewer("Dan Bernstein", ["mitz@webkit.org", "mitz@apple.com"], "mitzpettel"),
Reviewer("Daniel Bates", "dbates@webkit.org", "dydz"),
diff --git a/WebKitTools/Scripts/webkitpy/common/net/rietveld.py b/WebKitTools/Scripts/webkitpy/common/net/rietveld.py
index c0d6119..572d1fd 100644
--- a/WebKitTools/Scripts/webkitpy/common/net/rietveld.py
+++ b/WebKitTools/Scripts/webkitpy/common/net/rietveld.py
@@ -67,15 +67,8 @@ class Rietveld(object):
log("Would have run %s" % args)
return
- # Set logging level to avoid rietveld's logging spew.
- old_level_name = logging.getLogger().getEffectiveLevel()
- logging.getLogger().setLevel(logging.ERROR)
-
# Use RealMain instead of calling upload from the commandline so that
# we can pass in the diff ourselves. Otherwise, upload will just use
# git diff for git checkouts, which doesn't respect --squash and --git-commit.
issue, patchset = upload.RealMain(args[1:], data=diff)
-
- # Reset logging level to the original value.
- logging.getLogger().setLevel(old_level_name)
return issue
diff --git a/WebKitTools/Scripts/webkitpy/common/system/user.py b/WebKitTools/Scripts/webkitpy/common/system/user.py
index 4fa2fa3..82fa0d3 100644
--- a/WebKitTools/Scripts/webkitpy/common/system/user.py
+++ b/WebKitTools/Scripts/webkitpy/common/system/user.py
@@ -76,6 +76,19 @@ class User(object):
# Note: Not thread safe: http://bugs.python.org/issue2320
subprocess.call(args + files)
+ def edit_changelog(self, files):
+ edit_application = os.environ.get("CHANGE_LOG_EDIT_APPLICATION")
+ if edit_application and sys.platform == "darwin":
+ # On Mac we support editing ChangeLogs using an application.
+ args = shlex.split(edit_application)
+ print "Using editor in the CHANGE_LOG_EDIT_APPLICATION environment variable."
+ print "Please quit the editor application when done editing."
+ if edit_application.find("Xcode.app"):
+ print "Instead of using Xcode.app, consider using EDITOR=\"xed --wait\"."
+ subprocess.call(["open", "-W", "-n", "-a"] + args + files)
+ return
+ self.edit(files)
+
def page(self, message):
pager = os.environ.get("PAGER") or "less"
try: