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

RE: CVS update: MODIFIED: libsvn_wc ...

From: Roman Neuhauser <neuhauser_at_mail.cz>
Date: 2001-08-31 09:30:12 CEST

At 04:15 8/31/2001, Sander Striker wrote the following:
--------------------------------------------------------------
>> Given these targets:
>> contact.html
>> docs/mailinglist.txt
>> orderform.html
>> docs/biography.pdf
>>
>> The sort algorithm, unlike what Ben and I both seemed to think, does
>> NOT do a "dirs first" approach--it simply sorts paths, promising that
>> children of the same parent will be grouped.
>>
>> So, the output of this sort would be:
>> contact.html
>> docs/biography.pdf
>> docs/mailinglist.txt
>> orderform.html
>>
>> NOT:
>> docs/biography.pdf
>> docs/mailinglist.txt
>> contact.html
>> orderform.html
>>
>> AND NOT:
>> contact.html
>> orderform.html
>> docs/biography.pdf
>> docs/mailinglist.txt
>>
>> As you can see, this means when we commit `contact.html' we will lock
>> its parent directory, `/'. The we do `docs/biography.pdf' and
>> `docs/mailinglist.txt', and we lock `docs/'. Finally, we come to
>> `orderform.html', and we need to lock `/' -- but it has already been
>> locked.
>>
>> If the sorting algorithm promised to put grandchildren of a given
>> parent above their...uncles and aunts? (a dirs-first sorting) then we
>> wouldn't run into this. But that's not required by the editor.
>
>The changes to svn_path_compare_paths are fairly trivial. I can
>modify that this weekend to let it do:
> contact.html <
> orderform.html <
> docs/biography.pdf <
> docs/mailinglist.txt
>
>Before falling back to strncmp it is simply a matter of '/' counting.
>The path with lesser directory seperators in it should be before the
>other path. When the counts are the same, fall back to strncmp.

Wouldn't just checking whether the dir's been locked already be easier
and _cheaper_ than sorting the targets? I'm not really familiar with the
SVN internals, so excuse this question: does one 'svn commit' after
'svn add'? You could be adding lots of files in one commit, sorting
seems like an unnecessary burden. What have I missed?

sleep-deprived

__________________________________________________
Roman Neuhauser

neuhauser@mail.cz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:37 2006

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.