зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1409876 - Refuse to perform a VCS checkout into a cache root; r=dustin
This seems like a reasonable thing to enforce. MozReview-Commit-ID: 3BZQSkwRYeN --HG-- extra : rebase_source : 8dae62edb35202da0f0e90ddec3eacb212ada371
This commit is contained in:
Родитель
926bb25028
Коммит
a953b72db5
|
@ -471,6 +471,14 @@ def main(args):
|
|||
if not checkout:
|
||||
return
|
||||
|
||||
# The checkout path becomes the working directory. Since there are
|
||||
# special cache files in the cache's root directory and working
|
||||
# directory purging could blow them away, disallow this scenario.
|
||||
if os.path.exists(os.path.join(checkout, '.cacherequires')):
|
||||
print('error: cannot perform vcs checkout into cache root: %s' %
|
||||
checkout)
|
||||
sys.exit(1)
|
||||
|
||||
# Ensure the directory for the source checkout exists.
|
||||
try:
|
||||
os.makedirs(os.path.dirname(checkout))
|
||||
|
|
Загрузка…
Ссылка в новой задаче