Skip to content

Commits on Source 2

  • Tristan Van Berkom's avatar
    git.py: Handle concurrent download completions properly · 95cc9793
    Tristan Van Berkom authored
    Use os.rename() to rename the cloned temporary repository into
    place in the source cache, and issue a STATUS message when discarding
    a duplicate clone, in the case where the same repository is cloned
    twice in parallel.
    
    The problem with using shutil.move() is that it will create the source
    directory in a subdirectory of the destination when the destination
    exists, so it's behavior depends on whether the destination exists.
    
    This shutil.move() behavior has so far hidden the race condition
    where a duplicate repo is created in a subdirectory, as you need
    to have three concurrent downloads of the same repo in order to
    trigger the error.
    
    This fixes issue #503
    95cc9793
  • Tristan Van Berkom's avatar
    Merge branch 'tristan/fix-spurious-errors-1.2' into 'bst-1.2' · 55aacefa
    Tristan Van Berkom authored
    git.py: Handle concurrent download completions properly
    
    See merge request !584
    55aacefa
Loading