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

Side by Side Diff: git_cl.py

Issue 13801021: Change "git cl patch" to say "Committed patch locally." (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 7 years, 8 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
« 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) 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 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 json 10 import json
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 subprocess2.check_call(cmd, stdin=patch_data, stdout=subprocess2.VOID) 1628 subprocess2.check_call(cmd, stdin=patch_data, stdout=subprocess2.VOID)
1629 except subprocess2.CalledProcessError: 1629 except subprocess2.CalledProcessError:
1630 DieWithError('Failed to apply the patch') 1630 DieWithError('Failed to apply the patch')
1631 1631
1632 # If we had an issue, commit the current state and register the issue. 1632 # If we had an issue, commit the current state and register the issue.
1633 if not options.nocommit: 1633 if not options.nocommit:
1634 RunGit(['commit', '-m', 'patch from issue %s' % issue]) 1634 RunGit(['commit', '-m', 'patch from issue %s' % issue])
1635 cl = Changelist() 1635 cl = Changelist()
1636 cl.SetIssue(issue) 1636 cl.SetIssue(issue)
1637 cl.SetPatchset(patchset) 1637 cl.SetPatchset(patchset)
1638 print "Committed patch." 1638 print "Committed patch locally."
1639 else: 1639 else:
1640 print "Patch applied to index." 1640 print "Patch applied to index."
1641 return 0 1641 return 0
1642 1642
1643 1643
1644 def CMDrebase(parser, args): 1644 def CMDrebase(parser, args):
1645 """rebase current branch on top of svn repo""" 1645 """rebase current branch on top of svn repo"""
1646 # Provide a wrapper for git svn rebase to help avoid accidental 1646 # Provide a wrapper for git svn rebase to help avoid accidental
1647 # git svn dcommit. 1647 # git svn dcommit.
1648 # It's the only command that doesn't use parser at all since we just defer 1648 # It's the only command that doesn't use parser at all since we just defer
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1905 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1906 1906
1907 # Not a known command. Default to help. 1907 # Not a known command. Default to help.
1908 GenUsage(parser, 'help') 1908 GenUsage(parser, 'help')
1909 return CMDhelp(parser, argv) 1909 return CMDhelp(parser, argv)
1910 1910
1911 1911
1912 if __name__ == '__main__': 1912 if __name__ == '__main__':
1913 fix_encoding.fix_encoding() 1913 fix_encoding.fix_encoding()
1914 sys.exit(main(sys.argv[1:])) 1914 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