infra/codestorage/hg-repo-sync
3:c8b4b952488a Browse Files
Remove the hgrc file, fix permissions. When pulling backups, make sure we set the permissions to 0770 as well as change the group they belong to. This caused us to not be able to write changes (oops). Also, remove the hgrc file. Which means our annoying "not trusting file /mounted/repos/blah-blah/.hg/hgrc from untrusted user root, group committers" message is back, but that's a minor nuisance. The real issue is that we're overwriting the hgrc for everything _anyways_ to get the push hook, etc. So there seemed to be little point.
Dockerfile hgrc pull.sh
1.1 --- a/Dockerfile Sun Oct 11 16:52:32 2015 -0700 1.2 +++ b/Dockerfile Wed Oct 14 23:04:31 2015 -0700 1.3 @@ -24,7 +24,6 @@ 1.4 RUN chmod +x /usr/local/bin/helpers/pull.sh 1.5 RUN chmod +x /usr/local/bin/helpers/push.sh 1.6 1.7 -ADD hgrc /usr/local/bin/helpers/mercurial/hgrc 1.8 RUN wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip && unzip google-cloud-sdk.zip && rm google-cloud-sdk.zip 1.9 1.10 ENV CLOUDSDK_PYTHON_SITEPACKAGES 1
2.1 --- a/hgrc Sun Oct 11 16:52:32 2015 -0700 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,2 +0,0 @@ 2.4 -[trusted] 2.5 -groups = committers
3.1 --- a/pull.sh Sun Oct 11 16:52:32 2015 -0700 3.2 +++ b/pull.sh Wed Oct 14 23:04:31 2015 -0700 3.3 @@ -43,8 +43,9 @@ 3.4 else 3.5 echo "Creating /mounted/repos$target repo from $bundle" 3.6 hg clone $bundle /mounted/repos${target} 3.7 - chgrp -R 2000 /mounted/repos${target} 3.8 fi 3.9 + chgrp -R 2000 /mounted/repos${target} 3.10 + chmod -R 0770 /mounted/repos${target} 3.11 done 3.12 3.13 echo "Cleaning up..."