Super! this works fine. But the receiver iterates over all statuses. Can I break out of this iteration in some way? In case I have many updates objects? I only need to know if anything at all has changed.
On Fri, Feb 22, 2013 at 3:25 PM, Dmitry Pavlenko <pavle...@tmatesoft.com>wrote: > Hello Andy, > > In general case, I think you need an analog of > > $ svn status -u > > > This code does the same > > final SvnOperationFactory svnOperationFactory = new > SvnOperationFactory(); > try { > final SvnGetStatus getStatus = > svnOperationFactory.createGetStatus(); > getStatus.setRemote(true); > getStatus.setReportAll(false); > getStatus.setSingleTarget(SvnTarget.fromFile(workspace)); > getStatus.setReceiver(new ISvnObjectReceiver<SvnStatus>() { > @Override > public void receive(SvnTarget target, SvnStatus status) > throws SVNException { > boolean unchanged = (status.getRepositoryNodeStatus() > == > SVNStatusType.STATUS_NONE) && (status.getRepositoryNodeStatus() == > SVNStatusType.STATUS_NONE) && > (status.getRepositoryNodeStatus() == SVNStatusType.STATUS_NONE); > if (!unchanged) { > //do something > } > } > }); > getStatus.run(); > } finally { > svnOperationFactory.dispose(); > } > > > -- > Dmitry Pavlenko, > TMate Software, > http://subgit.com/ - git-svn bridge > > В сообщении от 22 February 2013 14:08:07 автор Andy Van Den Heuvel написал: > > I've looked in the archive for this, but didn't really found a satisfying > > answer. > > > > what is the most performant way to check if my workspace has incoming > > changes: > > > > private boolean hasIncomingChanges(File workspace) { > > // WHAT TO DO HERE??? > > } > > > > Do I use the statusClient? logClient? > > It seems there are a couple of options here, but I don't know what is the > > most performant way. >