Re: [viewvc-dev] Is this property-diff branch ready for reintegration?
"C. Michael Pilato" <[email protected]> Thu, 27 Oct 2011 09:17:23 -0400
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.devel |
|---|---|
| Organization | CollabNet, Inc. |
| Message-ID | <[email protected]> |
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.
--
C. Michael Pilato <[email protected]>
CollabNet <> www.collab.net <> Distributed Development On Demand
------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=2865348
To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk6pWeMACgkQokEGqRcG/W7sHQCfSItR1+7QcJ7AbThfHWgNfnyH 52QAn2OEdmS/FhTBjQL17w4pghfGkgJX =dPWK -----END PGP SIGNATURE-----