You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bill Tutt <ra...@lyra.org> on 2002/05/21 17:28:16 UTC

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

> 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

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

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
cmpilato@collab.net writes:
> Still, I think there's an only slightly painful way to do it, but I
> don't feel like typing it up right now.  :-)

Or is this margin just too small to contain it?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by cm...@collab.net.
"Bill Tutt" <ra...@lyra.org> writes:

> The code he's talking about is for the admin tool to specifically
> deltify the target revision against its successor. The real code that
> gets kicked off from normal commits does what you suggest. 

Thanks, Bill, for remembering that.  In the regular "deltify after a
commit" case, yeah, we can just deltify in the manner mentioned by
Alon.  But `svnadmin deltify' is different story.  

Still, I think there's an only slightly painful way to do it, but I
don't feel like typing it up right now.  :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Bill Tutt <ra...@lyra.org>.
The code he's talking about is for the admin tool to specifically
deltify the target revision against its successor. The real code that
gets kicked off from normal commits does what you suggest. 

Bill
----
Do you want a dangerous fugitive staying in your flat?
No.
Well, don't upset him and he'll be a nice fugitive staying in your flat.
 

> From: Alon Ziv [mailto:alonz@nolaviz.org]
> 
> The lurker strikes again...
> Why even ask this question? I mean, woudn't it be safer/easier/better
to
> always start
> deltification _from_ the new version, get its predecessor ID, and
deltify
> that?
> 
>     -az
> 
> ----- Original Message -----
> From: "Bill Tutt" <ra...@lyra.org>
> To: <de...@subversion.tigris.org>
> Sent: Tuesday, May 21, 2002 20:28 PM
> Subject: RE: svn commit: rev 1987 -
> branches/issue-654-dev/subversion/libsvn_fs
> 
> 
> >
> > > 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
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Alon Ziv <al...@nolaviz.org>.
The lurker strikes again...
Why even ask this question? I mean, woudn't it be safer/easier/better to
always start
deltification _from_ the new version, get its predecessor ID, and deltify
that?

    -az

----- Original Message -----
From: "Bill Tutt" <ra...@lyra.org>
To: <de...@subversion.tigris.org>
Sent: Tuesday, May 21, 2002 20:28 PM
Subject: RE: svn commit: rev 1987 -
branches/issue-654-dev/subversion/libsvn_fs


>
> > 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
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by cm...@collab.net.
"Bill Tutt" <ra...@lyra.org> writes:

> 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.

Yep yep.  If I'd actually read your whole mail, I would have seen that
I didn't *need* to type up a solution, because Tutt's already done
it. :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org