6

So we have Redmine successfully integrated with SVN. It's a mature integration (a few months now). Post-commit-hook updates the repository in Redmine. Comments in SVN commit get beautifully imported into Redmine, which is able to create links between issues and revisions, log time, the whole 9 yards.

However, for time constraint issues, there was an urgent bug which had to be fixed quickly and committed without comments. The issue wasn't even in Redmine. This happened at 3:35AM, when best practices are as valued as a bag of ice for sale in the Arctic winter.

Now, this morning, we entered the issue into Redmine and want to link that crazy 3:35AM revision to it. How can that be done?

I was once able to hack that by erasing some records in Redmine database and running the repository update task. But I do not really remember right now and really really do not want to go there anymore.

Is there a way? A functionality? A plugin? A script? Anything?

Thanks in advance

Update

Oh, by the way, we already updated the comment for THAT revision, containing the valid tags and words Redmine expects.

Montag451
  • 1,168
  • 3
  • 14
  • 30
Adriano Carneiro
  • 57,693
  • 12
  • 90
  • 123
  • You want to make redmine to re-read svn log of your project? If you delete the repository from project settings, enter it again and go to repository tab, it will probably load everything from the beginning. – Dmitry Yudakov May 18 '11 at 16:32
  • 1
    You should post that as an answer. That's a good suggestion, but it's a bit of overkill, isn't it? Also, if I delete a repository, won't Redmine try to mess with my actual SVN rep? This is something that I always wanted to ask... – Adriano Carneiro May 18 '11 at 16:34

4 Answers4

3

One possible solution to make redmine re-read svn log of the project is to delete the repository from project settings, enter it again and go to repository tab, it will probably load everything from the beginning.

It's a workaround and perhaps there's a better way, but it should still work. Deleting repository from redmine project setting will not affect your actual svn repository.

Dmitry Yudakov
  • 15,364
  • 4
  • 49
  • 53
  • @Adrian Svn log is rarely changed, almost never, so I doubt that redmine developers have created some special way to reload it. When we miss to put redmine tags in svn log we usually just post "Implemented in r195" - this way we're still able to track the changes rather easily, although they're not seen as associated. – Dmitry Yudakov May 18 '11 at 19:11
  • Thats a nice, simple workaround! It worked on bzr too. Thanks! – David LeBauer Jun 14 '12 at 19:08
1

See also reply from user3402809 to my question Associating revisions with a Redmine issue. It provides simpler and less intrusive way providing you have "Manage related issues" permission in Redmine.

Community
  • 1
  • 1
Adam Badura
  • 5,069
  • 1
  • 35
  • 70
0

I'm not 100% on this but....

in the redmine code there is a method called fetch_changesets that, grabs the changesets from repositories for all projects. The comment above it says:

Fetches new changesets for all repositories of active projects
Can be called periodically by an external script
eg. ruby script/runner "Repository.fetch_changesets"

there is another method under that called scan_changesets_for_issue_ids which is what's called to rescan the comments. These are in models/repository.rb so you could modify them to clear, fetch and rescan all in 1 new method. Obviously you'll need to set SVN up to allow changing of historical commit messages.

gbjbaanb
  • 51,617
  • 12
  • 104
  • 148
0

From the repository revision entry you can manually add the issue to the list of related issues.

This is not a real url, but you will get the idea.

http://server/projects/projectname/repository/reponame/revisions/nnn

There is a paragraph for "Related issues" , and a link with the caption "Add".

It will insert a little form that allows you to enter the related issue number.