New module import to git.gnome.og
- From: Owen Taylor <otaylor redhat com>
- To: gnome-infrastructure <gnome-infrastructure gnome org>
- Subject: New module import to git.gnome.og
- Date: Tue, 17 Mar 2009 11:59:20 -0400
Goals:
- Make it easy for people to create new modules on git.gnome.org
without sysadmin adminstration.
Typically with a git workflow you would already have a git
repository, so the basic question is how to to import an
existing git repository.
- Get repositories imported correctly - branches and tags all
there, no remote branches, etc.
- Don't spam the commit list on an initial import of a module
with lots of history.
Method 1: empty repositories
============================
A) You make sure you have a local copy with all tags and
branches you want pushed and no other tags and branches
If you already have a public repository, do:
git clone --bare --mirror <origin>
If you don't have a public repository, use 'git branch'
and 'git tag -l' to make sure that things look good.
B) You create the remote repository
ssh <user>@svn.gnome.org new-git-repos exampleproj
C) You push that
git push ssh://<user>@svn.gnome.org/exampleproj refs/heads/*
refs/tags/*
D) We make our push scripts recognize an import into a bare
repository (all ref updates are creations, all refs are updated),
and send out a only a special "imported" mail.
Downsides:
- Fairly easy to screw up the push if you can't follow
directions.
- If you do screw up the push and don't push everything,
then pushing the remainder will defeat the import recognition
and spam the commits list.
Method 2
========
A) You make sure you have a local copy with all tags and
branches you want pushed and no other tags and branches
If you already have a public repository, do:
git clone --bare --mirror <origin>
If you don't have a public repository, use 'git branch'
and 'git tag -l' to make sure that things look good,
and 'git branch -D' and 'git tag -d' to remove unwanted
stuff.
B) You upload a tarball of that to an import script
tar cfz . | ssh <user>@svn.gnome.org import-git-repos exampleproj
C) We unpack the input, figure out what is going on, create the
repository, push into it, enable the commit hooks.
Downsides:
- A bit more work to write the script
- Less flexible
- Still possible to screw up the import by getting A) wrong.
Opinions? Other ways we could handle it?
- Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]