• Josip Sokcevic's avatar
    Keep old git alternatives when changing mirrors · e19b7624
    Josip Sokcevic authored
    It's possible to change DEPS git repository while keeping the same
    source. This is useful feature, for example if upstream repository moves
    from github to gitlab. The repositories can be out of sync, or even
    diverge.
    
    We use git alternatives to save disk space. If a builder flip-flops
    between mirror repositories (e.g. case with different release branches),
    it's possible that new mirror doesn't contain all necessary objects that
    are present in the old repositories. That will result in invalid git
    pointer entries and fetch operations will fail.
    
    Instead of replacing git alternatives, we append new git alternatives to
    avoid such problem.
    
    R=bpastene@google.com, jojwang@google.com
    
    Bug: b/241802975
    Change-Id: I3ef025603af58a84692a68bf3b780c47b6d3ae46
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3843133Reviewed-by: 's avatarBen Pastene <bpastene@chromium.org>
    Reviewed-by: 's avatarJoanna Wang <jojwang@chromium.org>
    Commit-Queue: Josip Sokcevic <sokcevic@google.com>
    e19b7624
gclient_scm.py 66.7 KB