tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: [OT] Difficulty creating working patch - renamed file.
Date Tue, 28 Sep 2010 17:45:16 GMT
On 28.09.2010 19:11, Mark Thomas wrote:
> On 28/09/2010 17:36, David Jencks wrote:
>>  From what I hear the best advice is "use git, not svn".  However that's usually
difficult at apache.
> There are git mirrors for trunk and 6.0.x/trunk but that does rely on a
> Tomcat committer also using git. Anyone?
> I had high hopes for git, particularly around working on multiple issues
> at the same time and 'off-line' commits for an incremental approach to
> larger changes but having experienced / been forced to use git at work I
> have to say I won't be switching anytime soon. The benefit of the extra
> features I would use doesn't yet outweigh the costs of switching.

I started using "git svn" when working on httpd. What is nice is the 
ability to prepare everything including log message and then when it 
looks fine, apply to svn without a lot of copy and paste. I usually 
create a git branch for some feature, then work there until I'm 
satisfied, merge to my trunk and from their use "git svn dcommit" to 
apply to the ASF svn.

Since I didn't have much experience with the real merge feature, I often 
"merge" by doing cherry-picking with git revisions, e.g.

git branch newbranch
git checkout newbranch
... work until fine
... decide I want to "merge" git revision 9240f4 from that branch
git checkout trunk
git format-patch -k --stdout 9240f4^..9240f4 | git am -3 -k
git log /* optional */
git svn dcommit
git branch -d newbranch /* delete when no longer needed */

Here 9240f4 is the short form of some git revision.

For the initial setup (replace PROJECT_NAME)

git clone git://
cd PROJECT_NAME/.git; wget; cd ..
git config svn.authorsfile ".git/authors.txt"
git config --global "My Full Name" /* Use your name */
git config --global /* Use your mail address */
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto
git svn init --prefix=origin/ --tags=tags --trunk=trunk 
git svn rebase

For a list of projects see That page also 
contains in its upper part two links to further docs about git at ASF.

I didn't yet use git for Tomcat, but will soon.

I didn't yet check, how "git svn dcommit" behaves, when files are moved.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message