From 638044da8ec97a28a79abc7ea4fdd36cd7da5fc3 Mon Sep 17 00:00:00 2001 From: "laforge@chromium.org" Date: Mon, 25 Jan 2010 18:52:41 +0000 Subject: [PATCH] Fix condition where no author would be retrieved (revert on a branch for something that was on trunk, svn info only knows about it when it's ref by trunk url). Also added an author override, useful for webkit merges or double reverts Review URL: http://codereview.chromium.org/551137 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@37024 0039d316-1c4b-4281-b951-d872f2087c98 --- drover.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drover.py b/drover.py index 7f9617d45..eb28a1362 100644 --- a/drover.py +++ b/drover.py @@ -477,7 +477,12 @@ def main(options, args): revertExportRevision(url, revision) # Check the base url so we actually find the author who made the change - author = getAuthor(url, revision) + if options.auditor: + author = options.auditor + else: + author = getAuthor(url, revision) + if not author: + author = getAuthor(TRUNK_URL, revision) filename = str(revision)+".txt" out = open(filename,"w") @@ -532,6 +537,8 @@ if __name__ == "__main__": help='Revision to revert') option_parser.add_option('-w', '--workdir', help='subdir to use for the revert') + option_parser.add_option('-a', '--auditor', + help='overrides the author for reviewer') option_parser.add_option('', '--revertbot', action='store_true', default=False) option_parser.add_option('', '--revertbot-commit', action='store_true', @@ -547,4 +554,4 @@ if __name__ == "__main__": option_parser.error("--merge requires a --branch") sys.exit(1) - sys.exit(main(options, args)) + sys.exit(main(options, args)) \ No newline at end of file