Thanks, NPE should be already fixed in trunk. To avoid exception with your version, please set ISVNEventHandler on an SVN*Client object before running operation. Thanks!
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 18 March 2012 02:35, Snakebyte26 <[email protected]> wrote: > > Ok i maked it. > It works. But with some strange exception. > What i do is the following : > > try { > //perform an update on root. > clientManager.getUpdateClient().update(wcFile, SVNRevision.HEAD, true); > //Then i make a "revert merge" to the version i want to use for follow up > development (version is the version i want to use as my new head) > clientManager.getDiffClient().doMerge(wcFile, SVNRevision.HEAD, wcFile, > SVNRevision.create(version), wcFile, SVNDepth.INFINITY, false, true, > false, false); > } > catch (SVNException e) { > } > catch (NullPointerException e) { > } > > //Do modifications to files here > //After all do an autoresolve to local version > clientManager.getWCClient().doResolve(wcFile, SVNDepth.INFINITY, > SVNConflictChoice.MINE_FULL); > > //And then commit the directory > SVNCommitInfo commitInfo = commands.commit(wcFile, false, "commitMessage", > null); > > > This all Works well! The "revert merge" seems to be done and working. > What i achieved is that the workspace version is always commited as HEAD > Revision. > BUt the following line always throw a NullPointerException and i really dont > like exceptions : > > clientManager.getDiffClient().doMerge(wcFile, SVNRevision.HEAD, wcFile, > SVNRevision.create(version), wcFile, SVNDepth.INFINITY, false, true, > false, false); > > Resulting in : > > java.lang.NullPointerException > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgMergeDriver.handleEvent(SvnNgMergeDriver.java:2577) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRemoteDiffEditor.handleEvent(SvnNgRemoteDiffEditor.java:174) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRemoteDiffEditor.closeFile(SvnNgRemoteDiffEditor.java:548) > at > org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:546) > at > org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:412) > at > org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.updateEntry(FSUpdateContext.java:526) > at > org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.diffDirs(FSUpdateContext.java:412) > at > org.tmatesoft.svn.core.internal.io.fs.FSUpdateContext.drive(FSUpdateContext.java:309) > at > org.tmatesoft.svn.core.internal.io.fs.FSRepository.finishReport(FSRepository.java:557) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgMergeDriver$2.report(SvnNgMergeDriver.java:1000) > at > org.tmatesoft.svn.core.internal.io.fs.FSRepository.diff(FSRepository.java:654) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgMergeDriver.driveMergeReportEditor(SvnNgMergeDriver.java:945) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgMergeDriver.doMergeInfoUnawareDirectoryMerge(SvnNgMergeDriver.java:563) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgMergeDriver.doDirectoryMerge(SvnNgMergeDriver.java:750) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgMergeDriver.doMerge(SvnNgMergeDriver.java:515) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgMerge.merge(SvnNgMerge.java:174) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgMerge.run(SvnNgMerge.java:49) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgMerge.run(SvnNgMerge.java:29) > at > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20) > at > org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20) > at > org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:787) > at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:166) > at > org.tmatesoft.svn.core.wc.SVNDiffClient.doMerge(SVNDiffClient.java:1742) > at > gsnmodel.versioning.wizards.ChangeVersionWizard.performFinish(ChangeVersionWizard.java:75) > at > org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827) > at > org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432) > at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) > at > org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) > at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) > at org.eclipse.jface.window.Window.open(Window.java:801) > at > gsnmodel.versioning.handlers.ChangeVersionHandler.execute(ChangeVersionHandler.java:19) > at > org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) > at > org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) > at > org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) > at > org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) > at > org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) > at > org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829) > at > org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815) > at > org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) > at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) > at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) > at > org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) > at > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at > org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) > at > org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) > at > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) > at > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) > at > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) > at > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) > at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) > at org.eclipse.equinox.launcher.Main.run(Main.java:1410) > at org.eclipse.equinox.launcher.Main.main(Main.java:1386) > > > Why i get this NullPointerException ? Is this a bug ? > > -- > View this message in context: > http://old.nabble.com/Commit-the-whole-working-copy-everytime%2C-no-matter-on-versioning-information-tp33523158p33524851.html > Sent from the SVNKit - Users mailing list archive at Nabble.com. > >
