@Override public void run() throws SVNException { SVNLookCommandEnvironment environment = getSVNLookEnvironment(); String path = environment.getFirstArgument(); if (environment.getFirstArgument() == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS, "Missing repository path argument"); SVNErrorManager.error(err, SVNLogType.CLIENT); } long fileSize; SVNLookClient client = environment.getClientManager().getLookClient(); if (environment.isRevision()) { fileSize = client.doGetFileSize(environment.getRepositoryFile(), path, getRevisionObject()); } else { fileSize = client.doGetFileSize(environment.getRepositoryFile(), path, environment.getTransaction()); } environment.getOut().println(fileSize); } }
@Override public void run() throws SVNException { SVNLookCommandEnvironment environment = getSVNLookEnvironment(); String path = environment.getFirstArgument(); if (environment.getFirstArgument() == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS, "Missing repository path argument"); SVNErrorManager.error(err, SVNLogType.CLIENT); } long fileSize; SVNLookClient client = environment.getClientManager().getLookClient(); if (environment.isRevision()) { fileSize = client.doGetFileSize(environment.getRepositoryFile(), path, getRevisionObject()); } else { fileSize = client.doGetFileSize(environment.getRepositoryFile(), path, environment.getTransaction()); } environment.getOut().println(fileSize); } }
@Override protected Long run() throws SVNException { SVNLookClient lc = new SVNLookClient(getOperation().getAuthenticationManager(), getOperation().getOptions()); lc.setEventHandler(getOperation().getEventHandler()); long fileSize; if (getOperation().getTransactionName() == null) { fileSize = lc.doGetFileSize(getOperation().getRepositoryRoot(), getOperation().getPath(), getOperation().getRevision()); } else { fileSize = lc.doGetFileSize(getOperation().getRepositoryRoot(), getOperation().getPath(), getOperation().getTransactionName()); } return fileSize; } }