Commit dabbea27 authored by hinoka@google.com's avatar hinoka@google.com

add --ignore-submodules to apply_issue.py

Apply_issue should not try to check if there are modified files within submodules.

BUG=

Review URL: https://codereview.chromium.org/246093002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265115 0039d316-1c4b-4281-b951-d872f2087c98
parent 6cd41b69
...@@ -616,7 +616,7 @@ class GitCheckout(CheckoutBase): ...@@ -616,7 +616,7 @@ class GitCheckout(CheckoutBase):
def _sync_remote_branch(self): def _sync_remote_branch(self):
"""Syncs the remote branch.""" """Syncs the remote branch."""
# We do a 'git pull origin master:refs/remotes/origin/master' instead of # We do a 'git pull origin master:refs/remotes/origin/master' instead of
# 'git pull origin master' because from the manpage for git-pull: # 'git pull origin master' because from the manpage for git-pull:
# A parameter <ref> without a colon is equivalent to <ref>: when # A parameter <ref> without a colon is equivalent to <ref>: when
# pulling/fetching, so it merges <ref> into the current branch without # pulling/fetching, so it merges <ref> into the current branch without
# storing the remote branch anywhere locally. # storing the remote branch anywhere locally.
...@@ -631,7 +631,7 @@ class GitCheckout(CheckoutBase): ...@@ -631,7 +631,7 @@ class GitCheckout(CheckoutBase):
"""Gets the current revision (in unicode) from the local branch.""" """Gets the current revision (in unicode) from the local branch."""
return unicode(self._check_output_git(['rev-parse', 'HEAD']).strip()) return unicode(self._check_output_git(['rev-parse', 'HEAD']).strip())
def apply_patch(self, patches, post_processors=None, verbose=False, def apply_patch(self, patches, post_processors=None, verbose=False,
name=None, email=None): name=None, email=None):
"""Applies a patch on 'working_branch' and switches to it. """Applies a patch on 'working_branch' and switches to it.
...@@ -723,7 +723,7 @@ class GitCheckout(CheckoutBase): ...@@ -723,7 +723,7 @@ class GitCheckout(CheckoutBase):
base_ref = '%s/%s' % (self.remote, base_ref = '%s/%s' % (self.remote,
self.remote_branch or self.master_branch) self.remote_branch or self.master_branch)
found_files = self._check_output_git( found_files = self._check_output_git(
['diff', base_ref, ['diff', base_ref, '--ignore-submodules',
'--name-only']).splitlines(False) '--name-only']).splitlines(False)
assert sorted(patches.filenames) == sorted(found_files), ( assert sorted(patches.filenames) == sorted(found_files), (
sorted(patches.filenames), sorted(found_files)) sorted(patches.filenames), sorted(found_files))
...@@ -735,7 +735,7 @@ class GitCheckout(CheckoutBase): ...@@ -735,7 +735,7 @@ class GitCheckout(CheckoutBase):
current_branch = self._check_output_git( current_branch = self._check_output_git(
['rev-parse', '--abbrev-ref', 'HEAD']).strip() ['rev-parse', '--abbrev-ref', 'HEAD']).strip()
assert current_branch == self.working_branch assert current_branch == self.working_branch
commit_cmd = ['commit', '--amend', '-m', commit_message] commit_cmd = ['commit', '--amend', '-m', commit_message]
if user and user != self.commit_user: if user and user != self.commit_user:
# We do not have the first or last name of the user, grab the username # We do not have the first or last name of the user, grab the username
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment