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

How to lock a file?

From: Andreas Podgurski <ml.andreas.podgurski_at_gmx.de>
Date: 2005-10-08 22:03:43 CEST

Hi List!
Sorry, if my questions are a bit foolish, but I'm trying to dig into the
svn-api, with mixed success. I havn't found a dedicated list for this, so
I'll try it here.
I'm having a problem with the svn_client_lock function. The client I'm
writing is for a 3D-application and handles single files only. To do so, I
created a little helper function:

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:
- Why does it return this error message?
- In the SDK-manual, it reads about paths only, but locks are possible to
files only. Do paths mean file-paths and not directory-paths in this case?
- Have I missed something to get it correctly working? In the cmdline tool,
it pushes the options on the array, while I'm building it by hand.

Would be great, if someone could lead me to the correct way, as I'm stucked
with this at the moment...

Thanks in advance,
Andreas "SunSailor" Podgurski

-- 
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 8 22:04:31 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.