Created
December 11, 2012 00:43
-
-
Save vs/4254718 to your computer and use it in GitHub Desktop.
JavaHL: Creating FSFS repository with a whitespace in its name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final File tmpDir = new File(System.getProperty("java.io.tmpdir", "/tmp")); | |
final File repoRoot = new File(tmpDir, "repo with space"); | |
final String url = SVNURL.fromFile(repoRoot).toDecodedString(); | |
final File wcRoot = new File(tmpDir, "wc"); | |
SVNAdmin admin = new SVNAdmin(); | |
admin.create(repoRoot.getAbsolutePath(), true, true, null, SVNAdmin.FSFS); | |
SVNClientInterface client = SVNClientImpl.newInstance(); | |
client.checkout(url, | |
wcRoot.getAbsolutePath(), | |
Revision.HEAD, Revision.HEAD, Depth.infinity, true, false); | |
final File trunk = new File(wcRoot, "trunk"); | |
trunk.mkdir(); | |
client.add(trunk.getAbsolutePath(), Depth.infinity, false, false, false); | |
client.commit(new String[] {wcRoot.getAbsolutePath()}, | |
"Added trunk, branches and tags", | |
Depth.infinity, false, false, new String[0], Collections.emptyMap()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment