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

Re: custom sorts? [was: dumper bug? need help.]

From: <cmpilato_at_collab.net>
Date: 2002-07-25 23:34:20 CEST

=?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <brane@xbc.nu> writes:

> cmpilato@collab.net wrote:
>
> >The custom sorting is still present. We sort by NODE_ID, then
> >COPY_ID, then TXN_ID. But it occurs to me that all we really need
> >nowadays is the `next-id' for determining the NODE-ID (just like the
> >other tables). The only thing that expects the sorted table is the
> >guy who generates new NODE-IDs.
> >
> >
>
> If the id is "[0-9a-z]\.[0-9a-z]\.[0-9a-z]", with the proper (node_id,
> copy_id, txn_id) order, then the default lexical sort will work the same
> way. +1 for getting rid of the custom sort, and using next-id.

Actually, this isn't true. I know because I tested it.

I did:

   db_dump -kp nodes | grep -e '^ [0-9a-z]\+' > out.txt
   db_dump -kp nodes | grep -e '^ [0-9a-z]\+' | sort > out-sorted.txt
   diff -u out.txt out-sorted.txt

And I got differences. Consider:

   [out.txt]
   0.0.0
   0.0.1
   0.0.2
   0.0.3
   ...

   [out-sorted.txt]
   0.0.0
   0.0.1
   0.0.10
   0.0.100
   ...

> With a bit of luck, the change may not even require a reload. But even
> if it does, IMNSHO we should try to support the stock db_dump/db_load.

No such luck.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 25 23:34:04 2002

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.