Changeset 286623 in webkit
- Timestamp:
- Dec 7, 2021, 2:31:12 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/libraries/reporelaypy/reporelaypy/__init__.py (modified) (1 diff)
-
Scripts/libraries/reporelaypy/reporelaypy/checkout.py (modified) (4 diffs)
-
Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py (modified) (1 diff)
-
Scripts/libraries/reporelaypy/run (modified) (2 diffs)
-
Scripts/libraries/reporelaypy/setup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r286605 r286623 1 2021-12-06 Jonathan Bedard <jbedard@apple.com> 2 3 [commits.webkit.org] Fallback to remote repository (Part 1) 4 https://bugs.webkit.org/show_bug.cgi?id=233904 5 <rdar://problem/86131927> 6 7 Reviewed by Dewei Zhu. 8 9 * Scripts/libraries/reporelaypy/reporelaypy/__init__.py: Bump version. 10 * Scripts/libraries/reporelaypy/reporelaypy/checkout.py: 11 (Checkout.Encoder.default): 12 (Checkout.__init__): Allow user to specify a remote fallback repository. 13 * Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py: 14 (CheckoutRoute.commit): If no commit is found, query the fallback repository. 15 * Scripts/libraries/reporelaypy/run: Add --fallback option. 16 * Scripts/libraries/reporelaypy/setup.py: Bump version. 17 1 18 2021-12-07 Lauro Moura <lmoura@igalia.com> 2 19 -
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/__init__.py
r286605 r286623 45 45 ) 46 46 47 version = Version(0, 1, 2)47 version = Version(0, 2, 0) 48 48 49 49 import webkitflaskpy -
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py
r286576 r286623 28 28 29 29 from webkitcorepy import run 30 from webkitscmpy import local 30 from webkitscmpy import local, remote 31 31 32 32 … … 44 44 return super(Checkout.Encoder, self).default(obj) 45 45 46 re turndict(46 result = dict( 47 47 path=obj.path, 48 48 url=obj.url, 49 49 sentinal=obj.sentinal, 50 50 ) 51 if obj.fallback_repository: 52 result['fallback_url'] = obj.fallback_repository.url 53 return result 51 54 52 55 @classmethod … … 67 70 return 0 68 71 69 def __init__(self, path, url=None, http_proxy=None, sentinal=True, primary=True):72 def __init__(self, path, url=None, http_proxy=None, sentinal=True, fallback_url=None, primary=True): 70 73 self.sentinal = sentinal 71 74 self.path = path … … 73 76 self._repository = None 74 77 self._child_process = None 78 self.fallback_repository = remote.Scm.from_url(fallback_url) if fallback_url else None 79 if self.fallback_repository: 80 self.fallback_repository.commit() 75 81 76 82 containing_path = os.path.dirname(path) -
trunk/Tools/Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py
r286576 r286623 146 146 return None 147 147 148 commit = self.checkout.repository.find(ref) if ref else self.checkout.repository.commit() 148 commit = None 149 try: 150 commit = self.checkout.repository.find(ref) if ref else self.checkout.repository.commit() 151 except (RuntimeError, ValueError): 152 pass 153 149 154 if not commit: 150 return commit 155 try: 156 if self.checkout.fallback_repository: 157 return self.checkout.fallback_repository.find(ref) 158 except (RuntimeError, ValueError): 159 pass 160 return None 151 161 152 162 encoded = json.dumps(commit, cls=Commit.Encoder) -
trunk/Tools/Scripts/libraries/reporelaypy/run
r286576 r286623 69 69 help='Set the number of seconds to wait between polling git checkout', 70 70 ) 71 group.add_argument( 72 '--fallback', dest='fallback', default=None, action='store', type=str, 73 help='Fallback repository URL', 74 ) 71 75 72 76 group = parser.add_argument_group('Database') … … 112 116 113 117 print('Finding checkout...') 114 checkout = Checkout(path=args.path, url=args.url, http_proxy=args.http_proxy, sentinal=args.sentinal) 118 checkout = Checkout( 119 path=args.path, 120 url=args.url, 121 http_proxy=args.http_proxy, 122 sentinal=args.sentinal, 123 fallback_url=args.fallback, 124 ) 115 125 print('Git checkout:') 116 126 print(' Path: {}'.format(checkout.path)) 117 127 print(' URL: {}'.format(checkout.url)) 128 if checkout.fallback_repository: 129 print(' Fallback: {}'.format(checkout.fallback_repository.url)) 118 130 if not checkout.repository: 119 131 print(' Cloning repository...') -
trunk/Tools/Scripts/libraries/reporelaypy/setup.py
r286605 r286623 31 31 setup( 32 32 name='reporelaypy', 33 version='0. 1.2',33 version='0.2.0', 34 34 description='Library for visualizing, processing and storing test results.', 35 35 long_description=readme(),
Note:
See TracChangeset
for help on using the changeset viewer.