prefix = 'refs/testgit/%s/' % alias
debug("prefix: '%s'", prefix)
- repo.gitdir = ""
+ repo.gitdir = os.environ["GIT_DIR"]
repo.alias = alias
repo.prefix = prefix
print "import"
print "export"
- print "gitdir"
print "refspec refs/heads/*:%s*" % repo.prefix
print # end capabilities
die("Need gitdir to import")
repo = update_local_repo(repo)
- repo.exporter.export_repo(repo.gitdir)
+ repo.exporter.export_repo(repo.gitdir, args)
def do_export(repo, args):
update_local_repo(repo)
repo.importer.do_import(repo.gitdir)
- repo.non_local.push(repo.gitdir)
-
-def do_gitdir(repo, args):
- """Stores the location of the gitdir.
- """
-
- if not args:
- die("gitdir needs an argument")
-
- repo.gitdir = ' '.join(args)
+ if not repo.local:
+ repo.non_local.push(repo.gitdir)
COMMANDS = {
'list': do_list,
'import': do_import,
'export': do_export,
- 'gitdir': do_gitdir,
}