Project

General

Profile

Actions

Patch #3445

closed

Missing revisions - bazaar_adapter.rb fails to parse the "[merge]" tag

Added by daniel magnusson almost 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
Start date:
2009-06-04
Due date:
% Done:

90%

Estimated time:
1.00 h

Description

We had some issues with bazaar and missing revisions in redmine. Problem came down too how the bazaar_adapter.rb parsed the "revno: "

Redmine could not parse "revno: 65 [merge]", but parsed "revno: 64" just fine. We believe the [merge] tag shouldn't be there at all, but this comes down how we do our releasing with bazaar, but redmine should handle that in either case.

Our "bzr log --show-ids r64..65" ;
-----------------------------------------------------------

revno: 65 [merge]
revision-id: daniel_magnusson__-20090519142057-gv85uugmmcmyr3f4
parent:
parent: daniel_magnusson__-20090519141858-s0hjrwsks45dxhcv
committer: Daniel Magnusson <> <>
branch nick: dev
timestamp: Tue 2009-05-19 16:20:57 +0200
message:
Initial FakeComponent integration
------------------------------------------------------------
revno: 64
revision-id:
parent:
committer: BjornLu <>
branch nick: mybranch
timestamp: Tue 2009-05-19 08:55:34 +0200
message:
restore a temp fix, regarding login problem
------------------------------------------------------------

We use
Bazaar (bzr) 1.15
Python interpreter: /usr/bin/python 2.5.2
Python standard library: /usr/lib/python2.5
bzrlib: /usr/lib/python2.5/site-packages/bzrlib
Bazaar configuration: /home/danielm/.bazaar
Bazaar log file: /home/danielm/.bzr.log

And Stable release from Redmine , 2009-xx-xx v0.8.5 with rails 2.1.2

Our fix for this issue was in bazaar_adapter.rb(line 92-ish);

if line =~ /^revno: (\d+)$/
revision.identifier = $1.to_i
#added fix;
elsif line =~ /^revno: (\d+)\s+(\S+)$/
revision.identifier = $1.to_i

Could probably do this on one row, some regexp expert should look into it.


Files

Actions #1

Updated by Scott Aubrey almost 15 years ago

Hello

We also came across this issue when using bazaar. We altered the existing RegEx to detect ' [merge]' at the end of the revno: line, as show in the attached diff. It's exactly the same, but less redundant code, cleaner to read etc.

Actions #2

Updated by daniel magnusson almost 15 years ago

Scott Aubrey wrote:

Hello

We also came across this issue when using bazaar. We altered the existing RegEx to detect ' [merge]' at the end of the revno: line, as show in the attached diff. It's exactly the same, but less redundant code, cleaner to read etc.

Nice patch, a question, do you have problems with "Autofetch commits" when you click inside redmine->repository as well? (it doesn't fetch the latest revisions from bazaar). I believe there is some other "bazaar fetch code" somewhere in redmine that doesn't properly work, but I'm just guessing here.

We haven't found a solution for it and are just doing the "ruby script/runner "Repository.fetch_changesets" -e production" as a cronjob for now.

Actions #3

Updated by Scott Aubrey almost 15 years ago

daniel magnusson wrote:

do you have problems with "Autofetch commits" when you click inside redmine->repository as well? (it doesn't fetch the latest revisions from bazaar). I believe there is some other "bazaar fetch code" somewhere in redmine that doesn't properly work, but I'm just guessing here.

We haven't found a solution for it and are just doing the "ruby script/runner "Repository.fetch_changesets" -e production" as a cronjob for now.

The autofetch is working for us fine, but I am using a checkout of trunk at the time of setup as apposed to a stable release. It may have been fixed I guess.

We're using the mirrorred branch of trunk on launchpad, rev 2244

Actions #4

Updated by Jean-Philippe Lang almost 15 years ago

  • Status changed from New to Closed
  • Target version set to 0.9.0

Patch applied in r2780. Thanks.

Actions

Also available in: Atom PDF