[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: random sort of svn status and svn diff

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 22 Mar 2012 13:14:31 +0100

2012/3/22 Julian Foad <julianfoad_at_btopenworld.com>:
> Sérgio Basto wrote:
>
>> Philip Martin wrote:
>>>  Or you could rebuild the current APR with a
>>>  one-line patch to set ht->seed to 0 in apr_hash.c:apr_hash_make.
>>
>> I think when subversion receive the result of this apr_function , we
>> should do the sort , ie , subversion should not depend on sort or not
>> sort of the apr .
>>
>> So where in source code we have the return of apr function ?
>
> There is not just one place, there are many places, even within the diff code.  Start in subversion/svn/diff-cmd.c, at svn_cl__diff(), and follow the function calls down.  For a WC-to-WC diff, these are the main calls:
>
>   svn_cl__diff
>     |
>     svn_client_diff[_summarize]6, svn_client_diff[_summarize]_peg2
>       |
>       svn_wc_diff6
>         |
>         svn_wc__internal_walk_status
>           |
>           get_dir_status
>             |
>             /* Walk all the children of this directory. */
>             for (hi = apr_hash_first(subpool, all_children);
>                  hi; hi = apr_hash_next(hi))
>
> This place determines the order of entries within a directory, for a WC-to-WC diff.  That's just one of the code paths involved in diff.  There are several others, depending on the kind of diff.  For diffs against the repository, it is more complex.  Also
> look for code that determines the order of property changes.

This reminds me of something: it may be coincidence, but up until now
(until 1.7.x that is) 'svnlook changed -rX' and 'svnlook diff -rX'
presented the files in the same order. I like this behavior, because
it's nice when composing post-commit emails: the list of changed files
on top, followed by the actual diff ... both following the same order.

Anyway, no biggie, all I'm saying is: +1 for introducing some stable
ordering here ...

-- 
Johan
Received on 2012-03-22 13:15:23 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.