X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=tinyos-mirror.sh;fp=tinyos-mirror.sh;h=d556b50163fcfb1d7b952797cbf45f522b22465c;hb=bed12e975887321b23536b5d2becdbae73341a9a;hp=d0f66045e3aa1315c4b5b90a9c811d0c94ed63a1;hpb=a998b5fd1c77d342bebbc942b56a0b3d4f612723;p=tinyos-utils.git diff --git a/tinyos-mirror.sh b/tinyos-mirror.sh index d0f6604..d556b50 100755 --- a/tinyos-mirror.sh +++ b/tinyos-mirror.sh @@ -111,6 +111,16 @@ do_rsync() locks_present() { + # git-cvsimport by default skips commits that are not at least 10 minutes + # old to try to prevent importing partial commits. However, because + # rsync may take a long time to run, this doesn't really work. So we look + # for lock files and don't sync if they exist. + # + # For the sf.net tinyos repo, lock files are created with a permissions + # level that prevents them from being read by the remote rsync, causing + # rsync to error. For the current configuration of the upstream CVS in + # this case, we never really get to test the mettle of this function. + lines=$(find . -name "#cvs*" | wc -l) if [ $lines -gt 0 ]; then return 0 # locks are present