Kean Johnston wrote:
>
> Attached is my first patch for Subversion, so go easy with the
> flames :) This is to change the order in which files are shown
> by and 'svn diff', such that all files in a directory are shown
> first, alphabetically, then all directories, also alphabetically.
Well, jolly good to get this ball rolling. Before actually reviewing the
patch, it will be interesting to see what people think of the idea.
My point of view is that output in some sort of deterministic order is very
valuable. Also that we don't have to make all of Subversion's operations
happen in deterministic order in a single release; we can do them as and when.
Each one will benefit some people.
One slightly unsettling aspect is that whatever order we choose will, once it
has been released, be the one and only order, because for some operations the
order is determined by the server and, for others, by the client, and, for
operations like "status" and "update", by both. Well, I suppose we could use
protocol options to negotiate an order, to some extent. I don't think this
should put us off.
For this particular patch, I need to ask: what kinds of diffs does it guarantee
to be in order? From a quick look, I'd guess BASE-to-working diffs in a WC,
and repos-to-repos diffs, but not repos-to-WC diffs. Do you think that is
correct? (I haven't tried it.)
> I put the function svn_repos_sort_by_type_and_path() in
> libsvn_repos, since that is the only consumer of the function.
Just to address that point, without getting into reviewing the patch: yes,
that's a good place for it, but its name should have a double underscore to
indicate it is private, and that function doesn't actually sort, it just
compares its arguments, so either rename it or (I'd prefer) make it take a hash
and return a sorted array.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 20 00:20:42 2005