Hello Enrico,

What version of the native Subversion client do you use? It might be
that you've encountered compatibility issue - latest stable version of
SVNKit does not yet support working copy format produced by Subversion
1.7.0.

Otherwise your code looks fine. SVNWCUtil.isVersionedDirectory method
basically checks for '.svn' child directory presence and whether
'.svn/entries' file within it is valid. By default  '.svn' directory
is not shown by 'ls' command or by a UI tools, so you may miss it
while it is there.

You may also use SVNWCClient.doInfo(...) call - it will not only let
you know whether file or directory is under version control, but also
will report some useful information about it in SVNInfo object.

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://hg4j.com/ - Java Mercurial Library!
http://sqljet.com/ - Java SQLite Library!



On 20 October 2011 17:13, Enrico Musu <[email protected]> wrote:
>
> Hi guys,
>
> Let me anticipate that I am quite new, but I am having harsh time in
> managing a previously checked out (not with svnkit but with the simple svn
> command in the terminal) working copy from an svn repository.
>
> The problem relies in the fact the SVNWCUtils.isVersionedDirectory doesn't
> recognize the dir to be under a revision control (the shell svn commands
> works just fine).
>
> I tried to check out the same directory from the svn repository and perform
> the same isVersionedDirectory check and it passes it.
>
> Am I forgetting any initialization maybe?
>
> here's the code
>
> <code>
>    ....
>    private SVNClientManager client;
>    private ISVNOptions options;
>    ISVNAuthenticationManager auth;
>
>    static {
>        DAVRepositoryFactory.setup();
>        // for svn (over svn and svn+ssh)
>        SVNRepositoryFactoryImpl.setup();
>    }
>   ...
>
>   {
>       ....
>        options = SVNWCUtil.createDefaultOptions(true);
>        auth = SVNWCUtil.createDefaultAuthenticationManager();
>        client = SVNClientManager.newInstance(options, auth);
>   }
>   ...
>
> public void checkout(File node) throws VCSException {
>
>        File dstPath = new File("/Users/Enrico/SVNTest");
>        File wc = new File("/Users/Enrico/work/trunk");
>
>        System.out.println(SVNWCUtil.isVersionedDirectory(dstPath));
>        System.out.println(SVNWCUtil.isVersionedDirectory(wc));
>        SVNWCUtil.
>    }
>
> dstPath is the directory checked out with svnkit, wc is the pre-existing
> dir. As a result I get: True and False.
>
>
>
> Thx for your help
> Enrico
>
>
> --
> View this message in context: 
> http://old.nabble.com/Dir-is-not-in-revision-control-tp32690366p32690366.html
> Sent from the SVNKit - Users mailing list archive at Nabble.com.
>
>
>

Reply via email to