Add a DEPS gclient hook to prune corrupt mockito remote.
A third_party remote for third_party/mockito/src is corrupt. Run `git remote prune origin` in the checkout directory before syncing Chromium. Thanks to slan@ for providing this fix. TBR=kjellander@webrtc.org BUG=chromium:644722 NOTRY=True Review-Url: https://codereview.webrtc.org/2326523002 Cr-Commit-Position: refs/heads/master@{#14138}
This commit is contained in:
11
DEPS
11
DEPS
@ -34,6 +34,17 @@ hooks = [
|
||||
'_ = os.system("%s %s" % (sys.executable,script)) '
|
||||
'if os.path.exists(script) else 0')],
|
||||
},
|
||||
{
|
||||
# TODO(kjellander): Remove when (crbug.com/644722 is fixed.
|
||||
# This prunes origin for the mockito repo, which has some conflicting refs
|
||||
# in the remote.
|
||||
'name': 'local_prune_mockito_refs',
|
||||
'pattern': '.',
|
||||
'action': [
|
||||
'python',
|
||||
'src/webrtc/build/prune_third_party_mockito_origin.py'
|
||||
],
|
||||
},
|
||||
{
|
||||
# Clone chromium and its deps.
|
||||
'name': 'sync chromium',
|
||||
|
||||
@ -31,7 +31,7 @@ import textwrap
|
||||
|
||||
# Bump this whenever the algorithm changes and you need bots/devs to re-sync,
|
||||
# ignoring the .last_sync_chromium file
|
||||
SCRIPT_VERSION = 8
|
||||
SCRIPT_VERSION = 9
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
CHROMIUM_NO_HISTORY = 'CHROMIUM_NO_HISTORY'
|
||||
|
||||
33
webrtc/build/prune_third_party_mockito_origin.py
Normal file
33
webrtc/build/prune_third_party_mockito_origin.py
Normal file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file in the root of the source
|
||||
# tree. An additional intellectual property rights grant can be found
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
# Used to work around an upstream bug (crbug.com/644722).
|
||||
# This file will be removed ASAP.
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# Path to the corrupt project.
|
||||
MOCKITO_CHECKOUT_PATH = 'src/third_party/mockito/src'
|
||||
|
||||
|
||||
def main():
|
||||
# If this checkout exists, run `git remote prune origin` from it.
|
||||
if os.path.isdir(MOCKITO_CHECKOUT_PATH):
|
||||
subprocess.check_output(
|
||||
['git', 'remote', 'prune', 'origin'], cwd=MOCKITO_CHECKOUT_PATH)
|
||||
else:
|
||||
sys.stdout.write('{} does not exist!\n'.format(MOCKITO_CHECKOUT_PATH))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
Reference in New Issue
Block a user