> cm.getMoveClient().doMove(orig, newFile); Please, use cm.getCopyClient().doCopy(...) with isMove parameter set to 'true'.
Alexander Kitaev, TMate Software, http://subgit.com/ - Svn to Git Migration! http://svnkit.com/ - Java [Sub]Versioning Library! http://hg4j.com/ - Java Mercurial Library! http://sqljet.com/ - Java SQLite Library! On 27 March 2012 23:57, maikhorma <[email protected]> wrote: > > I'm using the latest RC of SVNKit 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 tortoise, the > original is "missing" and the new one is "non-versioned". If i use tortoise > to do a 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? > -- > View this message in context: > http://old.nabble.com/Maintaining-history-on-doMove-with-1.7.0-RC2-tp33544802p33544802.html > Sent from the SVNKit - Users mailing list archive at Nabble.com. > >
