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

Side by Side Diff: drover.py

Issue 292052: Add --ignore-history to merge command (only applicable to branch merges). (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 2 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 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import optparse 5 import optparse
6 import os 6 import os
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 import webbrowser 10 import webbrowser
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 os.system(command) 165 os.system(command)
166 166
167 def mergeRevision(url, revision): 167 def mergeRevision(url, revision):
168 paths = getBestMergePaths(url, revision) 168 paths = getBestMergePaths(url, revision)
169 export_map = getBestExportPathsMap(url, revision) 169 export_map = getBestExportPathsMap(url, revision)
170 170
171 for path in paths: 171 for path in paths:
172 if export_map.has_key(path): 172 if export_map.has_key(path):
173 continue 173 continue
174 command = ('svn merge -N -r ' + str(revision-1) + ":" + str(revision) + " ") 174 command = ('svn merge -N -r ' + str(revision-1) + ":" + str(revision) + " ")
175 command = command + url + path + "@" + str(revision) + " ." + path 175 command += " --ignore-ancestry "
176 command += url + path + "@" + str(revision) + " ." + path
176 177
177 print command 178 print command
178 os.system(command) 179 os.system(command)
179 180
180 def exportRevision(url, revision): 181 def exportRevision(url, revision):
181 paths = getBestExportPathsMap(url, revision).keys() 182 paths = getBestExportPathsMap(url, revision).keys()
182 paths.sort() 183 paths.sort()
183 184
184 for path in paths: 185 for path in paths:
185 command = ('svn export -N ' + url + path + "@" + str(revision) + " ." + 186 command = ('svn export -N ' + url + path + "@" + str(revision) + " ." +
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 464
464 if not options.merge and not options.revert: 465 if not options.merge and not options.revert:
465 option_parser.error("You need at least --merge or --revert") 466 option_parser.error("You need at least --merge or --revert")
466 sys.exit(1) 467 sys.exit(1)
467 468
468 if options.merge and not options.branch: 469 if options.merge and not options.branch:
469 option_parser.error("--merge requires a --branch") 470 option_parser.error("--merge requires a --branch")
470 sys.exit(1) 471 sys.exit(1)
471 472
472 sys.exit(main(options, args)) 473 sys.exit(main(options, args))
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