summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py31
1 files changed, 14 insertions, 17 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 68a076df..8f73d27f 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -1695,32 +1695,29 @@ later is required to fix a server side protocol bug.
1695 1695
1696 # If we saw an error, exit with code 1 so that other scripts can check. 1696 # If we saw an error, exit with code 1 so that other scripts can check.
1697 if err_event.is_set(): 1697 if err_event.is_set():
1698 print("\nerror: Unable to fully sync the tree.", file=sys.stderr) 1698 # Add a new line so it's easier to read.
1699 print("\n", file=sys.stderr)
1700
1701 def print_and_log(err_msg):
1702 self.git_event_log.ErrorEvent(err_msg)
1703 print(err_msg, file=sys.stderr)
1704
1705 print_and_log("error: Unable to fully sync the tree")
1699 if err_network_sync: 1706 if err_network_sync:
1700 print( 1707 print_and_log("error: Downloading network changes failed.")
1701 "error: Downloading network changes failed.",
1702 file=sys.stderr,
1703 )
1704 if err_update_projects: 1708 if err_update_projects:
1705 print( 1709 print_and_log("error: Updating local project lists failed.")
1706 "error: Updating local project lists failed.",
1707 file=sys.stderr,
1708 )
1709 if err_update_linkfiles: 1710 if err_update_linkfiles:
1710 print( 1711 print_and_log("error: Updating copyfiles or linkfiles failed.")
1711 "error: Updating copyfiles or linkfiles failed.",
1712 file=sys.stderr,
1713 )
1714 if err_checkout: 1712 if err_checkout:
1715 print( 1713 print_and_log("error: Checking out local projects failed.")
1716 "error: Checking out local projects failed.",
1717 file=sys.stderr,
1718 )
1719 if err_results: 1714 if err_results:
1715 # Don't log repositories, as it may contain sensitive info.
1720 print( 1716 print(
1721 "Failing repos:\n%s" % "\n".join(err_results), 1717 "Failing repos:\n%s" % "\n".join(err_results),
1722 file=sys.stderr, 1718 file=sys.stderr,
1723 ) 1719 )
1720 # Not useful to log.
1724 print( 1721 print(
1725 'Try re-running with "-j1 --fail-fast" to exit at the first ' 1722 'Try re-running with "-j1 --fail-fast" to exit at the first '
1726 "error.", 1723 "error.",