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

Side by Side Diff: git_cl.py

Issue 7147016: Need to strip the config result value otherwise it contains a \n. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 5
6 # Copyright (C) 2008 Evan Martin <martine@danga.com> 6 # Copyright (C) 2008 Evan Martin <martine@danga.com>
7 7
8 """A git-command for integrating reviews on Rietveld.""" 8 """A git-command for integrating reviews on Rietveld."""
9 9
10 import errno 10 import errno
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 if issue: 526 if issue:
527 description = self.GetDescription() 527 description = self.GetDescription()
528 else: 528 else:
529 # If the change was never uploaded, use the log messages of all commits 529 # If the change was never uploaded, use the log messages of all commits
530 # up to the branch point, as git cl upload will prefill the description 530 # up to the branch point, as git cl upload will prefill the description
531 # with these log messages. 531 # with these log messages.
532 description = RunCommand(['git', 'log', '--pretty=format:%s%n%n%b', 532 description = RunCommand(['git', 'log', '--pretty=format:%s%n%n%b',
533 '%s...' % (upstream_branch)]).strip() 533 '%s...' % (upstream_branch)]).strip()
534 534
535 if not author: 535 if not author:
536 author = RunGit(['config', 'user.email']) 536 author = RunGit(['config', 'user.email']).strip()
537 change = presubmit_support.GitChange( 537 change = presubmit_support.GitChange(
538 name, 538 name,
539 description, 539 description,
540 absroot, 540 absroot,
541 files, 541 files,
542 issue, 542 issue,
543 patchset, 543 patchset,
544 author) 544 author)
545 545
546 # Apply watchlists on upload. 546 # Apply watchlists on upload.
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1479 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1480 1480
1481 # Not a known command. Default to help. 1481 # Not a known command. Default to help.
1482 GenUsage(parser, 'help') 1482 GenUsage(parser, 'help')
1483 return CMDhelp(parser, argv) 1483 return CMDhelp(parser, argv)
1484 1484
1485 1485
1486 if __name__ == '__main__': 1486 if __name__ == '__main__':
1487 fix_encoding.fix_encoding() 1487 fix_encoding.fix_encoding()
1488 sys.exit(main(sys.argv[1:])) 1488 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698