 Chromium Code Reviews
 Chromium Code Reviews Issue 10383004:
  Trim message posted to rietveld to 10000.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
    
  
    Issue 10383004:
  Trim message posted to rietveld to 10000.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools| Index: rietveld.py | 
| diff --git a/rietveld.py b/rietveld.py | 
| index 70c64441fc31a01820c6a59466a6bdb4286c0be6..835f24c2a8a35d11257c8b0282848b83f2e86f88 100644 | 
| --- a/rietveld.py | 
| +++ b/rietveld.py | 
| @@ -1,3 +1,4 @@ | 
| +# coding: utf-8 | 
| # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| # Use of this source code is governed by a BSD-style license that can be | 
| # found in the LICENSE file. | 
| @@ -217,6 +218,10 @@ class Rietveld(object): | 
| ('xsrf_token', self.xsrf_token())]) | 
| def add_comment(self, issue, message): | 
| + max_message = 10000 | 
| + tail = '…\n(message too large)' | 
| + if len(message) > max_message: | 
| + message = message[:max_message-len(tail)] + tail | 
| 
Peter Mayo (wrong one)
2012/05/04 03:05:36
Thanks for catching the "max_message - "
Why doesn
 | 
| logging.info('issue %s; comment: %s' % (issue, message)) | 
| return self.post('/%s/publish' % issue, [ | 
| ('xsrf_token', self.xsrf_token()), |