0

I want to control my Subversion environment (Sliksvn 1.8.10) with a small Java programm on a Windows 7 64 bit machine. I need to use JavaHL (1.8.x) not SVNKIt. I have implemented a funktion to checkout a repository, add files to a work copy and commit files to repository. The checkout and the add function works fine so far. The problem ist now, that the commit-funktion don't work correctly.

public void commit()
{

Set<String> paths = new HashSet<String>();
paths.add( "C:\\Users\\XXX\\Documents\\SVNTEST\\Test3" );
Depth dep = Depth.infinity;
);


CommitMessageCallback handler = new CommitMessageCallback()
{
@Override
public String getLogMessage(Set<CommitItem> arg0) {
    // TODO Auto-generated method stub
    System.out.println(arg0.size());
    return null;
}
};

CommitCallback callback = new CommitCallback()
{

@Override
public void commitInfo(CommitInfo arg0) {
    // TODO Auto-generated method stub
    System.out.println(arg0.getAuthor());

}
};
try
{

  client.commit( paths, dep, true, false, null, null, handler, callback );

}
catch( ClientException e )
{
  // TODO Auto-generated catch block
  e.printStackTrace();
}

}

When i process the commit function, then i get from the CommitMessageCallback function the amount of the commit items. This works still. My problem is now, that don't receive any CommitInfo from the CommitCallback function. I think maybe, the process breaks up in der subversion environment and my function get no result. After the process, the commit Items are still in svn status "Item is scheduled for Addition".

I work on this problem since a few days with different version of the JavaHL.jar api, but it was not successful. The big problem is also, that i receive no error message and i dont know what is wrong in code.

Have anybody a idea what is wrong in my commit function ? Perhaps is the libsvnjavahl-1.dll file not compatible with certain JavaHL Api's ?

Thank you very much

Best regards Simon

1 Answers1

0

Okay, i solved the problem now. The easy solution was to use the org.tigris.subversion instead of the org.apache.subversion library classes. But the question is, why exist two different version from the JavaHL library ?