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

Re: How to lock a file?

From: Andreas Podgurski <ml.andreas.podgurski_at_gmx.de>
Date: 2005-10-08 23:02:41 CEST

> --- Ursprüngliche Nachricht ---
> > svn_error_t *pError = NULL;
> > apr_array_header_t *pTargets;
> > const char *pUTF8File;
> >
> > svn_path_cstring_to_utf8(&pUTF8File,pFile,pLocalPool);
> > pTargets = apr_array_make(pLocalPool,1,sizeof(const char *));
> > APR_ARRAY_PUSH(pTargets,const char *) = pUTF8File;
> >
> > if((pError =
> > svn_client_lock(pTargets,pComment,bSteal,pRuntime->pContext,pLocalPool))
> !=
> > NULL)
> > throw CollectError(pError,__FILE__,__LINE__);
> > Calling this throws an error "Working copy
> > 'C:\Development\Subversion\VAGE\Testdaten\Mauscursor' locked". Funnily,
> the
> > path is truncated by its suffix. So, now my questions are:
> That's normal. IN the working copy, only directories are locked for
> serialized access to the admin directory.
> > - Why does it return this error message?
> Hard to say without knowing what else your program is doing. Is it doing
> something else before this svn_client_lock call that might keep a
> write-lock on the WC. (You add a breakpoint in a debugger and run svn
> status right before this call).
Actually nothing - I'm checking the file status on a regular basis and on
the lock command, I call that code snipet with the name, the application
gives back. Nothing more at the moment. Actually, can I really call the lock
command on the WC-Path or do I need to do it on the URL-Path? Maybe with my
path encoding is something wrong? I'm doing the svn_path_cstring_to_utf8
conversion only at the moment, with the applications current file name.

Thanks in advance,
Andreas "SunSailor" Podgurski

Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
DSL-Flatrate für nur 4,99 Euro/Monat*  http://www.gmx.net/de/go/dsl
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 8 23:03:21 2005

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.