Changeset 280967 in webkit
- Timestamp:
- Aug 12, 2021, 8:23:37 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/check-github-mirror-integrity (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r280966 r280967 1 2021-08-12 Jonathan Bedard <jbedard@apple.com> 2 3 [check-github-mirror-integrity] Differentiate between slow sync and collapsed commits 4 https://bugs.webkit.org/show_bug.cgi?id=229004 5 <rdar://problem/81795644> 6 7 Reviewed by Aakash Jain. 8 9 * Scripts/check-github-mirror-integrity: Use commit timestamps to differentiate between a slow sync between svn.webkit.org 10 and GitHub and git-svn combining commits 11 1 12 2021-08-12 Carlos Garcia Campos <cgarcia@igalia.com> 2 13 -
trunk/Tools/Scripts/check-github-mirror-integrity
r280663 r280967 28 28 29 29 from webkitpy import webkitscmpy 30 from webkitcorepy.string_utils import pluralize 30 31 from webkitscmpy import local, remote 32 33 34 SYNC_TIME_LIMIT = 5 * 60 # 5 minutes 31 35 32 36 … … 45 49 canonical_tip = repository.commit(branch='trunk') 46 50 47 if mirror_tip.identifier == canonical_tip.identifier: 51 timestamps_equal = mirror_tip.timestamp == canonical_tip.timestamp 52 53 if timestamps_equal and mirror_tip.identifier == canonical_tip.identifier: 48 54 print('GitHub and svn.webkit.org are in sync') 49 55 print(f'HEAD commit on GitHub {mirror_tip} matches HEAD commit on svn.webkit.org {canonical_tip}') 50 56 return 0 51 57 52 if time.time() >= canonical_tip.timestamp - 5 * 60 and mirror_tip.identifier == canonical_tip.identifier - 1: 53 print('GitHub is 1 commit behind svn.webkit.org. This is ok.') 58 if timestamps_equal and mirror_tip.identifier != canonical_tip.identifier: 59 print('ERROR: GitHub and svn.webkit.org are out of sync') 60 print(f'HEAD commit on GitHub {mirror_tip} out of sync with HEAD commit on svn.webkit.org {canonical_tip}') 61 return 1 62 63 difference = canonical_tip.identifier - mirror_tip.identifier 64 if time.time() < canonical_tip.timestamp + SYNC_TIME_LIMIT: 65 print('GitHub is {} behind svn.webkit.org, but might be updating, This is ok.'.format(pluralize(difference, 'commit'))) 54 66 print(f'HEAD commit on GitHub {mirror_tip} slightly behind HEAD commit on svn.webkit.org {canonical_tip}') 55 67 return 0 56 68 57 print('ERROR: GitHub and svn.webkit.org are out of sync')69 print('ERROR: GitHub is not syncing from svn.webkit.org and is {} behind'.format(pluralize(difference, 'commit'))) 58 70 print(f'HEAD commit on GitHub {mirror_tip} out of sync with HEAD commit on svn.webkit.org {canonical_tip}') 59 print('This indicates a serious error with the repository, please inform admin@webkit.org urgently')60 71 return 1 61 72
Note:
See TracChangeset
for help on using the changeset viewer.