• raphael.kubo.da.costa's avatar
    gclient_scm: Make calls to "git merge-base" non-fatal. · 05c83591
    raphael.kubo.da.costa authored
    It might be the case for some repositories that there is no merge base
    between the current git HEAD and origin/master, which causes git
    merge-base to exit with a non-zero code and cause calls to gclient
    status/diff/pack to fail, as well as gclient sync if the repository in
    question has been removed from DEPS.
    
    This is true for the external/webrtc/trunk/talk repository, for example.
    Its recent release branches (branch-heads/45 all the way to /53 at
    least) have no ancestry shared with its master branch, so gclient
    sync'ing from a Chromium M51 checkout to an M52 one (where it's no
    longer in DEPS) fails because of the failed git merge-base calls.
    
    We now ignore failures and just don't specify a merge base when calling
    "git diff".
    
    BUG=633962
    R=iannucci@chromium.org,agable@chromium.org,maruel@chromium.org
    
    Review-Url: https://codereview.chromium.org/2215673002
    05c83591
gclient_scm.py 69.6 KB