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

Side by Side Diff: drover.py

Issue 22814005: When reverting, just reverse merge the entire revision. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 4 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) 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 import collections 6 import collections
7 import datetime 7 import datetime
8 import json 8 import json
9 import optparse 9 import optparse
10 import os 10 import os
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 paths = getBestExportPathsMap(url, revision).keys() 268 paths = getBestExportPathsMap(url, revision).keys()
269 paths.sort() 269 paths.sort()
270 paths.reverse() 270 paths.reverse()
271 271
272 for path in paths: 272 for path in paths:
273 command = "svn delete ." + path 273 command = "svn delete ." + path
274 print command 274 print command
275 os.system(command) 275 os.system(command)
276 276
277 def revertRevision(url, revision): 277 def revertRevision(url, revision):
278 paths = getBestMergePaths(url, revision) 278 command = ('svn merge -r ' + str(revision) + ":" + str(revision-1) +
agable 2013/08/22 09:15:14 This could also simply be 'svn merge -c -' + str(r
279 for path in paths: 279 " " + url + " .")
280 command = ('svn merge -N -r ' + str(revision) + ":" + str(revision-1) + 280 print command
281 " " + url + path + " ." + path) 281 os.system(command)
282 print command
283 os.system(command)
284 282
285 def getFileInfo(url, revision): 283 def getFileInfo(url, revision):
286 global files_info_ 284 global files_info_
287 285
288 if (files_info_ != None): 286 if (files_info_ != None):
289 return files_info_ 287 return files_info_
290 288
291 svn_log = subprocess2.check_output( 289 svn_log = subprocess2.check_output(
292 ['svn', 'log', url, '-r', str(revision), '-v']).splitlines() 290 ['svn', 'log', url, '-r', str(revision), '-v']).splitlines()
293 291
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 706
709 if options.branch and options.milestone: 707 if options.branch and options.milestone:
710 option_parser.error("--branch cannot be used with --milestone") 708 option_parser.error("--branch cannot be used with --milestone")
711 return 1 709 return 1
712 710
713 return drover(options, args) 711 return drover(options, args)
714 712
715 713
716 if __name__ == "__main__": 714 if __name__ == "__main__":
717 sys.exit(main()) 715 sys.exit(main())
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