Changes between Version 4 and Version 5 of VisualizingDjangoChangesetDependencies


Ignore:
Timestamp:
May 9, 2007, 9:30:25 AM (18 years ago)
Author:
Ramiro Morales < >
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VisualizingDjangoChangesetDependencies

    v4 v5  
    11= Visualizing Django source code changeset dependencies =
    22
    3 When following the workflow I describe in '''![1]''' to be able to maintain a local copy of Django with selected changes backported from the SVN trunk development evolution to a 0.96 base copy I soon found myself in following situation:
     3When following the workflow I describe in '''![1]''' to be able to maintain a local copy of Django based on the 0.96 release with selected changes backported from the SVN trunk tip I soon found myself in following situation:
    44
    55Certain changeset ''C'' that I'd want to use wasn't being considered by '''![2]'''{{{darcs}}} as a potential candidate so it didn't offer me to apply it.
     
    77Later the cause became evident: The ''C'' changeset wasn't being considered by {{{darcs}}} because I had previously answered "no" when it offered me to apply a (chronologically previous) changeset ''B'' on which ''C'' depends (dependency in this context means both ''B'' and ''C'' modify some overlaping section of some file).
    88
    9 Given the fact that in {{{darcs}}} patches (changesets, patchsets) are first class citizens, it is easier to track and visualize the dependencies among them by using it together with some related '''![3]'''tools and '''![4]'''{{{GraphViz}}}.
     9Given the fact that in {{{darcs}}} patches (changesets, patchsets) are first class citizens, it is relatively easy (when compared with other revision control systems) to track and visualize the dependencies among them by using it together with some related '''![3]'''tools and '''![4]'''{{{GraphViz}}}.
    1010
    1111If we add a couple of ad-hoc scripts and some tips from the experience gained to the mix we can get something like this (partial output):
     
    2525
    2626# This filter changes the labels of the nodes of a Graphviz dot
    27 # file as generated by darcs-deps to only consist of the patchset
     27# file as generated by darcs-deps to be just the patchset
    2828# number.
    2929#
     
    4747#!/bin/sh
    4848
    49 # This filter modifies the properties of the nodes of a Graphviz dot file
    50 # to add a relative "href" property with the same value as the node label.
     49# This filter modifies the properties of the nodes of a Graphviz dot
     50# file to add a relative URL "href" property with the same value as
     51# the node label.
    5152#
    5253# It depends on the labels being the number of the revision/changeset
     
    8990{{{darcs-deps}}} is ran on the {{{inmutable}}} {{{darcs}}} repository (please refer to '''![1]''' to see what that repository is and how to create it), it generates a {{{Graphviz}}} dot language description of the dependancy graph.
    9091
    91 We filter that output first through our two custom filtering scripts (see above) to change some graph node attributes, and then through {{{unflatten(1)}}} (part of {{{Graphviz}}}) to enhance the layout of the graphic representation.
     92We filter that output first through our two custom filtering scripts (see above) to change some graph node attributes, and then through {{{unflatten(1)}}} (part of the {{{Graphviz}}} suite) to enhance the layout of the graphic representation.
    9293
    93 And finally we feed the result to {{{dot(1)}}} (also part of {{{Graphviz}}}) to get our final output. For some output methods (PDF [via Postscript] and server/client side image maps) we'll be able to click on the nodes and get our Web browser to go to the Django Trac page associated with the changeset at hand.
     94Finally, we feed the result to {{{dot(1)}}} (also part of {{{Graphviz}}}) to get our final output. For some output methods (PDF [via Postscript], server/client side image maps) we'll be able to click on the nodes and get our Web browser to go to the Django Trac page associated with the changeset at hand.
    9495
    9596For the PDF output we use {{{poster(1)}}} on the intermediate Postcript output to create a legible non-cropped multi-page output.
    9697
    97 == Example output ==
     98== Files ==
    9899
    99 Status as of [5165] (May 8 2007 3:43 UTC):
     100Generated as of revision [5165] (May 8 2007 3:43 UTC).
    100101
    101 Files hosted elsewhere while the Trac guys solve the [http://trac.edgewall.org/ticket/4087 bug] that keeps us from attaching binary files to the Wiki and tickets:
     102Some files are hosted elsewhere while the Trac crew solve the [http://trac.edgewall.org/ticket/4087 bug] that keeps us from attaching binary files to the Wiki and tickets.
     103
     104=== DOT files ===
     105
     106 * Graph as generated by {{{darcs-deps}}}, before post-processing: [attachment:django-deps-r5165-orig.dot django-deps-r5165-orig.dot]
     107 * After post-processing, before being feed to {{{dot}}}: [attachment:django-deps-r5165-final.dot django-deps-r5165-final.dot]
     108
     109=== Example output ===
    102110
    103111 * PNG output: [http://rmorales.net/media/django-deps/django-deps-r5165.png django-deps-r5165.png]
    104112 * PDF output: [http://rmorales.net/media/django-deps/django-deps-r5165.pdf django-deps-r5165.pdf]
     113
     114== Notes ==
     115
     116 * The "Tailorization" node represents an initial synthetic patch created by {{{darcs}}} from which every other leaf node depends on, perhaps it would be better to find a way to eliminate it from the graph.
     117 * I attempted without success modifying the {{{darcs-deps}}} script to eliminate the nodes that have no other nodes depending on them, next try will be using {{{Graphviz}}}'s {{{gvpr(1)}}}.
    105118
    106119== References ==
     
    108121 1. [http://seeonee.homeip.net:81/intdoc/DjangoPost096 Django: My post 0.96 branch]
    109122 2. [http://darcs.net darcs]
    110  3. [http://scratchbox.org/~ttimonen/repos/darcs-deps/darcs-deps darcs-deps] (darcs repo: http://scratchbox.org/~ttimonen/repos/darcs-deps)
     123 3. [http://scratchbox.org/~ttimonen/repos/darcs-deps/darcs-deps darcs-deps] (darcs repo: http://scratchbox.org/~ttimonen/repos/darcs-deps) (Perl script)
    111124 4. [http://www.graphviz.org/ GraphViz]
    112125 5. [http://www.cs.wisc.edu/~ghost/ Ghostscript]
    113126 6. [ftp://ftp.ics.ele.tue.nl/pub/users/jos/poster/poster.tar.gz poster]
     127
    114128== Feedback ==
    115129
Back to Top