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

Unified Diff: revert.py

Issue 125253: Fix revert.py which was broken on r18272. (Closed)
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/revert_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: revert.py
diff --git a/revert.py b/revert.py
index 19d924e2c1e5221247f767047a2bf5c0f9a45801..3e56363990e80520b74dca4b3aaf2ec204da1237 100755
--- a/revert.py
+++ b/revert.py
@@ -92,7 +92,8 @@ def Revert(revisions, force=False, commit=True, send_email=True, message=None,
# Move to the repository root and make the revision numbers sorted in
# decreasing order.
- os.chdir(gcl.GetRepositoryRoot())
+ local_root = gcl.GetRepositoryRoot()
+ os.chdir(local_root)
revisions.sort(reverse=True)
revisions_string = ",".join([str(rev) for rev in revisions])
revisions_string_rev = ",".join([str(-rev) for rev in revisions])
@@ -221,8 +222,8 @@ def Revert(revisions, force=False, commit=True, send_email=True, message=None,
description += "\n\n"
description += message
# Don't use gcl.Change() since it prompts the user for infos.
- change_info = gcl.ChangeInfo(name=changename, issue='',
- description=description, files=files_status)
+ change_info = gcl.ChangeInfo(changename, 0, 0, description, files_status,
+ local_root)
change_info.Save()
upload_args = ['--no_presubmit', '-r', ",".join(reviewers)]
« no previous file with comments | « no previous file | tests/revert_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698