I’m writing a piece of code that, once executed anywhere inside an SVN working copy, locates the root:
File workingDirectory = new File(".").getCanonicalFile();
File wcRoot = SVNWCUtil.getWorkingCopyRoot(workingDirectory, true);
gets the repository url given this root, builds an SVNClientManager given this info and now I’m stuck at how to get a list of anything in the working copy that is not in the repository – this includes locally-modified files, unresolved merges, unversioned files and I’ll be happy to hear any anything else I might have missed.
How do I do that ?
This snippet seems to require access to the repository itself, not the WC:
clientManager.getLookClient().doGetChanged(...)
This gives you local modifications, i.e. it doesn’t look at things that have changed in the repository that are not in your working copy
The code I have for this is in groovy but hopefully the use of the svnkit api is obvious enough to work with. SvnConfig is just a local value object containing various details about the repository itself.