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

Side by Side Diff: revert.py

Issue 100095: Convert gcl.GetSVNFileInfo() to xml format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 7 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 | « gcl.py ('k') | tests/gcl_unittest.py » ('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/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 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 # Tool to quickly revert a change. 6 # Tool to quickly revert a change.
7 7
8 import exceptions 8 import exceptions
9 import optparse 9 import optparse
10 import os 10 import os
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 if blames: 128 if blames:
129 print "Blaming %s\n" % ",".join(blames) 129 print "Blaming %s\n" % ",".join(blames)
130 if reviewers != blames: 130 if reviewers != blames:
131 print "Emailing %s\n" % ",".join(reviewers) 131 print "Emailing %s\n" % ",".join(reviewers)
132 print "These files were modified in %s:" % revisions_string 132 print "These files were modified in %s:" % revisions_string
133 print "\n".join(files) 133 print "\n".join(files)
134 print "" 134 print ""
135 135
136 # Make sure these files are unmodified with svn status. 136 # Make sure these files are unmodified with svn status.
137 status = gcl.RunShell(["svn", "status"] + files) 137 status = gcl.GetSVNStatus(files)
138 if status: 138 if status:
139 if force: 139 if force:
140 # TODO(maruel): Use the tool to correctly revert '?' files. 140 # TODO(maruel): Use the tool to correctly revert '?' files.
141 gcl.RunShell(["svn", "revert"] + files) 141 gcl.RunShell(["svn", "revert"] + files)
142 else: 142 else:
143 raise ModifiedFile(status) 143 raise ModifiedFile(status)
144 # svn up on each of these files 144 # svn up on each of these files
145 gcl.RunShell(["svn", "up"] + files) 145 gcl.RunShell(["svn", "up"] + files)
146 146
147 files_status = {} 147 files_status = {}
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 print "".join(e.args) 275 print "".join(e.args)
276 print "You can use the --force flag to revert the files." 276 print "You can use the --force flag to revert the files."
277 except OutsideOfCheckout, e: 277 except OutsideOfCheckout, e:
278 print "Your repository doesn't contain ", str(e) 278 print "Your repository doesn't contain ", str(e)
279 279
280 return retcode 280 return retcode
281 281
282 282
283 if __name__ == "__main__": 283 if __name__ == "__main__":
284 sys.exit(Main(sys.argv)) 284 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « gcl.py ('k') | tests/gcl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698