Maintain git mirror (on GitHub?)
|Reported by:||Owned by:||cboos|
|Severity:||critical||Keywords:||git hg mercurial mirror|
|Cc:||leho@…, daltonmatos@…, jonas|
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)
comment:1 Changed 5 years ago by
- Component changed from general to project
- Milestone set to not applicable
comment:5 Changed 5 years ago by
- Owner set to cboos
- Priority changed from normal to high
- Severity changed from trivial to critical
comment:7 Changed 5 years ago by
- Cc jonas added
- Resolution set to fixed
- Status changed from new to closed
comment:10 in reply to: ↑ 9 ; follow-up: ↓ 11 Changed 5 years ago by
- Keywords hg mercurial added
- Resolution fixed deleted
- Status changed from closed to reopened