Defect #6045

Repository file Diff view sometimes shows more than selected file

Added by Joshua Masek over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:2010-08-05
Priority:NormalDue date:
Assignee:Jean-Baptiste Barth% Done:

100%

Category:SCM
Target version:1.0.1
Resolution:Fixed Affected version:

Description

I think this is related to issue #4186
You can actually reproduce by using issue #4186:

diff_format.patch Magnifier (990 Bytes) Marc Mengel, 2010-08-12 19:49

Associated revisions

Revision 3939
Added by Jean-Baptiste Barth over 7 years ago

Fixed: changing view style in repository/diff doesn't keep previously selected file. #6045

History

#1 Updated by Marc Mengel over 7 years ago

Just to be more specific, this is due to the wrong URI in the action= of the <form> around the inline/side-by-side selection. It is missing the file pathname part.

#2 Updated by Marc Mengel over 7 years ago

Here's a patch for it...

#3 Updated by Mischa The Evil over 7 years ago

  • Target version set to 1.0.1
  • Affected version (unused) changed from 1.0.0-RC to devel

@ Marc: Thanks for your contribution. Sadly the patch-file seems to be broken somehow but nevertheless I have extracted the change locally...

It includes a one-line change of source:/trunk/app/views/repositories/diff.rhtml@3938#L4

from:

<% form_tag({}, :method => 'get') do %>

to

<% form_tag(request.request_uri, :method => 'get') do %>

I have tested this tiny patch and it fixed the issue for me too. Dunno for sure though if this is the right way to fix this issue most effectively. I'll leave that up to the commiters.

I've targetted this issue for Redmine 1.0.1 since it seems it can be fixed easily. Please retarget if time is missing to include this for 1.0.1...
I've also set the affected version to devel since it's still broken in the trunk too.

#4 Updated by Jean-Baptiste Barth over 7 years ago

  • Status changed from New to 7
  • Assignee set to Jean-Baptiste Barth
  • Priority changed from Low to Normal

I don't really like the idea of using request.request_uri, it could introduce weird bugs, but I'll take a look at this one. I confirm it could be the kind of defect we want to address in 1.0.1, but I don't know when Eric wants to stop adding issues for this one (due date is in 7 days!).

Thanks for the patch and your investigations on that.

#5 Updated by Jean-Baptiste Barth over 7 years ago

  • Status changed from 7 to Resolved
  • % Done changed from 50 to 100
  • Resolution set to Fixed

It was just missing path information, fixed in r3939

#6 Updated by Eric Davis over 7 years ago

  • Status changed from Resolved to Closed

Merged to 1.0-stable for release in 1.0.1.

Also available in: Atom PDF