/** * Get the clean filter command for the current entry. * * @return the clean filter command for the current entry or * <code>null</code> if no such command is defined * @throws java.io.IOException * @since 4.2 */ public String getCleanFilterCommand() throws IOException { if (cleanFilterCommandHolder == null) { String cmd = null; if (state.walk != null) { cmd = state.walk .getFilterCommand(Constants.ATTR_FILTER_TYPE_CLEAN); } cleanFilterCommandHolder = new Holder<>(cmd); } return cleanFilterCommandHolder.get(); }
/** * @param opType * The operationtype (checkin/checkout) which should be used * @return the eol stream type for the current entry or <code>null</code> if * it cannot be determined. When state or state.walk is null or the * {@link TreeWalk} is not based on a {@link Repository} then null * is returned. * @throws IOException */ private EolStreamType getEolStreamType(OperationType opType) throws IOException { if (eolStreamTypeHolder == null) { EolStreamType type=null; if (state.walk != null) { type = state.walk.getEolStreamType(opType); } else { switch (getOptions().getAutoCRLF()) { case FALSE: type = EolStreamType.DIRECT; break; case TRUE: case INPUT: type = EolStreamType.AUTO_LF; break; } } eolStreamTypeHolder = new Holder<>(type); } return eolStreamTypeHolder.get(); }
/** * @return the clean filter command for the current entry or * <code>null</code> if no such command is defined * @throws IOException * @since 4.2 */ public String getCleanFilterCommand() throws IOException { if (cleanFilterCommandHolder == null) { String cmd = null; if (state.walk != null) { cmd = state.walk .getFilterCommand(Constants.ATTR_FILTER_TYPE_CLEAN); } cleanFilterCommandHolder = new Holder<String>(cmd); } return cleanFilterCommandHolder.get(); }
/** * Get the clean filter command for the current entry. * * @return the clean filter command for the current entry or * <code>null</code> if no such command is defined * @throws java.io.IOException * @since 4.2 */ public String getCleanFilterCommand() throws IOException { if (cleanFilterCommandHolder == null) { String cmd = null; if (state.walk != null) { cmd = state.walk .getFilterCommand(Constants.ATTR_FILTER_TYPE_CLEAN); } cleanFilterCommandHolder = new Holder<>(cmd); } return cleanFilterCommandHolder.get(); }
/** * @param opType * The operationtype (checkin/checkout) which should be used * @return the eol stream type for the current entry or <code>null</code> if * it cannot be determined. When state or state.walk is null or the * {@link TreeWalk} is not based on a {@link Repository} then null * is returned. * @throws IOException */ private EolStreamType getEolStreamType(OperationType opType) throws IOException { if (eolStreamTypeHolder == null) { EolStreamType type=null; if (state.walk != null) { type = state.walk.getEolStreamType(opType); } else { switch (getOptions().getAutoCRLF()) { case FALSE: type = EolStreamType.DIRECT; break; case TRUE: case INPUT: type = EolStreamType.AUTO_LF; break; } } eolStreamTypeHolder = new Holder<>(type); } return eolStreamTypeHolder.get(); }
return eolStreamTypeHolder.get();
@Override protected void processCommand(@NotNull SessionContext context, @NotNull Params args) throws IOException, SVNException { final SvnServerWriter writer = context.getWriter(); final String path = context.getRepositoryPath(args.path); final Holder<LockDesc> holder = context.getRepository().wrapLockRead((lockManager) -> new Holder<>(lockManager.getLock(context.getRepositoryPath(path)))); writer.listBegin() .word("success") .listBegin() .listBegin(); LockCmd.writeLock(writer, holder.get()); writer .listEnd() .listEnd() .listEnd(); } }