Modified: trunk/Tools/ChangeLog (174050 => 174051)
--- trunk/Tools/ChangeLog 2014-09-29 02:13:41 UTC (rev 174050)
+++ trunk/Tools/ChangeLog 2014-09-29 03:02:01 UTC (rev 174051)
@@ -1,3 +1,18 @@
+2014-09-28 Myles C. Maxfield <[email protected]>
+
+ Allow webkit-patch upload to respect the --directory argument with git checkouts
+ https://bugs.webkit.org/show_bug.cgi?id=137166
+
+ Reviewed by Darin Adler.
+
+ We simply hadn't plumbed it through.
+
+ * Scripts/webkitpy/common/checkout/scm/detection.py:
+ (SCMDetector.detect_scm_system):
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.__init__):
+ (Git.changed_files):
+
2014-09-26 Sam Weinig <[email protected]>
Replace OSObjectPtr with RetainPtr/adoptOS
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py (174050 => 174051)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py 2014-09-29 02:13:41 UTC (rev 174050)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/detection.py 2014-09-29 03:02:01 UTC (rev 174051)
@@ -72,7 +72,7 @@
return SVN(cwd=absolute_path, patch_directories=patch_directories, filesystem=self._filesystem, executive=self._executive)
if Git.in_working_directory(absolute_path, executive=self._executive):
- return Git(cwd=absolute_path, filesystem=self._filesystem, executive=self._executive)
+ return Git(cwd=absolute_path, patch_directories=patch_directories, filesystem=self._filesystem, executive=self._executive)
return None
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py (174050 => 174051)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2014-09-29 02:13:41 UTC (rev 174050)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py 2014-09-29 03:02:01 UTC (rev 174051)
@@ -58,9 +58,15 @@
executable_name = 'git'
- def __init__(self, cwd, **kwargs):
+ def __init__(self, cwd, patch_directories, **kwargs):
SCM.__init__(self, cwd, **kwargs)
self._check_git_architecture()
+ if patch_directories == []:
+ raise Exception(message='Empty list of patch directories passed to SCM.__init__')
+ elif patch_directories == None:
+ self._patch_directories = [self._filesystem.relpath(cwd, self.checkout_root)]
+ else:
+ self._patch_directories = patch_directories
def _machine_is_64bit(self):
import platform
@@ -204,6 +210,7 @@
def changed_files(self, git_commit=None):
# FIXME: --diff-filter could be used to avoid the "extract_filenames" step.
status_command = [self.executable_name, 'diff', '-r', '--name-status', "--no-renames", "--no-ext-diff", "--full-index", self.merge_base(git_commit)]
+ status_command.extend(self._patch_directories)
# FIXME: I'm not sure we're returning the same set of files that SVN.changed_files is.
# Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R)
return self.run_status_and_extract_filenames(status_command, self._status_regexp("ADM"))