You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2005/02/13 18:51:31 UTC

Re: svn commit: r12975 - trunk/tools/client-side

danpat@tigris.org writes:

> Author: danpat
> Date: Fri Feb 11 22:14:06 2005
> New Revision: 12975
>
> Modified:
>    trunk/tools/client-side/svn-graph.pl
> Log:
> Rewrite of the history tracing algorithm.  It now actually generates
> a graph that matches what's in the repository.  The old method was
> somewhat buggy.
>
> The output is now also produced in a single loop, while we're traversing
> the history.
>
> The new algorithm goes something like this:
>
> For each revision:
>   For each changed path in this revision:
>     If the action was "D", and we are tracking that path
>       Set the label as "Deleted in rREVISION" in the .dot output
>       Remove this path from the tracking list
>     
>     If this path has a copyfrom value, and that value is in our "interesting" list:
>       Put this path in our interesting list
>       Put this path in our tracking list
>       Print out an edge from the copyfrom -> this
>
>     For each parent path of this path:
>       If we're tracking the parent path, and it's last revision was not this one:
>         Print out an edge from the last update to the parent to this one
>         Put this parent path in the interesting list
>         Update the tracking revision for the parent path to this one
>  
> And viola, we get a graph.
>
> This algorithm has the drawback that it prints a new node every time a path
> is updated (i.e. update /trunk/asdf/foo, and you get a new node for /trunk).
> Even though this is correct, we're probably not interested in it for
> the purposes of this graph.  Still TODO is to filter out all the nodes
> that are never copied from (or at least, make it optional to print them
> out, you probably rarely want them).

Don't put documentation into a log message, put it into the file
instead. If it's in the file it is immediately visible to somebody
reading the code, if it's in a log message that person may not even
realise the documentation exists.

>
> * tools/client-side/svn-graph.pl (process_revision): Complete rewrite
>   of the history tracing algorithm.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r12975 - trunk/tools/client-side

Posted by Julian Foad <ju...@btopenworld.com>.
> danpat@tigris.org writes:
>>Log:
[...]
>>The new algorithm goes something like this:
[...]

Philip Martin wrote:
> Don't put documentation into a log message, put it into the file [...]

Daniel, you can change your log message by using "svn propedit --revprop 
-r12975 svn:log".  If you don't have time to do so at the moment, please say. 
If you're not sure what change is appropriate, I suggest removing everything 
except the first paragraph and the "* tools/client-side/svn-graph.pl" section. 
  If you want to preserve implementation notes like those, but not in the 
source file, you could create a documentation file, maybe "svn-graph.txt".

By the way, the French for "There you see!" is "voilĂ !".

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org