I'm using the RC3 of SVNKit 1.7.0 to create an app to restructure a bunch of
projects. Everything was working great until I realized that I wasn't
preserving the history when I committed. Here is a simplified use case.
Repository structure:
/path/to/project (folder)
/path/to/project/1 (folder)
/path/to/project/1/Test.java (file)
/path/to/project/2/ (empty folder)
Here is the code:
File co = new File("C:/svnkit");
File orig = new File("C:/svnkit/1/Test.java");
File newFile = new File("C:/svnkit/2/Test.java"); //<- does not exist yet
SVNURL url = SVNURL.parseURIEncoded("http://path/to/project");
SVNClientManager cm = SVNClientManager.newInstance();
cm.getUpdateClient().doCheckout(url, co, SVNRevision.UNDEFINED,
SVNRevision.HEAD, SVNDepth.UNKNOWN, true);
cm.getMoveClient().doMove(orig, newFile);
It appears the core of the problem is that according to a svn client, the
original is "missing" and the new one is "non-versioned". If I use the client
to to do the move, it shows up as a "deleted" and "added", which will retain
the history. I tried deleting and adding after the move, but that didn't
really help with my history issue.
Is this expected? Is there something I'm doing wrong?
I just tried with the 1.3.7 client, and it looks like it maintains the history
correctly. Should I submit an issue? Changelog doesn’t look like the rc4 update
addressed it.