Re: [viewvc-dev] Is this property-diff branch ready for reintegration?
Alexey Neyman <[email protected]> Thu, 27 Oct 2011 10:43:54 -0700
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thursday, October 27, 2011 06:17:23 am C. Michael Pilato wrote:
> On 10/26/2011 07:09 PM, Alexey Neyman wrote:
> > The primary purpose of the 'display_as' field is to allow a single
> > selector for the format of the changes provided to the template. Before,
> > there were four variables provided to the template - with each of them
> > either set to None or holding the list/stream of changes:
> >
> > - raw_fp (now selected when display_as == 'raw')
> > - changes (display_as == 'sidebyside-1')
> > - sidebyside (display_as == 'sidebyside-2')
> > - unified (displauy_as == 'unified')
> >
> > The problem with different variables was that I wanted to isolate the
> > "diffing" engine into a single entity to use it in both content and
> > property diff. Returning a tuple of 4 items from that new class,
> > DiffDescription, seemed excessive. So, instead I decided to return a
> > single list/stream ('changes') along with a marker indicating the format
> > of that list/stream ('display_as').
> >
> > Then, that marker was also used to insert anchors into the stream
> > (display_as == 'anchor').
> >
> > Hope that clarifies the changes,
> > Alexey.
>
> Yes, it does. I'd forgotten about all those crazy variables ... what a
> mess. My instinct is to still shudder at the idea of the ViewVC libs
> dictating to the UI layer about UI-ish things... but then again, this is
> really the only way that EZT can know about the user-selected requested
> diff format. So I'm okay with leaving it as-is.
Well, maybe a better name for 'display_as' would be 'diff_block_format' or
something like that. It doesn't actually tell template how to display the
block, it tells the template what the block contains.
Thanks for merging the branch back to trunk!
Regards,
Alexey.
------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=2865422
To unsubscribe from this discussion, e-mail: [[email protected]].