Mercurial Hosting > hghosting
comparison update_repositories.luan @ 10:a7187a447835
restrict repo names
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 12 Jul 2022 19:40:50 -0600 |
parents | 338ab58d91f2 |
children | c560b4e2f056 |
comparison
equal
deleted
inserted
replaced
9:338ab58d91f2 | 10:a7187a447835 |
---|---|
37 | 37 |
38 -- init new repositories | 38 -- init new repositories |
39 for repo in pairs(repos) do | 39 for repo in pairs(repos) do |
40 if not uri("file:repos/"..repo).exists() then | 40 if not uri("file:repos/"..repo).exists() then |
41 logger.info("creating repo "..repo) | 41 logger.info("creating repo "..repo) |
42 uri("bash:/usr/local/bin/hg init 'repos/"..repo.."'").read_text() | 42 uri("bash:/usr/local/bin/hg init repos/"..repo).read_text() |
43 end | 43 end |
44 end | 44 end |
45 -- delete unused repos | 45 -- delete unused repos |
46 for _, child in ipairs( uri("file:repos").children() ) do | 46 for _, child in ipairs( uri("file:repos").children() ) do |
47 local name = child.name() | 47 local name = child.name() |