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

Unified Diff: presubmit_support.py

Issue 125051: Fix gcl breakage. (Closed)
Patch Set: Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcl.py ('k') | tests/gcl_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index 9275dbc98eb6e0d8c0b2c2a8a1237a9bc87ad18a..91fcd047e7e142d36f9ef98d64808c7780f83510 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -516,7 +516,7 @@ class GclChange(object):
# plus the description minus all key/value or "tag" lines.
self._description_without_tags = []
self.tags = {}
- for line in change_info.description.splitlines():
+ for line in self._full_description.splitlines():
m = self._tag_line_re.match(line)
if m:
self.tags[m.group('key')] = m.group('value')
@@ -726,7 +726,7 @@ def DoPresubmitChecks(change_info,
True if execution can continue, False if not.
"""
presubmit_files = ListRelevantPresubmitFiles(change_info.GetFileNames(),
- change_info.local_root)
+ change_info.GetLocalRoot())
if not presubmit_files and verbose:
output_stream.write("Warning, no presubmit.py found.\n")
results = []
@@ -734,7 +734,7 @@ def DoPresubmitChecks(change_info,
if default_presubmit:
if verbose:
output_stream.write("Running default presubmit script.\n")
- fake_path = os.path.join(change_info.local_root, 'PRESUBMIT.py')
+ fake_path = os.path.join(change_info.GetLocalRoot(), 'PRESUBMIT.py')
results += executer.ExecPresubmitScript(default_presubmit, fake_path)
for filename in presubmit_files:
filename = os.path.abspath(filename)
@@ -809,7 +809,8 @@ def Main(argv):
files = ParseFiles(args, options.recursive)
if options.verbose:
print "Found %d files." % len(files)
- return not DoPresubmitChecks(gcl.ChangeInfo('No name', 0, 0, '', files),
+ return not DoPresubmitChecks(gcl.ChangeInfo('No name', 0, 0, '', files,
+ gcl.GetRepositoryRoot()),
options.commit,
options.verbose,
sys.stdout,
« no previous file with comments | « gcl.py ('k') | tests/gcl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698