Change readme updating to be on by default for roll_dep.py

Change-Id: Id6d5a365e55ad0a79e512af24e72f141f8b9a60a
Bug: b/390067679
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6521682
Reviewed-by: Rachael Newitt <renewitt@google.com>
Reviewed-by: Andy Perelson <ajp@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
This commit is contained in:
Jordan Brown
2025-05-09 15:35:10 -07:00
committed by LUCI CQ
parent d1f9fa6c92
commit 977c37458f
2 changed files with 5 additions and 5 deletions

View File

@@ -232,7 +232,7 @@ def finalize(args, commit_msg, current_dir, rolls):
check_call(['git', 'checkout', '--quiet', roll_to], cwd=full_dir) check_call(['git', 'checkout', '--quiet', roll_to], cwd=full_dir)
# Attempt to update README.chromium. # Attempt to update README.chromium.
if args.update_readme: if not args.no_update_readme:
update_readme_chromium(dependency, roll_to, current_dir) update_readme_chromium(dependency, roll_to, current_dir)
# This adds the submodule revision update to the commit. # This adds the submodule revision update to the commit.
@@ -349,9 +349,9 @@ def main():
default=[], default=[],
help='Regex(es) for dependency in DEPS file') help='Regex(es) for dependency in DEPS file')
parser.add_argument('dep_path', nargs='+', help='Path(s) to dependency') parser.add_argument('dep_path', nargs='+', help='Path(s) to dependency')
parser.add_argument('--update-readme', parser.add_argument('--no-update-readme',
action='store_true', action='store_true',
help='Update Revision in README.chromium if it exists') help='Do not try to update Revision in README.chromium')
args = parser.parse_args() args = parser.parse_args()
if len(args.dep_path) > 1: if len(args.dep_path) > 1:
@@ -380,7 +380,7 @@ def main():
d.replace('\\', '/').rstrip('/') for d in args.dep_path) d.replace('\\', '/').rstrip('/') for d in args.dep_path)
cmdline = 'roll-dep ' + ' '.join(dependencies) + ''.join(' --key ' + k cmdline = 'roll-dep ' + ' '.join(dependencies) + ''.join(' --key ' + k
for k in args.key) for k in args.key)
if args.update_readme: if not args.no_update_readme:
cmdline += ' --update-readme' cmdline += ' --update-readme'
try: try:
if not args.ignore_dirty_tree and not is_pristine(current_dir): if not args.ignore_dirty_tree and not is_pristine(current_dir):

View File

@@ -217,7 +217,7 @@ class RollDepTest(fake_repos.FakeReposTestBase):
if not self.enabled: if not self.enabled:
return return
stdout, stderr, returncode = self.call( stdout, stderr, returncode = self.call(
[ROLL_DEP, '--update-readme']+self.all_repos [ROLL_DEP]+self.all_repos
) )
latest_revision = self.githash('repo_2', 3) latest_revision = self.githash('repo_2', 3)