Project

General

Profile

Contributing code to Redmine

Added by Clay McCoy almost 16 years ago

I have a feature implemented that I would like to contribute back to Redmine. But it is not clear how to do this.

The svn-patch method doesn't work for me. I cloned Redmine from github. My changes are currently on a local git repo rather than on github. What is the current ideal way to deliver them? There are several and this seemed like the most official one.
http://github.com/collectiveidea/redmine/tree/master

Aside from git, migrations causes problems in an open source app. If I introduce a migration there are two problems:
  • what is the standard way of contributing it
  • how do I just keep it locally while dealing with the new conflicting migrations that will come when we update. Even with git rebase, the migration numbers will coflict.

Replies (13)

RE: Contributing code to Redmine - Added by Thomas Lecavelier almost 16 years ago

hi Clay,

The standard way to contributing is to create a patch issue, or a feature request issue and a patch issue, if you think you need discussion around it.

Patches have to fill these requirements:

  1. The patch have to be made against svn trunk, and the closer possible from trunk/HEAD when you post (a little svn up don't hurt anybody... err... nevermind :) ) You can provide ever svn-diff, or normalized diff (diff -Nur)
  2. The patch DO have a sufficient test cases included
  3. If it has some mysterious and/or improbable algorithm or way-to-do, it have to be well documented, in English

About migrations, if you're speaking about rails one, it's just a number, the integrator is a grown-up and can modify it :)

HTH

RE: Contributing code to Redmine - Added by Clay McCoy almost 16 years ago

Thanks, but this kind of sidestepped my two main concerns.

  • I'm not using, and won't be using SVN. I'm not even using git-svn for this project now that it is on github. It is unclear whether the official repo is Git or svn, and I don't see any instructions on cotributing for Git users (Which I would expect most of your contributors to be).
  • This is more of a practical rails question that I just can't find an answer to. If my personal modifications have rails migrations, how do I deal with Redmine updates? It is tedious to keep up with my migrations and re-number them every time I do an update (or rebase).

Thanks

RE: Contributing code to Redmine - Added by Jim Mulholland almost 16 years ago

Hopefully Redmine will be running on Rails 2.1 in the very near future.

http://www.redmine.org/boards/1/topics/show/1300

When that happens, migrations should no longer be an issue.

RE: Contributing code to Redmine - Added by Clay McCoy almost 16 years ago

  • Well, timestamped migrations will be nice for some people. Until Phusion's Passenger supports 2.1, a lot of people aren't going to be able to make the leap.
  • I'm surprised that there is no code contribution strategy for Git since this is a rails app.

RE: Contributing code to Redmine - Added by Clay McCoy almost 16 years ago

I found an answer to my original question about contributing to Redmine with Git. It was on the Redmine wiki. I'm posting a link here in case anyone else is curious.

RedmineGitTracking

RE: Contributing code to Redmine - Added by Eric Davis almost 16 years ago

You also might want to clone from my GitHib repository. It automatically syncs with the Redmine Subversion so you just need to git checkout master && git pull to get the updates. It also looks like http://git.complete.org/branches/redmine-integration/ has some additional code in it that isn't in the Redmine svn.

Eric

RE: Contributing code to Redmine - Added by Clay McCoy almost 16 years ago

The problem with the above link is that it references
http://git.complete.org/branches/redmine-integration/
which hasn't been updated in weeks.

It claims that this git repo "comes from the Git repo at git://gitorious.org/redmine-git/mainline.git"
Which doesn't seem to exist anymore.

So my question is, what is considered the central git repo?

I guess it doesn't matter as long as diffs are created against the trunk and attached to patch issues. This repo seems to get the most use:
http://github.com/collectiveidea/redmine/tree/master

RE: Contributing code to Redmine - Added by Eric Davis over 15 years ago

So my question is, what is considered the central git repo?

I'm trying to get mine to be the central repo http://github.com/edavis10/redmine/tree/master

I guess it doesn't matter as long as diffs are created against the trunk and attached to patch issues.

It does matter if people are using forks for their own development. It's not easy to jump between different git-svn clones because the SHA ids are different. I tried it out last night and it works but is a long process. The lack of a central repository is whats preventing me from contribuing some larger patches (100+ lines).

This repo seems to get the most use: http://github.com/collectiveidea/redmine/tree/master

It has more watchers but the svn import wasn't done properly, all the author's emails are incorrect. It's also infrequently updated, when I created my own repository the CollectiveIdea one was about 3 months back.

Eric

RE: Contributing code to Redmine - Added by Clay McCoy over 15 years ago

Thanks Eric, this is good information. What needs to happen to proclaim your Git repo as the central one? With Git's distributed community, it seems like it is just about marketing. A good start would be to change RedmineGitTracking to reference your repo as the one to create patches against, and then get the wiki page in a more prominent place. I had to do a lot of searching to find info on this subject.

I saw your Redmine repo, but didn't use it specifically because I saw the word "unofficial" in the description. I will switch over to yours.
Speaking of that, what was the best process you found to put changes from one git-svn clone to the other?

RE: Contributing code to Redmine - Added by Thomas Löber over 15 years ago

Eric, do you intend to add the Redmine branches to the Git repository as well?

RE: Contributing code to Redmine - Added by Eric Davis over 15 years ago

Clay McCoy said:

What needs to happen to proclaim your Git repo as the central one? With Git's distributed community, it seems like it is just about marketing.

It's about 50% marketing and 50% of JPL saying "use this one". I'll update the wiki page, I must have missed it.

Speaking of that, what was the best process you found to put changes from one git-svn clone to the other?

First make lots of backups before you start. I mostly followed the guide here. But don't use the script. It kinda worked but it missed a lot of things and bombed on errors. I ended up migrating only the branches that were active and not all my topic branches.

Eric

RE: Contributing code to Redmine - Added by Eric Davis over 15 years ago

Thomas Löber:

Eric, do you intend to add the Redmine branches to the Git repository as well?

I'm not sure. git-svn imports svn branches and tags as full git branches. I need to do some more research on the activity in the svn branches and tags to see the best way to proceed. Ideally, the svn tags will become git tags and the svn branches will become git branches off of master. I'm open to suggestions.

Eric

RE: RE: Contributing code to Redmine - Added by Eric Davis over 15 years ago

Thomas Löber:

Eric, do you intend to add the Redmine branches to the Git repository as well?

I've just pushed all the tags and branches from svn to GitHub. Can someone check it out and make sure I didn't miss anything?

http://github.com/edavis10/redmine/tree/master

Eric

    (1-13/13)