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

Re: JavaHL ISVNClient.vacuum yields assertion failed (1.9.2)

From: Christian K. <christian.k.2510_at_gmail.com>
Date: Fri, 23 Oct 2015 19:30:14 +0200

[answer directly to users_at_subversion.apache.org, seems like with Google
Groups and subversion_users_at_googlegroups.com things get lost]

Hello Philip,

the path being used is of the form C:\Temp\wc, it has been generated using

The error was observed on a Windows 7 x64 system with Java 8 x64 using
SlikSvn 1.9.2 x64 binaries. The error can be reproduced with a minimal
main() similar to the one you provided.

Based on your answer (especially the doc. comment on svn_dirent_is_absolute,
which talks about x:/ with *slash*) lead me to some more experiments.
Obviously the error is caused by the backslash in the path, when using the
method with slashes the assert is not hit.
This is surprising since all other JavaHL methods operating on working
copies don't mind the backslashes.

Best regards,


-----Ursprüngliche Nachricht-----
Von: Philip Martin [mailto:philip.martin_at_wandisco.com]
Gesendet: Freitag, 23. Oktober 2015 14:36
An: christian.k.2510_at_gmail.com
Cc: subversion-users <subversion_users_at_googlegroups.com>
Betreff: Re: JavaHL ISVNClient.vacuum yields assertion failed (1.9.2)

christian.k.2510_at_gmail.com writes:

> trying to use the new ISVNClient.vacuum method from the JavaHL binding
> throws an exception pointing to the following assertion failure:
> svn: In file '..\..\..\subversion\libsvn_client\cleanup.c' line 252:
> assertion failed (svn_dirent_is_absolute(dir_abspath))
> The exception is thrown even though the path used is an absolute path.
> Looking at the SVNClient.cpp file it seems like the path is not
> properly converted to a C-String using .c_str() as it is done in other
> methods within SVNClient.cpp.

No, path is already C string. The missing c_str() stuff is some additional
code to catch passing a NULL path, it should be added but it is not the
cause of your problem.

The JNI wrapper works when I pass an absolute path:

import org.apache.subversion.javahl.*;
public class xx {
  public static void main(String argv[]) {
    ISVNClient client = new SVNClient();
    try {
      client.vacuum("/tmp/wc", true, true, true, true, true);
    } catch(ClientException e) {

What is odd is that the C code requires an absolute path. It was a change
made in r1548088 and before that it converted to absolute. I'm not sure why
that change was made.

The check that is failing is this one:

/** Return TRUE if @a dirent is considered absolute on the platform at
 * hand. E.g. '/foo' on Posix platforms or 'X:/foo', '//server/share/foo'
 * on Windows.
 * @since New in 1.6.
svn_dirent_is_absolute(const char *dirent);

What platform are you using and what path are you passing?

Philip Martin
Received on 2015-10-23 19:30:32 CEST

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.