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

Issue 528004: Catch ValueErrors when trying to convert the CL issue number in git presubmit... (Closed)

Created:
10 years, 11 months ago by Robert Sesek
Modified:
9 years, 7 months ago
Reviewers:
chase, M-A Ruel
CC:
chromium-reviews_googlegroups.com, M-A Ruel
Visibility:
Public.

Description

Catch ValueErrors when trying to convert the CL issue number in git presubmit hooks BUG=31695 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35816

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M git_cl_hooks.py View 1 chunk +3 lines, -3 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
Robert Sesek
10 years, 11 months ago (2010-01-08 19:56:34 UTC) #1
M-A Ruel
lgtm
10 years, 11 months ago (2010-01-08 20:03:13 UTC) #2
chase
http://codereview.chromium.org/528004/diff/1/2 File git_cl_hooks.py (right): http://codereview.chromium.org/528004/diff/1/2#newcode46 git_cl_hooks.py:46: description = gcl.GetIssueDescription(int(issue)) I suspect this code is a ...
10 years, 11 months ago (2010-01-08 20:15:56 UTC) #3
Robert Sesek
10 years, 11 months ago (2010-01-08 20:23:46 UTC) #4
http://codereview.chromium.org/528004/diff/1/2
File git_cl_hooks.py (right):

http://codereview.chromium.org/528004/diff/1/2#newcode46
git_cl_hooks.py:46: description = gcl.GetIssueDescription(int(issue))
On 2010/01/08 20:15:56, chase wrote:
> I suspect this code is a no-op on my system.. md5sum shows there's more in the
> stream than just printable ASCII characters:
> 
> cmp@cphillips4-corp:/work/chromium/src$ git cl status --field=id
> 528005
> cmp@cphillips4-corp:/work/chromium/src$ git cl status --field=id|md5sum
> 30814fb92261dfe2a4f8455401f9026f *-
> cmp@cphillips4-corp:/work/chromium/src$ echo 528005|md5sum
> 5dc84781c17e3b8188b3fc3cba92895c *-
> 
> I don't think a change to the hooks can fix this problem.  The original
explicit
> test for None was nice.  The real problem seems to be whether git-cl status is
> prepending an escape sequence to its status output.  It might be an accident
> that the output is unclean.  (A quick scan of git-cl reads like it shouldn't
be
> printing anything other than the issue number.)
> 
> Let's verify if this happens elsewhere.  Can you try the above command and lmk
> what you see on your system?

I'm on a Mac, FYI:

[src (gtk-cookie-test)] rsesek% git cl status --field=id       
529003
[src (gtk-cookie-test)] rsesek% git cl status --field=id|md5
54550ce93575ef51d3b6030e5e6fe891
[src (gtk-cookie-test)] rsesek% echo "529003"|md5           
54550ce93575ef51d3b6030e5e6fe891

Powered by Google App Engine
This is Rietveld 408576698