private SVNProperties getSVNProperties(Map<String, String> revpropTable) { return SVNProperties.wrap(revpropTable); }
private void storeServerCertificate(String realm, String data, int failures) throws SVNException { myAuthDirectory.mkdirs(); File file = new File(myAuthDirectory, SVNFileUtil.computeChecksum(realm)); SVNHashMap map = new SVNHashMap(); map.put("ascii_cert", data); map.put("svn:realmstring", realm); map.put("failures", Integer.toString(failures)); SVNFileUtil.deleteFile(file); File tmpFile = SVNFileUtil.createUniqueFile(myAuthDirectory, "auth", ".tmp", true); try { SVNWCProperties.setProperties(SVNProperties.wrap(map), file, tmpFile, SVNWCProperties.SVN_HASH_TERMINATOR); } finally { SVNFileUtil.deleteFile(tmpFile); } }
private void storeServerCertificate(String realm, String data, int failures) throws SVNException { myAuthDirectory.mkdirs(); File file = new File(myAuthDirectory, SVNFileUtil.computeChecksum(realm)); SVNHashMap map = new SVNHashMap(); map.put("ascii_cert", data); map.put("svn:realmstring", realm); map.put("failures", Integer.toString(failures)); SVNFileUtil.deleteFile(file); File tmpFile = SVNFileUtil.createUniqueFile(myAuthDirectory, "auth", ".tmp", true); try { SVNWCProperties.setProperties(SVNProperties.wrap(map), file, tmpFile, SVNWCProperties.SVN_HASH_TERMINATOR); } finally { SVNFileUtil.deleteFile(tmpFile); } }
private void storeServerCertificate(String realm, String data, int failures) throws SVNException { myAuthDirectory.mkdirs(); File file = new File(myAuthDirectory, SVNFileUtil.computeChecksum(realm)); SVNHashMap map = new SVNHashMap(); map.put("ascii_cert", data); map.put("svn:realmstring", realm); map.put("failures", Integer.toString(failures)); SVNFileUtil.deleteFile(file); File tmpFile = SVNFileUtil.createUniqueFile(myAuthDirectory, "auth", ".tmp", true); try { SVNWCProperties.setProperties(SVNProperties.wrap(map), file, tmpFile, SVNWCProperties.SVN_HASH_TERMINATOR); } finally { SVNFileUtil.deleteFile(tmpFile); } }
public static SVNProperties parseProperties(byte[] val) throws SVNException { if (val == null) return null; final SVNSkel skel = SVNSkel.parse(val); if (skel == null || !skel.isValidPropList()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_MALFORMED_SKEL, "proplist"); SVNErrorManager.error(err, SVNLogType.FSFS); } return SVNProperties.wrap(skel.parsePropList()); }
public List<Structure<InheritedProperties>> parseInheritedProperties() throws SVNException { if (!isValidInheritedProperties()) { error("iprops"); } List<Structure<InheritedProperties>> result = new ArrayList<Structure<InheritedProperties>>(); for(SVNSkel elt = first(); elt != null; elt = elt.next()) { final String parent = elt.getValue(); elt = elt.next(); final SVNProperties props = SVNProperties.wrap(elt.parsePropList()); final Structure<InheritedProperties> element = Structure.obtain(InheritedProperties.class); element.set(InheritedProperties.pathOrURL, parent); element.set(InheritedProperties.properties, props); result.add(element); } return result; }
public void doImport(String path, String url, String message, int depth, boolean noIgnore, boolean ignoreUnknownNodeTypes, Map revprops) throws ClientException { SVNCommitClient commitClient = getSVNCommitClient(); try { commitClient.setCommitHandler(createCommitMessageHandler(false, true)); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); commitClient.doImport(new File(path), SVNURL.parseURIEncoded(url), message, revisionProperties, !noIgnore, ignoreUnknownNodeTypes, JavaHLObjectFactory.getSVNDepth(depth)); } catch (SVNException e) { throwException(e); } finally { if (commitClient != null) { commitClient.setCommitHandler(null); } resetLog(); } }
public void doImport(String path, String url, String message, int depth, boolean noIgnore, boolean ignoreUnknownNodeTypes, Map revprops) throws ClientException { SVNCommitClient commitClient = getSVNCommitClient(); try { commitClient.setCommitHandler(createCommitMessageHandler(false, true)); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); commitClient.doImport(new File(path), SVNURL.parseURIEncoded(url), message, revisionProperties, !noIgnore, ignoreUnknownNodeTypes, JavaHLObjectFactory.getSVNDepth(depth)); } catch (SVNException e) { throwException(e); } finally { if (commitClient != null) { commitClient.setCommitHandler(null); } resetLog(); } }
private void copyOrMove(SVNCopySource[] sources, String destPath, boolean isMove, String message, boolean copyAsChild, boolean makeParents, Map revprops) throws ClientException { SVNCopyClient client = getSVNCopyClient(); try { if (isURL(destPath)) { SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); boolean isURLs = sources.length > 0 && sources[0].isURL(); client.setCommitHandler(createCommitMessageHandler(isURLs)); client.doCopy(sources, SVNURL.parseURIEncoded(destPath), isMove, makeParents, !copyAsChild, message, revisionProperties); } else { client.doCopy(sources, new File(destPath).getAbsoluteFile(), isMove, makeParents, !copyAsChild); } } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } }
public void doImport(String path, String url, String message, int depth, boolean noIgnore, boolean ignoreUnknownNodeTypes, Map revprops) throws ClientException { SVNCommitClient commitClient = getSVNCommitClient(); try { commitClient.setCommitHandler(createCommitMessageHandler(false, true)); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); commitClient.doImport(new File(path), SVNURL.parseURIEncoded(url), message, revisionProperties, !noIgnore, ignoreUnknownNodeTypes, JavaHLObjectFactory.getSVNDepth(depth)); } catch (SVNException e) { throwException(e); } finally { if (commitClient != null) { commitClient.setCommitHandler(null); } resetLog(); } }
private void copyOrMove(SVNCopySource[] sources, String destPath, boolean isMove, String message, boolean copyAsChild, boolean makeParents, Map revprops) throws ClientException { SVNCopyClient client = getSVNCopyClient(); try { if (isURL(destPath)) { SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); boolean isURLs = sources.length > 0 && sources[0].isURL(); client.setCommitHandler(createCommitMessageHandler(isURLs)); client.doCopy(sources, SVNURL.parseURIEncoded(destPath), isMove, makeParents, !copyAsChild, message, revisionProperties); } else { client.doCopy(sources, new File(destPath).getAbsoluteFile(), isMove, makeParents, !copyAsChild); } } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } }
public long commit(String[] path, String message, int depth, boolean noUnlock, boolean keepChangelist, String[] changelists, Map revprops) throws ClientException { if (path == null || path.length == 0) { return 0; } SVNCommitClient client = getSVNCommitClient(); File[] files = new File[path.length]; for (int i = 0; i < path.length; i++) { files[i] = new File(path[i]).getAbsoluteFile(); } try { client.setCommitHandler(createCommitMessageHandler(false, false)); SVNDepth svnDepth = SVNDepth.fromID(depth); boolean recurse = SVNDepth.recurseFromDepth(svnDepth); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); return client.doCommit(files, noUnlock, message, revisionProperties, changelists, keepChangelist, !recurse, svnDepth).getNewRevision(); } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } return -1; }
private void copyOrMove(SVNCopySource[] sources, String destPath, boolean isMove, String message, boolean copyAsChild, boolean makeParents, Map revprops) throws ClientException { SVNCopyClient client = getSVNCopyClient(); try { if (isURL(destPath)) { SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); boolean isURLs = sources.length > 0 && sources[0].isURL(); client.setCommitHandler(createCommitMessageHandler(isURLs)); client.doCopy(sources, SVNURL.parseURIEncoded(destPath), isMove, makeParents, !copyAsChild, message, revisionProperties); } else { client.doCopy(sources, new File(destPath).getAbsoluteFile(), isMove, makeParents, !copyAsChild); } } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } }
public long commit(String[] path, String message, int depth, boolean noUnlock, boolean keepChangelist, String[] changelists, Map revprops) throws ClientException { if (path == null || path.length == 0) { return 0; } SVNCommitClient client = getSVNCommitClient(); File[] files = new File[path.length]; for (int i = 0; i < path.length; i++) { files[i] = new File(path[i]).getAbsoluteFile(); } try { client.setCommitHandler(createCommitMessageHandler(false, false)); SVNDepth svnDepth = SVNDepth.fromID(depth); boolean recurse = SVNDepth.recurseFromDepth(svnDepth); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); return client.doCommit(files, noUnlock, message, revisionProperties, changelists, keepChangelist, !recurse, svnDepth).getNewRevision(); } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } return -1; }
public long commit(String[] path, String message, int depth, boolean noUnlock, boolean keepChangelist, String[] changelists, Map revprops) throws ClientException { if (path == null || path.length == 0) { return 0; } SVNCommitClient client = getSVNCommitClient(); File[] files = new File[path.length]; for (int i = 0; i < path.length; i++) { files[i] = new File(path[i]).getAbsoluteFile(); } try { client.setCommitHandler(createCommitMessageHandler(false, false)); SVNDepth svnDepth = SVNDepth.fromID(depth); boolean recurse = SVNDepth.recurseFromDepth(svnDepth); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); return client.doCommit(files, noUnlock, message, revisionProperties, changelists, keepChangelist, !recurse, svnDepth).getNewRevision(); } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } return -1; }
boolean recurse = SVNDepth.recurseFromDepth(svnDepth); packets = client.doCollectCommitItems(files, noUnlock, !recurse, svnDepth, atomicCommit, changlelists); commitResults = client.doCommit(packets, noUnlock, keepChangelist, message, revprops != null ? SVNProperties.wrap(revprops) : null); } catch (SVNException e) { throwException(e);
private void propertySet(String path, String name, SVNPropertyValue value, int depth, boolean force, String[] changelists, Map revprops) throws ClientException { SVNWCClient client = getSVNWCClient(); if (isURL(path)) { try { SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); client.setCommitHandler(createCommitMessageHandler(true)); client.doSetProperty(SVNURL.parseURIEncoded(path), name, value, SVNRevision.HEAD, "", revisionProperties, force, ISVNPropertyHandler.NULL); } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } } else { try { client.doSetProperty(new File(path).getAbsoluteFile(), name, value, force, JavaHLObjectFactory.getSVNDepth(depth), ISVNPropertyHandler.NULL, JavaHLObjectFactory.getChangeListsCollection(changelists)); } catch (SVNException e) { throwException(e); } finally { resetLog(); } } }
private void propertySet(String path, String name, SVNPropertyValue value, int depth, boolean force, String[] changelists, Map revprops) throws ClientException { SVNWCClient client = getSVNWCClient(); if (isURL(path)) { try { SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); client.setCommitHandler(createCommitMessageHandler(true)); client.doSetProperty(SVNURL.parseURIEncoded(path), name, value, SVNRevision.HEAD, "", revisionProperties, force, ISVNPropertyHandler.NULL); } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } } else { try { client.doSetProperty(new File(path).getAbsoluteFile(), name, value, force, JavaHLObjectFactory.getSVNDepth(depth), ISVNPropertyHandler.NULL, JavaHLObjectFactory.getChangeListsCollection(changelists)); } catch (SVNException e) { throwException(e); } finally { resetLog(); } } }
private void propertySet(String path, String name, SVNPropertyValue value, int depth, boolean force, String[] changelists, Map revprops) throws ClientException { SVNWCClient client = getSVNWCClient(); if (isURL(path)) { try { SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); client.setCommitHandler(createCommitMessageHandler(true)); client.doSetProperty(SVNURL.parseURIEncoded(path), name, value, SVNRevision.HEAD, "", revisionProperties, force, ISVNPropertyHandler.NULL); } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } } else { try { client.doSetProperty(new File(path).getAbsoluteFile(), name, value, force, JavaHLObjectFactory.getSVNDepth(depth), ISVNPropertyHandler.NULL, JavaHLObjectFactory.getChangeListsCollection(changelists)); } catch (SVNException e) { throwException(e); } finally { resetLog(); } } }
SVNProperties mineProps = SVNProperties.wrap((SVNHashMap)propertyConflictInfoStructure.get(SvnWcDbConflicts.PropertyConflictInfo.mineProps)); SVNProperties theirOriginalProps = SVNProperties.wrap((SVNHashMap)propertyConflictInfoStructure.get(SvnWcDbConflicts.PropertyConflictInfo.theirOldProps)); SVNProperties theirProps = SVNProperties.wrap((SVNHashMap)propertyConflictInfoStructure.get(SvnWcDbConflicts.PropertyConflictInfo.theirProps)); Set<String> conflictedProps = propertyConflictInfoStructure.get(SvnWcDbConflicts.PropertyConflictInfo.conflictedPropNames); SVNProperties oldProps;