• maruel@chromium.org's avatar
    Fix unpinned version to track upstream. · 1a60dca7
    maruel@chromium.org authored
    This is a serious bug, if a version is unpinned, it would become stuck at
    whatever a local branch 'master' may point to. This is extremely bad when a
    pinned dependency is unpinned on purpose, for example on a canary master. We
    reproduced this problem on the chromium.swarm master by setting a custom_vars
    swarming_revision to '', which then stopped syncing at the expected
    origin/master commit but instead got stuck to what happened to be a local master
    branch.
    
    This happens on git dependencies if the main solution is using svn. This doesn't
    happen on git checkouts using .DEPS.git due to bug 323233.
    
    The issue looks like:
    ________ running 'git reset --hard HEAD' in '/path/src/tools/swarming_client'
    HEAD is now at 4727bd5 Some commit
    Checked out revision d908a546e28d1e9f85f5690cf6c3a080f06ba711
    
    Note that HEAD and what is checked out do not match.
    
    Also reduce the hardcoding of 'origin' by creating a variable named 'remote'.
    
    R=petermayo@chromium.org
    BUG=322961
    
    Review URL: https://codereview.chromium.org/85473007
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237332 0039d316-1c4b-4281-b951-d872f2087c98
    1a60dca7
gclient_scm.py 59.1 KB