Patch #3445
closedMissing revisions - bazaar_adapter.rb fails to parse the "[merge]" tag
90%
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: fakemail@gmail.com-20090519065534-vrlvyjm6qoukkm392
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: fakemail@gmail.com-20090519065534-vrlvyjm6qoukkm392
parent: fakemail@gmail.com-20090518152627-3bnipq8iu0sktdz4
committer: BjornLu <fakemail@gmail.com>
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
Updated by Scott Aubrey over 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.
Updated by daniel magnusson over 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.
Updated by Scott Aubrey over 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
Updated by Jean-Philippe Lang over 15 years ago
- Status changed from New to Closed
- Target version set to 0.9.0
Patch applied in r2780. Thanks.