diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-09-08 23:03:45 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-09-08 23:04:43 +0100 |
commit | 42ea9108d73e0d1fb415892879c10dd37235c6b7 (patch) | |
tree | a4f18fa6aa926991f5abbcfa44edfe24fecd4345 /bin | |
parent | d068d64d01dbfad2162ce5c31474d868f418e32c (diff) | |
download | gitano-42ea9108d73e0d1fb415892879c10dd37235c6b7.tar.gz |
GITANO: Migrate from gitano.git to gall
Diffstat (limited to 'bin')
-rw-r--r-- | bin/gitano-auth.in | 3 | ||||
-rw-r--r-- | bin/gitano-post-receive-hook.in | 3 | ||||
-rw-r--r-- | bin/gitano-pre-receive-hook.in | 3 | ||||
-rw-r--r-- | bin/gitano-setup.in | 9 | ||||
-rw-r--r-- | bin/gitano-update-hook.in | 13 | ||||
-rw-r--r-- | bin/gitano-update-ssh.in | 3 |
6 files changed, 20 insertions, 14 deletions
diff --git a/bin/gitano-auth.in b/bin/gitano-auth.in index 37c4fe1..299826a 100644 --- a/bin/gitano-auth.in +++ b/bin/gitano-auth.in @@ -11,6 +11,7 @@ -- @@GITANO_LUA_PATH local gitano = require "gitano" +local gall = require "gall" local luxio = require "luxio" local sio = require "luxio.simple" local sp = require "luxio.subprocess" @@ -53,7 +54,7 @@ end -- Now load the administration data -local admin_repo = gitano.git.repository.new((repo_root or "") .. "/gitano-admin.git") +local admin_repo = gall.repository.new((repo_root or "") .. "/gitano-admin.git") if not admin_repo then gitano.log.fatal("Unable to locate administration repository. Cannot continue"); diff --git a/bin/gitano-post-receive-hook.in b/bin/gitano-post-receive-hook.in index 04ba587..bad7053 100644 --- a/bin/gitano-post-receive-hook.in +++ b/bin/gitano-post-receive-hook.in @@ -11,6 +11,7 @@ -- @@GITANO_LUA_PATH local gitano = require "gitano" +local gall = require "gall" local luxio = require "luxio" local sio = require "luxio.simple" local sp = require "luxio.subprocess" @@ -31,7 +32,7 @@ local source = luxio.getenv("GITANO_SOURCE") or "ssh" -- Now load the administration data gitano.config.repo_path(repo_root) -local admin_repo = gitano.git.repository.new((repo_root or "") .. "/gitano-admin.git") +local admin_repo = gall.repository.new((repo_root or "") .. "/gitano-admin.git") if not admin_repo then gitano.log.fatal("Unable to locate administration repository. Cannot continue"); diff --git a/bin/gitano-pre-receive-hook.in b/bin/gitano-pre-receive-hook.in index 0287a75..6eae987 100644 --- a/bin/gitano-pre-receive-hook.in +++ b/bin/gitano-pre-receive-hook.in @@ -11,6 +11,7 @@ -- @@GITANO_LUA_PATH local gitano = require "gitano" +local gall = require "gall" local luxio = require "luxio" local sio = require "luxio.simple" local sp = require "luxio.subprocess" @@ -31,7 +32,7 @@ local source = luxio.getenv("GITANO_SOURCE") or "ssh" -- Now load the administration data gitano.config.repo_path(repo_root) -local admin_repo = gitano.git.repository.new((repo_root or "") .. "/gitano-admin.git") +local admin_repo = gall.repository.new((repo_root or "") .. "/gitano-admin.git") if not admin_repo then gitano.log.fatal("Unable to locate administration repository. Cannot continue"); diff --git a/bin/gitano-setup.in b/bin/gitano-setup.in index 6ca13a1..44fe93c 100644 --- a/bin/gitano-setup.in +++ b/bin/gitano-setup.in @@ -11,6 +11,7 @@ -- @@GITANO_LUA_PATH local gitano = require "gitano" +local gall = require "gall" local luxio = require "luxio" local sio = require "luxio.simple" local clod = require "clod" @@ -222,17 +223,17 @@ gitano.config.repo_path(get "paths.repos") gitano.log.info("=> Prepare repository") -local raw_repo = assert(gitano.git.repository.create(get("paths.repos") .. +local raw_repo = assert(gall.repository.create(get("paths.repos") .. "/gitano-admin.git")) gitano.log.info("=> Create a flattened tree") for k, v in pairs(completely_flat) do gitano.log.debug(" => Make object", k) - completely_flat[k] = gitano.git.object.create(raw_repo, "blob", v) + completely_flat[k] = gall.object.create(raw_repo, "blob", v) end gitano.log.info("=> Commit that tree") -local real_tree = assert(gitano.git.tree.create(raw_repo, completely_flat)) +local real_tree = assert(gall.tree.create(raw_repo, completely_flat)) local person = { realname = get "admin.realname", @@ -245,7 +246,7 @@ local commit_data = { message = "Initial setup", } -local commit_obj = assert(gitano.git.commit.create(raw_repo, commit_data)) +local commit_obj = assert(gall.commit.create(raw_repo, commit_data)) gitano.log.info("=> Attach that commit to master") diff --git a/bin/gitano-update-hook.in b/bin/gitano-update-hook.in index dd81649..446393a 100644 --- a/bin/gitano-update-hook.in +++ b/bin/gitano-update-hook.in @@ -11,6 +11,7 @@ -- @@GITANO_LUA_PATH local gitano = require "gitano" +local gall = require "gall" local luxio = require "luxio" local sio = require "luxio.simple" local sp = require "luxio.subprocess" @@ -35,7 +36,7 @@ local source = luxio.getenv("GITANO_SOURCE") or "ssh" -- Now load the administration data gitano.config.repo_path(repo_root) -local admin_repo = gitano.git.repository.new((repo_root or "") .. "/gitano-admin.git") +local admin_repo = gall.repository.new((repo_root or "") .. "/gitano-admin.git") if not admin_repo then gitano.log.fatal("Unable to locate administration repository. Cannot continue"); @@ -112,7 +113,7 @@ local function do_expensive_populate_context(context) local oldtree, newtree if oldsha == nullsha then - oldtree = repo.git:get(gitano.git.tree.empty_sha).content + oldtree = repo.git:get(gall.tree.empty_sha).content else local thing = repo.git:get(oldsha) if thing.type == "tag" then @@ -121,13 +122,13 @@ local function do_expensive_populate_context(context) if thing.type == "commit" then oldtree = thing.content.tree.content else - oldtree = repo.git:get(gitano.git.tree.empty_sha).content + oldtree = repo.git:get(gall.tree.empty_sha).content gitano.log.warn("Odd, old object", oldsha, "is not a commit or tag") end end if newsha == nullsha then - newtree = repo.git:get(gitano.git.tree.empty_sha).content + newtree = repo.git:get(gall.tree.empty_sha).content else local thing = repo.git:get(newsha) if thing.type == "tag" then @@ -136,7 +137,7 @@ local function do_expensive_populate_context(context) if thing.type == "commit" then newtree = thing.content.tree.content else - newtree = repo.git:get(gitano.git.tree.empty_sha).content + newtree = repo.git:get(gall.tree.empty_sha).content gitano.log.warn("Odd, new object", oldsha, "is not a commit or tag") end end @@ -152,7 +153,7 @@ local function do_expensive_populate_context(context) end local function populate_tree(tag, tree) - local flat_tree = gitano.git.tree.flatten(tree) + local flat_tree = gall.tree.flatten(tree) local names = {} for fn in pairs(flat_tree) do names[#names+1] = fn diff --git a/bin/gitano-update-ssh.in b/bin/gitano-update-ssh.in index 1000d91..ecf51a9 100644 --- a/bin/gitano-update-ssh.in +++ b/bin/gitano-update-ssh.in @@ -11,6 +11,7 @@ -- @@GITANO_LUA_PATH local gitano = require "gitano" +local gall = require "gall" local luxio = require "luxio" local sio = require "luxio.simple" local sp = require "luxio.subprocess" @@ -25,7 +26,7 @@ gitano.log.bump_level(gitano.log.level.CHAT) -- Now load the administration data -local admin_repo = gitano.git.repository.new((repo_root or "") .. "/gitano-admin.git") +local admin_repo = gall.repository.new((repo_root or "") .. "/gitano-admin.git") if not admin_repo then gitano.log.error("Usage: gitano-update-ssh /path/to/repos") |