Version 4 (modified by 10 years ago) ( diff ) | ,
---|
Developer repositories
In addition to the official TracRepositories targeted for distributing the code to users, we have several local "devs" repositories for staging the work in progress and preparing the various proposals.
Use a branch in a git repository or a branch or a bookmark in a Mercurial repository as an alternative to a patch, at your convenience.
It's also possible to create such repositories at Github or Bitbucket by cloning the official mirrors, but the extra advantage offered to TracTeam members of using a local repository is to have closer integration with this Trac, browsing the repositories, referring to the commits and seeing them in the timeline.
Mercurial repositories
See the list in https://hg.edgewall.org/trac.
Git repositories
We currently have git repositories ready to use for the following people:
cboos jomae jonas osimons psuter rblank rjollos
When they're becoming "active", we make them browsable here:
In the following instructions, replace $user
with your actual user account on edgewall.org
.
There are various ways to organize your working repositories, so the following is only an example setup.
Your repository as the origin
, the Subversion mirror as mirror
First you need to clone your repository (let's call the local repository $user
as well):
$ git clone http://svn.edgewall.org/git/trac/devs/$user $user $ cd $user
After the clone, you'll see the following branches:
$ git branch --all * trunk remotes/origin/0.12-stable remotes/origin/HEAD -> origin/trunk remotes/origin/trunk
Note that the lack of a master
branch serves as a reminder that we're not working in a "primary" repository, but only in a mirror of a Subversion repository.
Speaking of which, we need to make it easy to retrieve the changes coming from upstream. For that, we add a remote that we will call mirror
:
$ git remote add mirror http://svn.edgewall.org/git/trac/mirror
(use that URL directly from e.o, or use one of the github ones)
We also would like to fetch from this remote instead of the origin for the local branch trunk
, so we need to replace origin
by mirror
:
$ git branch --set-upstream -f trunk mirror/trunk Branch trunk set up to track remote branch trunk from mirror.
If you'd like to get a 0.12-stable
branch for tracking mirror/0.12-stable
, simply do:
$ git branch 0.12-stable mirror/0.12-stable Branch 0.12-stable set up to track remote branch 0.12-stable from mirror.
Once this is done, for either of these, getting the changes from svn is a simple matter of going back to the branch in question and doing a pull, e.g.
$ git checkout trunk $ git pull --ff-only
Of course, you should not directly work on such a trunk
branch, but rather use it as the base for creating topic branches (IOW, git pull --ff-only
should always succeed).
For example:
$ git checkout -b ticketXYZ/short-summary trunk
Whenever you want to publish such a topic branch, you push it to your repository. The push URL must use https
, so be sure to do this once:
$ git remote set-url origin --push https://$user@svn.edgewall.org/git/trac/devs/$user
Note that you can add the repositories from other developers in as many remotes as needed, e.g.
$ git remote add cboos http://svn.edgewall.org/git/trac/devs/cboos $ git remote add jomae http://svn.edgewall.org/git/trac/devs/jomae
This makes it very easy to fetch topic branches from other people and to continue where they left or propose changes.
In the end, a .git/config
for such a repository where user=jonas
will look like the following:
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true hideDotFiles = dotGitOnly [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = http://svn.edgewall.org/git/trac/devs/jonas pushurl = https://jonas@svn.edgewall.org/git/trac/devs/jonas [branch "trunk"] remote = mirror merge = refs/heads/trunk [remote "mirror"] url = http://svn.edgewall.org/git/trac/mirror fetch = +refs/heads/*:refs/remotes/mirror/* [branch "0.12-stable"] remote = mirror merge = refs/heads/0.12-stable [remote "cboos"] url = http://svn.edgewall.org/git/trac/devs/cboos fetch = +refs/heads/*:refs/remotes/cboos/* [remote "jomae"] url = http://svn.edgewall.org/git/trac/devs/jomae fetch = +refs/heads/*:refs/remotes/jomae/*