Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: checkout.py

Issue 264823003: Add black/whitelisting to apply_issue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Updated assert message Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « apply_issue.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # coding=utf8 1 # coding=utf8
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 """Manages a project checkout. 5 """Manages a project checkout.
6 6
7 Includes support for svn, git-svn and git. 7 Includes support for svn, git-svn and git.
8 """ 8 """
9 9
10 import ConfigParser 10 import ConfigParser
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 self._check_call_git(cmd) 719 self._check_call_git(cmd)
720 if self.base_ref: 720 if self.base_ref:
721 base_ref = self.base_ref 721 base_ref = self.base_ref
722 else: 722 else:
723 base_ref = '%s/%s' % (self.remote, 723 base_ref = '%s/%s' % (self.remote,
724 self.remote_branch or self.master_branch) 724 self.remote_branch or self.master_branch)
725 found_files = self._check_output_git( 725 found_files = self._check_output_git(
726 ['diff', base_ref, '--ignore-submodules', 726 ['diff', base_ref, '--ignore-submodules',
727 '--name-only']).splitlines(False) 727 '--name-only']).splitlines(False)
728 assert sorted(patches.filenames) == sorted(found_files), ( 728 assert sorted(patches.filenames) == sorted(found_files), (
729 sorted(patches.filenames), sorted(found_files)) 729 'Found extra %s locally, %s not patched' % (
730 sorted(set(found_files) - set(patches.filenames)),
731 sorted(set(patches.filenames) - set(found_files))))
730 732
731 def commit(self, commit_message, user): 733 def commit(self, commit_message, user):
732 """Commits, updates the commit message and pushes.""" 734 """Commits, updates the commit message and pushes."""
733 assert self.commit_user 735 assert self.commit_user
734 assert isinstance(commit_message, unicode) 736 assert isinstance(commit_message, unicode)
735 current_branch = self._check_output_git( 737 current_branch = self._check_output_git(
736 ['rev-parse', '--abbrev-ref', 'HEAD']).strip() 738 ['rev-parse', '--abbrev-ref', 'HEAD']).strip()
737 assert current_branch == self.working_branch 739 assert current_branch == self.working_branch
738 740
739 commit_cmd = ['commit', '--amend', '-m', commit_message] 741 commit_cmd = ['commit', '--amend', '-m', commit_message]
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 def revisions(self, rev1, rev2): 839 def revisions(self, rev1, rev2):
838 return self.checkout.revisions(rev1, rev2) 840 return self.checkout.revisions(rev1, rev2)
839 841
840 @property 842 @property
841 def project_name(self): 843 def project_name(self):
842 return self.checkout.project_name 844 return self.checkout.project_name
843 845
844 @property 846 @property
845 def project_path(self): 847 def project_path(self):
846 return self.checkout.project_path 848 return self.checkout.project_path
OLDNEW
« no previous file with comments | « apply_issue.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698