From 38dda433a1917e36ef03b39926a9ff3b2ef89c1b Mon Sep 17 00:00:00 2001 From: Haibo Huang <hhb@google.com> Date: Fri, 1 Feb 2019 15:45:35 -0800 Subject: [PATCH] [Updater] Send email with only relative path Test: local run Change-Id: I1924a07058524eb0bf034dae541a8171e6287f1b --- external_updater.py | 8 +++++--- notifier.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/external_updater.py b/external_updater.py index 749fb21..5e2e944 100644 --- a/external_updater.py +++ b/external_updater.py @@ -129,7 +129,8 @@ def _process_update_result(path): def _check_some(paths, delay): results = {} for path in paths: - results[path] = _process_update_result(path) + relative_path = fileutils.get_relative_project_path(path) + results[relative_path] = _process_update_result(path) time.sleep(delay) return results @@ -141,7 +142,8 @@ def _check_all(delay): if fileutils.METADATA_FILENAME in files: # Skip sub directories. dirs[:] = [] - results[path] = _process_update_result(path) + relative_path = fileutils.get_relative_project_path(path) + results[relative_path] = _process_update_result(path) time.sleep(delay) return results @@ -204,7 +206,7 @@ def _do_update(args): git_utils.push(full_path, args.remote_name) if args.branch_and_commit: - git_utils.checkout(full_path, 'aosp/master') + git_utils.checkout(full_path, args.remote_name + '/master') def parse_args(): diff --git a/notifier.py b/notifier.py index 4391558..455a5b9 100644 --- a/notifier.py +++ b/notifier.py @@ -134,7 +134,7 @@ def send_notification(args): _process_results(args, history, results) with open(args.history, 'w') as f: - json.dump(history, f, sort_keys=True) + json.dump(history, f, sort_keys=True, indent=4) def _upgrade(proj): -- GitLab