Maintain git mirror (on GitHub?)
|Reported by:||Owned by:||Christian Boos|
|Severity:||critical||Keywords:||git hg mercurial mirror|
|Cc:||leho@…, daltonmatos@…, Jonas Borgström||Branch:|
While Trac is already a very feature-complete system for my use and its plugin support is very robust, I find myself wanting to modify core features. If the subversion repository was mirrored on a socially orientated DVCS site (such as the great GitHub) it would allow users like myself to fork and maintain our own flavors of Trac, porting in features from the official repository as they come.
There are an increasing amount of projects which are mirroring their internally hosted git and subversion repositories on GitHub (see http://github.com/apache/ fpr an example). Mirroring subversion repositories with git is an extremely easy process and could be fully automated after a small setup.
git svn clone http://svn.edgewall.com/repos/trac/
git gcto shrink the space of the git repo by A LOT.
- Copy the
.gitfolder from the newly created
Trac.gitin the parent directory and then delete the
Tracfolder. You now have a bare git mirror of the svn repository.
- Create an account on GitHub, set up an SSH key, and add a new repo.
git remote add origin email@example.com:Edgewall/Trac.git(assuming Edgewall is the account name and Trac is the repo name) in the
- Set up a cron job to run the following script every 10 or 15 minutes:
#!/bin/bash export GIT_DIR=/path/to/Trac.git git svn fetch -q &>> /var/log/git_mirror.log git push --all origin
- Have a cup of tea, you're done!
I strongly believe that a lot of the people who like to hack on Trac would benefit from this greatly.
Change History (27)
follow-up: 11 comment:10 by , 11 years ago
|Keywords:||hg mercurial added|
|Status:||closed → reopened|