ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Show branches changset belongs to on issue page (Feature #268)


Added by Ivan Evtuhovich at 2011-03-09 09:07 am. Updated at 2011-10-13 04:20 pm.


Status:Open Start date:2011-03-09
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Remote issue URL: Affected version:

Description

This patch (see pull request from evtuhovich on github) will help me a lot to understand, what commits belongs to what branches.

Now it works only for git, but it is quite easy to make it work for others DCVS (bazaar, hg and others)


chili.png - Issue page looks with this patch (39.6 kB) Ivan Evtuhovich, 2011-03-09 09:07 am


History

Updated by Toshi MARUYAMA at 2011-03-09 10:50 am

Git branch is not stable. Git branch is pointer to specific revision. So, Git branch cannot be stored in database.
Mercurial named branch is stable.

Updated by Ivan Evtuhovich at 2011-03-09 12:20 pm

This is right, but when i see some issue, i want to know which branches changesets belongs to.

And if user do not make force update of branches (and this is strictly not recommended to git users), changeset do not change the branches, it belongs to.

This is very useful, when you have branches for every version and master branch (v38, v39, master, for example) and cherry-pick a lot. And sometimes this is difficult to determine, does some commit exists in some branch. This patch solve this problem.

Updated by Ivan Evtuhovich at 2011-03-09 12:57 pm

But there can be other problems - when you add new branch to git, you should regenerate all entries in chili-database :-(

I'll think about other implementation

Updated by Ivan Evtuhovich at 2011-03-10 08:59 am

I've just added repository/git.refresh_branches, it refresh branches in database.

I try to determine branches of commit "on the fly", but only git log takes 0.25s for one branch-commit pair (for our not very big repo). For our repository with 5 branches and 5 commits in issue, issue page load time is too big.

But with refresh_branches, which periodically updates branches, this is a quite good solution.

If you think, this is not good enough, i'll try to make this feature as chili-plugin, because it is very useful for our team. I think, for other teams this can be helpful too.

Updated by Toshi MARUYAMA at 2011-03-10 10:37 am

Chili master is behind my redmine trunk commits.
Your patch conflicts with redmine trunk.

Updated by Toshi MARUYAMA at 2011-03-10 10:41 am

Redmine git adapter has serious problems.

I think Redmine git adapter should be refactored such as Mercurial overhaul
http://www.redmine.org/issues/4455

Updated by Toshi MARUYAMA at 2011-03-10 10:44 am

If you have a plan to refactor git adapter, please refer http://www.redmine.org/issues/4773#note-13 .

Updated by Ivan Evtuhovich at 2011-03-10 09:16 pm

Chili master is behind my redmine trunk commits.
Your patch conflicts with redmine trunk.

I know, i have another patch for redmine, that used in our team's redmine. But i think Chili is the "separate" project.

Thanx you for information about problems with git, but ordering issue and 7 days issue couldn't be resolved without DB changes, and i do not know, is it possible to change DB just for git?

Also i do not know HG, so mercurial overhaul patch is not helpful for me.

I think about using grit library (ruby git wrapper by github), but is it exists any test or criteria that some implementation of redmine git adapter is good enough?

Updated by Ivan Evtuhovich at 2011-03-11 08:24 am

I've just sent new pull request, with git-only implementation. It is easy and quite fast.
There exists git branch --contains <commit-id> command, which do what i need. And it takes less then 0.1s for each commit

Updated by Ivan Evtuhovich at 2011-03-14 02:27 pm

https://github.com/chiliproject/chiliproject/pull/22 - what should i do you accept this request?

Updated by Eric Davis at 2011-03-14 09:11 pm

Ivan Evtuhovich wrote:

https://github.com/chiliproject/chiliproject/pull/22 - what should i do you accept this request?

I'd like to see some tests for it. From what I see, it's also missing a migration and the view. If you meant for pull request 18 and 22 to be used together, can you merge them in your branch and send a pull request with the full code?

Updated by Ivan Evtuhovich at 2011-03-15 08:00 am

Ok, i'll write a test for it.

And only 22 request is actual. I get branches from git "on the fly", so there no migrations.

Updated by Ivan Evtuhovich at 2011-03-16 10:01 am

Eric Davis wrote:

Ivan Evtuhovich wrote:

https://github.com/chiliproject/chiliproject/pull/22 - what should i do you accept this request?

I'd like to see some tests for it. From what I see, it's also missing a migration and the view. If you meant for pull request 18 and 22 to be used together, can you merge them in your branch and send a pull request with the full code?

I add another commit with tests

Updated by Colin Mollenhour at 2011-10-13 04:20 pm

Just an FYI, before I knew this ticket existed I created the exact same feature for Redmine 1.2. See Redmine #5386 (patch included with view update and migration)

Also available in: Atom PDF