[svk-devel] Re: All Commands releasing giant_lock to early

Michael Hendricks michael at ndrix.org
Sat Feb 24 12:35:23 EST 2007


On Fri, Feb 23, 2007 at 02:18:08AM +0100, Bernhard Weisshuhn wrote:
>   if ($svk->info($copath)) {
>     $svk->{xd}->giant_lock(); #                    <===
>     $svk->checkout("//$project/",$copath) && die;
>     $svk->{xd}->store();      #                    <===
>   }
>   else {
>     $svk->switch("//$project/",$copath) && die;
>     $svk->update($copath) && die;
>   }
> 
> Without the lines marked with the arrows, the statefile is not updated
> with the new checkout, and thus subsequent runs fail.  I suspect other
> commands changing checkouts and depotmap to have similar requirements.
> 
> Is this the recommended way to do it, or is this a bug in the locking
> code and these things should work without the user taking care of the
> locking?

I don't know if this is a locking problem or not, but your comment
helped me realize why some of my svk scripts have occassional problems
after checkouts.  Thanks for the post.

-- 
Michael


More information about the svk-devel mailing list