You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@red-bean.com> on 2008/08/05 16:00:35 UTC

Re: Do lock tokens need to be unique?

"Chia-liang Kao" <cl...@clkao.org> writes:
> 2008/7/24 Karl Fogel <kf...@red-bean.com>:
>> Chia-liang Kao <cl...@clkao.org> writes:
>>> While talking to Karl today I explained that I intend to make the
>>> tokens available for the pre-commit hook, presumably via STDIN.  So I
>>> will change the svn_fs_access_add_lock_token to take path along with
>>> token, and add an accessor function to get the path/token pairs out
>>> for pre-commit hook to use.  Does this make sense?
>>
>> Yes :-).
>
> I was almost done with the patch, but discovered mod_dav_svn handles this a
> bit differenetly.  I had a chat with justin, it seems in protocol layer, when
> committing lock tokens are provided by client in the If header, so the path
> info here is lost.
>
> so in this case we might need to revision the ra_get_commit_editor API to take
> only a list of tokens...

I don't think revving that API is a huge problem.

I didn't understand the "to take only a list of tokens" part, though.
It already takes a hash of lock tokens; anyway, isn't it the paths
you're missing, not the tokens?  But the hash is keyed by path...

If you could formally propose the API rev you have in mind, that might
help.

Thanks,
-Karl

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

Re: Do lock tokens need to be unique?

Posted by Chia-liang Kao <cl...@clkao.org>.
2008/8/5 Karl Fogel <kf...@red-bean.com>:
>> I was almost done with the patch, but discovered mod_dav_svn handles this a
>> bit differenetly.  I had a chat with justin, it seems in protocol layer, when
>> committing lock tokens are provided by client in the If header, so the path
>> info here is lost.
>>
>> so in this case we might need to revision the ra_get_commit_editor API to take
>> only a list of tokens...
>
> I don't think revving that API is a huge problem.
>
> I didn't understand the "to take only a list of tokens" part, though.
> It already takes a hash of lock tokens; anyway, isn't it the paths
> you're missing, not the tokens?  But the hash is keyed by path...

the ra api does take hash of lock tokens, but i was looking with
justin at the individual put request (for dav server) where only lock
tokens were given. but turned out the merge request at the end does
have all the info I needed, so i sent the patch: [PATCH] Make
pre-commit hook have access to lock tokens

http://article.gmane.org/gmane.comp.version-control.subversion.devel/102717

Cheers,
CLK

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