[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: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 26 Mar 2012 21:12:22 +0200

SÚrgio Basto wrote on Mon, Mar 26, 2012 at 20:03:00 +0100:
> On Mon, 2012-03-26 at 20:33 +0200, Daniel Shahaf wrote:
> > SÚrgio Basto wrote on Mon, Mar 26, 2012 at 19:27:42 +0100:
> > > On Thu, 2012-03-22 at 08:23 +0000, Julian Foad wrote:
> > > > 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))
> > >
> > > Thanks, can you do some draft code example ? , how we got apr_hash
> > > sorted by name ? with a for which construct a sort_apr_hash ?
> >
> > Call svn_sort__hash() :-)
>
> Could someone write some code as example , please, I hate try to
> visualize .
>
> we already have a svn_sort__hash() or have to do it ?

The former; it's declared in svn_sorts.h.

The workflow I am assuming here is that you keep the data in a hash as
it's passed around, and then sort it at the last minute.
Received on 2012-03-26 21:15:03 CEST

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