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

RE: svn commit: rev 1987 - branches/issue-654-dev/subversion/libsvn_fs

From: Bill Tutt <rassilon_at_lyra.org>
Date: 2002-05-21 19:28:16 CEST

> From: cmpilato@tigris.org [mailto:cmpilato@tigris.org]
>
[....]
> +--
> +
> +Deltification is currently the only process in place that asks the
> +question, "Where is my next successor?" Currently the question is
> +answered by doing a little node revision id mathematics; that's no
> +longer an option. Input to deltification is still root/path, so what
> +might a new algorithm be?
> +
> +--

This is kind of funky now. A portion of the answer is very similar to
the problem of "What should my CopyID be for a new NodeRevision I need
to create now?"

The solution to this general question (as you noticed elsewhere) is to
acquire it during your path walk.
i.e.: svn_fs_node_id (&(args.id), root, path, pool)

The other funky part is taking this "successor CopyID" calculation in
combination with the TxnID ordering.

i.e.:
get TXN_ID from node revision id.
Lookup REVISION with TXN_ID
I = 1
Lookup the POSSIBLE_SUCCESSOR_TXN_ID for REVISION+I
While REVISION+I is valid
      AND Not Exists NodeID.<calculated
CopyID>.POSSIBLE_SUCCESSOR_TXN_ID:
   I++
   Lookup the POSSIBLE_SUCCESSOR_TXN_ID for REVISION+I

If you find a NodeRevision that exists, you've found your successor, and
you should be able to assert that the predecessor is the NodeRevision
you started from.

Otherwise there is no possible successor.

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 21 19:29:28 2002

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