Project

General

Profile

Adding new git repository shouldn't update DB with all new commits

Added by Sridhar Nelloru about 10 years ago

Hi,

I have following scenario.

I have a project with a git repository from last 4 years. Now that git repo became very big so we wanted to split that repo into 2 and stop using big repo. And re-add split repos to same project in redmine.

So technically redmine project will have 3 git repos, one will be inactive but still we need that as all existing tickets will have references to its commits and 2 new repos will be active.

Now is there any way we can tell redmine not to check for old commits in new git repo but only look for new incoming commits?

Example:

Have a project foo-bar in redmine with git repo foo-bar.git

foo-bar.git has below commits with reference to mentioned ticket numbers.

1fd3dsg refs #1 change-1 to foo
4sad2as refs #2 change-1 to foo
3edsads refs #3 change-2 to foo
5adsggh refs #4 change-2 to bar

Now we split repo foo-bar.git into foo.git and bar.git. Now foo.git will get all commits made for foo and bar.git will get all commits made for bar, but their commit-ids will change.

foo.git

s43dfsa refs #1 change-1 to foo
a234s2f refs #3 change-2 to foo

bar.git

1s3ds3q refs #2 change-1 to bar
3re2ef2s refs #4 change-2 to bar

Now I have added foo.git and bar.git to foo-bar project in redmine. So redmine will have 3 git repos.

Now whats happening is redmine is attaching newly created 4 commits to tickets 1,2,3,4 again. New commits are exactly same as old commits but only commit-ids have changed.

Is there a way we can tell redmine not to update DB for these 4 new changes but only update for upcoming chagnes to foo.git and bar.git ??

Sorry if I have missed anything, Please let me know if more info is needed.


Replies (1)

RE: Adding new git repository shouldn't update DB with all new commits - Added by Sridhar Nelloru about 10 years ago

I have deleted all the newly added commits from the database and its not showing duplicate change sets anymore. I have tested by adding a new change set to existing ticket and it is showing only newly added change set but not any deleted commits.

every time when we fetch_changesets will it update the database again for deleted change sets? I tried but not updating. But want to confirm if this process is okay.

Do you guys think is this a right approach ? Any future implications due to this?

    (1-1/1)