sync: Fetch after applying bundle and retry after errors
sync: Fetch after applying bundle and retry after errors

After a $GIT_URL/clone.bundle has been applied to the new local
repository, perform an incremental fetch using `git fetch` to ensure
the local repository is up-to-date. This allows the hosting server
to offer stale /clone.bundle files to bootstrap a new client.

If a single git fetch fails, it may succeed again after a short
delay.  Transient failures are typical in environments where the
remote Git server happens to have limits on how many requests it
can serve at once (the anonymous git daemon, or an HTTP server).
Wait a randomized delay between 30 and 45 seconds and retry the
failed project once.  This delay gives the site time to recover
from a transient traffic spike, and the randomization makes it less
likely that a spike occurs again from all of the same clients.

Change-Id: I97fb0fcb33630fb78ac1a21d1a4a3e2268ab60c0
Signed-off-by: Shawn O. Pearce <f3ea74d906fa9fe97c1fef6bad9cb871485c7045@google.com>

chenzilin/git-repo,aep/repo,djibi2/git-repo,baidurom/repo,COrtegaflowcorp/git-repo,biaolv/git-repo,cubieboard/git-repo,mer-tools/git-repo,chusiang/git-repo,kdavis-mozilla/repo-repo,windyan/git-repo,alanbian/git-repo,couchbasedeps/git-repo,ceejatec/git-repo,azzurris/git-repo,hackbutty/git-repo,dodocat/git-repo,lchiocca/repo,kangear/git-repo,biaolv/git-repo,aosp-mirror/tools_repo,dsiganos/git-repo,frogbywyplay/git-repo,ThangBK2009/android-source-browsing.git-repo,daimajia/git-repo,hisilicon/git-repo,GerritCodeReview/git-repo,demonyangyue/git-repo,demonyangyue/git-repo,IbpTeam/repo,urras/git-repo,sb2008/git-repo,derron/git-repo,jangle789/git-repo,hejq0310/git-repo,finik/git-repo,daimajia/git-repo,mer-tools/git-repo,xianyo/git-repo,todototry/git-repo,yanjiegit/andriod-repo,fantasyfly/git-repo,Pankaj-Sakariya/android-source-browsing.git-repo,martinjina/git-repo,ilansmith/repo,GerritCodeReview/git-repo,hanchentech/git-repo,petemoore/git-repo,FuangCao/repo,la4430/repo,qingpingguo/git-repo,eligoenergy/git-repo,linux-knight/repo,hejq0310/git-repo,wavecomp/git-repo,idwanglu2010/git-repo,cubieboard/git-repo,wzhy90/git-repo,ericmckean/git-repo,xyyangkun/git-repo,Omnifarious/git-repo,4455jkjh/repo,nickpith/git-repo,CedricCabessa/repo,aep/repo,AurelienBallier/git-repo,ronan22/repo,derron/git-repo,jingyu/git-repo,GatorQue/git-repo-flow,nucked/git-repo,CedricCabessa/repo,folpindo/git-repo,hyper123/git-repo,11NJ/git-repo,linux-knight/repo,testbetta/git-repo-pub,qioixiy/git-repo,ChronoMonochrome/repo,xyyangkun/git-repo,finik/git-repo,windyan/git-repo,gabbayo/git-repo,Copypeng/git-repo,xhteam/git-repo,Jokebin/git-repo,nuclearmistake/repo,finik/git-repo,IbpTeam/repo,dodocat/git-repo,jmollan/git-repo,slfyusufu/repo,lightsofapollo/git-repo,lewixliu/git-repo,linuxdeepin/git-repo,xin3liang/git-repo,yanjiegit/jiangxin-repo,hyper123/git-repo,lipro-yocto/git-repo,zbunix/git-repo,FuangCao/git-repo,chenyun90323/git-repo,FlymeOS/repo,masscre/git-repo,HenningSchroeder/git-repo,mozilla/git-repo,Jokebin/git-repo,hanw/git-repo,liaog/git-repo,la4430/repo,simbasailor/git-repo,ChronoMonochrome/repo,sramaswamy/repo,lanniaoershi/git-repo,xhteam/git-repo,ossxp-com/repo,codetutil/git-repo,gabbayo/git-repo,jcfrank/myrepo,liaog/git-repo,posix4e/git-repo,testbetta/git-repo-pub,ericmckean/git-repo,hanchentech/git-repo,folpindo/git-repo,llg84/google_repo,bhargavkumar040/android-source-browsing.git-repo,ceejatec/git-repo,jingyu/git-repo,xecle/git-repo,crashkita/git-repo,darrengarvey/git-repo,lewixliu/git-repo,hacker-camp/google_repo,chenzilin/git-repo,FuangCao/repo,lanniaoershi/git-repo,lightsofapollo/git-repo,FuangCao/git-repo,enochcheng/git-repo,DavidPu/git-repo,lovesecho/xrepo,idwanglu2010/git-repo,djibi2/git-repo,bestes/repo,artprogramming/git-repo,nucked/git-repo,ediTLJ/git-repo,ossxp-com/repo,dsiganos/git-repo,ossxp-com/repo,opencontrail-ci-admin/git-repo,artprogramming/git-repo,amersons/git-repo,martinjina/git-repo,slfyusufu/repo,nbp/git-repo,alanbian/git-repo,josn-jys/git-repo,jpzhu/git-repo,xin3liang/git-repo,xecle/git-repo,AurelienBallier/git-repo,amersons/git-repo,hacker-camp/google_repo,venus-solar/git-repo,duralog/repo,chzhong/git-repo,xianyo/git-repo,dsiganos/git-repo,ronan22/repo,azzurris/git-repo,ilansmith/repo,mixedpuppy/git-repo,Omnifarious/git-repo,Fr4ncky/git-repo,RuanJG/git-repo,lipro-yocto/git-repo,dinpot/git-repo,sramaswamy/repo,TheQtCompany/git-repo,kdavis-mozilla/repo-repo,nbp/git-repo,loungin/git-repo,venus-solar/git-repo,linux-knight/repo,weixiaodong/git-repo,Pivosgroup/google-git-repo,sapiippo/git-repo,RuanJG/git-repo,flingone/git-repo,jmollan/git-repo,darrengarvey/git-repo,vmx/git-repo,SaleJumper/android-source-browsing.git-repo,loungin/git-repo,zodsoft/git-repo,alessandro-aglietti/git-repo,4455jkjh/repo,CedricCabessa/repo,cubieboard/git-repo,hackbutty/git-repo,lovesecho/xrepo,eric011/git-repo,mixedpuppy/git-repo,ediTLJ/git-repo,bestes/repo,josn-jys/git-repo,hisilicon/git-repo,Fr4ncky/git-repo,duralog/repo,zodsoft/git-repo,yanjiegit/jiangxin-repo,mozilla/git-repo,iAlios/git-repo,zbunix/git-repo,rochy2014/repo,vmx/git-repo,DavidPu/git-repo,wavecomp/git-repo,dinpot/git-repo,weixiaodong/git-repo,zemug/repo,luohongzhen/git-repo,sb2008/git-repo,simbasailor/git-repo,HenningSchroeder/git-repo,Pankaj-Sakariya/android-source-browsing.git-repo,kangear/git-repo,opensourcechipspark/repo,zemug/repo,yanjiegit/andriod-repo,qupai/git-repo,hanw/git-repo,xxxrac/git-repo,eric011/git-repo,Pivosgroup/google-git-repo,couchbasedeps/git-repo,SunRain/repo,codetutil/git-repo,lshain/repo,FlymeOS/repo,Copypeng/git-repo,eligoenergy/git-repo,Omnifarious/git-repo,yanjiegit/jiangxin-repo,bhargavkumar040/android-source-browsing.git-repo,lchiocca/repo,COrtegaflowcorp/git-repo,qupai/git-repo,fantasyfly/git-repo,jcfrank/myrepo,gbraad/git-repo,chenyun90323/git-repo,GatorQue/git-repo-flow,alessandro-aglietti/git-repo,testbetta/repo-pub,CyanogenMod/tools_repo,xxxrac/git-repo,frogbywyplay/git-repo,yanjiegit/andriod-repo,11NJ/git-repo,opencontrail-ci-admin/git-repo,luohongzhen/git-repo,enochcheng/git-repo,gbraad/git-repo,TheQtCompany/git-repo,petemoore/git-repo,CyanogenMod/tools_repo,jpzhu/git-repo,nickpith/git-repo,LA-Toth/git-repo,qingpingguo/git-repo,jangle789/git-repo,crashkita/git-repo,iAlios/git-repo,testbetta/repo-pub,aosp-mirror/tools_repo,flingone/git-repo,zbunix/git-repo,llg84/google_repo,SunRain/repo,aep/repo,masscre/git-repo,wzhy90/git-repo,linuxdeepin/git-repo,sapiippo/git-repo,qioixiy/git-repo,opensourcechipspark/repo,LA-Toth/git-repo,chzhong/git-repo,posix4e/git-repo,chusiang/git-repo,nuclearmistake/repo,SaleJumper/android-source-browsing.git-repo,urras/git-repo,ThangBK2009/android-source-browsing.git-repo,lovesecho/xrepo,lshain/repo,baidurom/repo,rochy2014/repo,todototry/git-repo