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

Side by Side Diff: git_cl.py

Issue 10543151: Add test for git-svn with submodule/merge layout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 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 | tests/abandon.sh » ('j') | 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 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 1138
1139 if settings.GetIsGerrit(): 1139 if settings.GetIsGerrit():
1140 return GerritUpload(options, args, cl) 1140 return GerritUpload(options, args, cl)
1141 return RietveldUpload(options, args, cl) 1141 return RietveldUpload(options, args, cl)
1142 1142
1143 1143
1144 def IsSubmoduleMergeCommit(ref): 1144 def IsSubmoduleMergeCommit(ref):
1145 # When submodules are added to the repo, we expect there to be a single 1145 # When submodules are added to the repo, we expect there to be a single
1146 # non-git-svn merge commit at remote HEAD with a signature comment. 1146 # non-git-svn merge commit at remote HEAD with a signature comment.
1147 pattern = '^SVN changes up to revision [0-9]*$' 1147 pattern = '^SVN changes up to revision [0-9]*$'
1148 cmd = ['rev-list', '--merges', '--grep="%s"' % pattern, '%s^!' % ref] 1148 cmd = ['rev-list', '--merges', '--grep=%s' % pattern, '%s^!' % ref]
1149 return RunGit(cmd) != '' 1149 return RunGit(cmd) != ''
1150 1150
1151 1151
1152 def SendUpstream(parser, args, cmd): 1152 def SendUpstream(parser, args, cmd):
1153 """Common code for CmdPush and CmdDCommit 1153 """Common code for CmdPush and CmdDCommit
1154 1154
1155 Squashed commit into a single. 1155 Squashed commit into a single.
1156 Updates changelog with metadata (e.g. pointer to review). 1156 Updates changelog with metadata (e.g. pointer to review).
1157 Pushes/dcommits the code upstream. 1157 Pushes/dcommits the code upstream.
1158 Updates review and closes. 1158 Updates review and closes.
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1600 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1601 1601
1602 # Not a known command. Default to help. 1602 # Not a known command. Default to help.
1603 GenUsage(parser, 'help') 1603 GenUsage(parser, 'help')
1604 return CMDhelp(parser, argv) 1604 return CMDhelp(parser, argv)
1605 1605
1606 1606
1607 if __name__ == '__main__': 1607 if __name__ == '__main__':
1608 fix_encoding.fix_encoding() 1608 fix_encoding.fix_encoding()
1609 sys.exit(main(sys.argv[1:])) 1609 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | tests/abandon.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698