"--use-commit-queue",
]
if self._options.sheriff:
- args.extend([
- "--sheriff", "--googlers-mapping", self._options.googlers_mapping])
+ args.append("--sheriff")
if self._options.dry_run:
- args.extend(["--dry-run"])
+ args.append("--dry-run")
if self._options.work_dir:
args.extend(["--work-dir", self._options.work_dir])
self._side_effect_handler.Call(chromium_roll.ChromiumRoll().Run, args)
"https://chromium.googlesource.com/v8/v8/+log/%s..%s")
+ISSUE_MSG = (
+"""Please follow these instructions for assigning/CC'ing issues:
+https://code.google.com/p/v8-wiki/wiki/TriagingIssues""")
+
class Preparation(Step):
MESSAGE = "Preparation."
message.append(
ROLL_SUMMARY % (self["last_rolled_base"][:8], self["push_base"][:8]))
- if self["sheriff"]:
- message.append("Please reply to the V8 sheriff %s in case of problems."
- % self["sheriff"])
+ message.append(ISSUE_MSG)
+
message.append("TBR=%s" % self._options.reviewer)
self.GitCommit("\n\n".join(message),
author=self._options.author,
if not self._options.sheriff: # pragma: no cover
return
- try:
- # The googlers mapping maps @google.com accounts to @chromium.org
- # accounts.
- googlers = imp.load_source('googlers_mapping',
- self._options.googlers_mapping)
- googlers = googlers.list_to_dict(googlers.get_list())
- except: # pragma: no cover
- print "Skip determining sheriff without googler mapping."
- return
-
# The sheriff determined by the rotation on the waterfall has a
# @google.com account.
url = "https://chromium-build.appspot.com/p/chromium/sheriff_v8.js"
# If "channel is sheriff", we can't match an account.
if match:
g_name = match.group(1)
- self["sheriff"] = googlers.get(g_name + "@google.com",
- g_name + "@chromium.org")
- self._options.reviewer = self["sheriff"]
+ # Optimistically assume that google and chromium account name are the
+ # same.
+ self["sheriff"] = g_name + "@chromium.org"
+ self._options.reviewer = ("%s,%s" %
+ (self["sheriff"], self._options.reviewer))
print "Found active sheriff: %s" % self["sheriff"]
else:
print "No active sheriff found."
help="The author email used for rietveld.")
parser.add_argument("--dry-run", default=False, action="store_true",
help="Perform only read-only actions.")
- parser.add_argument("-g", "--googlers-mapping",
- help="Path to the script mapping google accounts.")
parser.add_argument("-r", "--reviewer", default="",
help="The account name to be used for reviews.")
parser.add_argument("--sheriff", default=False, action="store_true",
print "Bad step number %d" % options.step
parser.print_help()
return None
- if options.sheriff and not options.googlers_mapping: # pragma: no cover
- print "To determine the current sheriff, requires the googler mapping"
- parser.print_help()
- return None
# Defaults for options, common to all scripts.
options.manual = getattr(options, "manual", True)
"""
- def testChromiumRoll(self):
- googlers_mapping_py = "%s-mapping.py" % TEST_CONFIG["PERSISTFILE_BASENAME"]
- with open(googlers_mapping_py, "w") as f:
- f.write("""
-def list_to_dict(entries):
- return {"g_name@google.com": "c_name@chromium.org"}
-def get_list():
- pass""")
+ ROLL_COMMIT_MSG = """Update V8 to version 3.22.4 (based on abc).
+
+Summary of changes available at:
+https://chromium.googlesource.com/v8/v8/+log/last_rol..abc
+
+Please follow these instructions for assigning/CC'ing issues:
+https://code.google.com/p/v8-wiki/wiki/TriagingIssues
+TBR=g_name@chromium.org,reviewer@chromium.org"""
+
+ def testChromiumRoll(self):
# Setup fake directory structures.
TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
TextToFile("", os.path.join(TEST_CONFIG["CHROMIUM"], ".git"))
Cmd("git fetch origin", ""),
Cmd("git new-branch v8-roll-push_hash", "", cwd=chrome_dir),
Cmd("roll-dep v8 push_hash", "rolled", cb=WriteDeps, cwd=chrome_dir),
- Cmd(("git commit -am \"Update V8 to version 3.22.4 "
- "(based on abc).\n\n"
- "Summary of changes available at:\n"
- "https://chromium.googlesource.com/v8/v8/+log/last_rol..abc\n\n"
- "Please reply to the V8 sheriff c_name@chromium.org in "
- "case of problems.\n\nTBR=c_name@chromium.org\" "
- "--author \"author@chromium.org <author@chromium.org>\""),
+ Cmd(("git commit -am \"%s\" "
+ "--author \"author@chromium.org <author@chromium.org>\"" %
+ self.ROLL_COMMIT_MSG),
"", cwd=chrome_dir),
Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f", "",
cwd=chrome_dir),
self.Expect(expectations)
args = ["-a", "author@chromium.org", "-c", chrome_dir,
- "--sheriff", "--googlers-mapping", googlers_mapping_py,
+ "--sheriff",
"-r", "reviewer@chromium.org",
"--last-roll", "last_roll_hsh"]
ChromiumRoll(TEST_CONFIG, self).Run(args)