Changes between Version 4 and Version 5 of VisualizingDjangoChangesetDependencies
- Timestamp:
- May 9, 2007, 9:30:25 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
VisualizingDjangoChangesetDependencies
v4 v5 1 1 = Visualizing Django source code changeset dependencies = 2 2 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 copyI soon found myself in following situation:3 When 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: 4 4 5 5 Certain 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. … … 7 7 Later 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). 8 8 9 Given the fact that in {{{darcs}}} patches (changesets, patchsets) are first class citizens, it is easierto track and visualize the dependencies among them by using it together with some related '''![3]'''tools and '''![4]'''{{{GraphViz}}}.9 Given 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}}}. 10 10 11 11 If 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): … … 25 25 26 26 # This filter changes the labels of the nodes of a Graphviz dot 27 # file as generated by darcs-deps to only consist ofthe patchset27 # file as generated by darcs-deps to be just the patchset 28 28 # number. 29 29 # … … 47 47 #!/bin/sh 48 48 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. 51 52 # 52 53 # It depends on the labels being the number of the revision/changeset … … 89 90 {{{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. 90 91 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.92 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 the {{{Graphviz}}} suite) to enhance the layout of the graphic representation. 92 93 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] andserver/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.94 Finally, 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. 94 95 95 96 For the PDF output we use {{{poster(1)}}} on the intermediate Postcript output to create a legible non-cropped multi-page output. 96 97 97 == Example output==98 == Files == 98 99 99 Status as of [5165] (May 8 2007 3:43 UTC): 100 Generated as of revision [5165] (May 8 2007 3:43 UTC). 100 101 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: 102 Some 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 === 102 110 103 111 * PNG output: [http://rmorales.net/media/django-deps/django-deps-r5165.png django-deps-r5165.png] 104 112 * 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)}}}. 105 118 106 119 == References == … … 108 121 1. [http://seeonee.homeip.net:81/intdoc/DjangoPost096 Django: My post 0.96 branch] 109 122 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) 111 124 4. [http://www.graphviz.org/ GraphViz] 112 125 5. [http://www.cs.wisc.edu/~ghost/ Ghostscript] 113 126 6. [ftp://ftp.ics.ele.tue.nl/pub/users/jos/poster/poster.tar.gz poster] 127 114 128 == Feedback == 115 129