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

Re: svn_client_revert2 skips files for no obvious reasons

From: Roman Kellner <muzungu_at_gmx.net>
Date: Mon, 05 Dec 2011 16:23:10 +0100

> -------- Original-Nachricht --------
> Datum: Mon, 5 Dec 2011 11:38:12 +0100
> Von: Stefan Sperling <stsp_at_elego.de>
> An: Roman Kellner <muzungu_at_gmx.net>
> CC: users_at_subversion.apache.org
> Betreff: Re: svn_client_revert2 skips files for no obvious reasons
>
> On Mon, Dec 05, 2011 at 09:59:44AM +0100, Roman Kellner
> wrote:
> > Hi
> >
> > We are implementing a wrapper around a SCC-SVN client in order to over
> come
> > some flaws between the IDE and the SCC-SVN client.
> >
> > Now we need to use the svn_client_revert2 function in order to revert
> > scheduled actions (add, delete) when the commit fails due to the commit
> > hock.
> >
> > Order:
> > WrapperSccRename()
> > -> rtn = SccSvnClientSccRename()
> > --> rtn != OK : svn_client_revert2() with the same files passed to
> > SccRenameSccSvnClient()
> > return from WrapperSccRename()
> >
> > When using the
> >
> > * svn_client_revert2 (  const
> > apr_array_header_t *  paths,
>
> > svn_depth_t  depth,
>
> > const apr_array_header_t * 
> changelists,
> > svn_client_ctx_t * 
>
> > ctx,
> apr_pool_t
> > *  pool
> >
> > function it skips the files given in paths. The function thinks the
> files
> > are not under version control (notify says -> skip file).
> >
> > The filenames from the IDE are somewhat unusual/weird: e.g.
> > @POE_at_ProgramUnitName.ZIP
> >
> > On the command line we had to add the extra @ to prevent half of the
> > filename be eaten as PEG revision. But with the extra @ reverting from
> the
> > command line or with TortoiseSVN works well.
> > Also if instead of the files in paths the directory where the files are
> > located is passed, then svn_client_revert2() does the job.
> > But reverting the whole directory is not what we need and want.
>
> What paths are you actually passing in the 'paths' array?

D:\NewFolder\iec61131\ProjectName\SCC\@POE_at_OriginalFilename.ZIP
D:\NewFolder\iec61131\ProjectName\SCC\@POE_at_OriginalFilenameRENAMED.ZIP

>
> Are you passing absolute paths?

Yes.

> Are you canonicalising the paths properly?

We are not doing extra things to the paths, but I would guess that the path
as above already is canonicalized. Wrong?

>
>
> The @ syntax parsing is done by the 'svn' client before it calls into
> the client library. So you should not append '@' to the filenames passed
> to svn_client_revert2().
>
> > What can be the cause?
> > How comes the directory works with svn_client_revert2() and svn revert
> and
> > TortoiseSVN too but not the files?
>
> Have you taken a look at how the command line client handles its
> arguments
> and what it passes to svn_client_revert2()?
> See
> https://svn.apache.org/repos/asf/subversion/trunk/subversion/svn/revert-cmd.c
> and the functions it calls.
We had a look and could not recognize anything spezial that we could have
forgotten (v.1.6.17). Now with 1.7.1 the new check function
             SVN_ERR(svn_cl__check_targets_are_local_paths(targets));

has been added. The function basically check that it is not a URL, what I
can tell from the code.

Thanks for the hints.

Roman
>
>
        

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
Received on 2011-12-05 16:23:44 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.