mirror of
https://github.com/mirror/jdownloader.git
synced 2024-11-26 21:40:38 +00:00
git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@48226 ebf7c1c2-ba36-0410-9fe8-c592906822b4
Former-commit-id: 464f1c3e058fbb53abc3d2d1abf73dd9564fc83b
This commit is contained in:
parent
253c6ba2ba
commit
e8a1ea1f9f
12
ressourcen/libs/antlr-runtime.jar.dep.json
Normal file
12
ressourcen/libs/antlr-runtime.jar.dep.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"artefact":"org.antlr/antlr-runtime",
|
||||
"files":["antlr-runtime.jar"],
|
||||
"installedVersion":"3.4",
|
||||
"lastUpdate":"2023-08-31T11:52:39 CEST",
|
||||
"license":"BSD",
|
||||
"minJRE":null,
|
||||
"provider":"maven",
|
||||
"renames":null,
|
||||
"version":"3.4",
|
||||
"confirm":true
|
||||
}
|
Binary file not shown.
12
ressourcen/libs/bcpkix-jdk15on.jar.dep.json
Normal file
12
ressourcen/libs/bcpkix-jdk15on.jar.dep.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"artefact":"org.bouncycastle/bcpkix-jdk15to18",
|
||||
"files":["bcpkix-jdk15on.jar"],
|
||||
"installedVersion":"1.76",
|
||||
"lastUpdate":"2023-08-31T11:52:39 CEST",
|
||||
"license":"\n <license>\n <name>Bouncy Castle Licence</name>\n <url>http://www.bouncycastle.org/licence.html</url>\n <distribution>repo</distribution>\n </license>\n ",
|
||||
"minJRE":null,
|
||||
"provider":"maven",
|
||||
"renames":{"jdk15to18":"jdk15on"},
|
||||
"version":"mvnLatest",
|
||||
"confirm":true
|
||||
}
|
Binary file not shown.
12
ressourcen/libs/bcprov-jdk15on.jar.dep.json
Normal file
12
ressourcen/libs/bcprov-jdk15on.jar.dep.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"artefact":"org.bouncycastle/bcprov-jdk15to18",
|
||||
"files":["bcprov-jdk15on.jar"],
|
||||
"installedVersion":"1.76",
|
||||
"lastUpdate":"2023-08-31T11:52:39 CEST",
|
||||
"license":"\n <license>\n <name>Bouncy Castle Licence</name>\n <url>http://www.bouncycastle.org/licence.html</url>\n <distribution>repo</distribution>\n </license>\n ",
|
||||
"minJRE":null,
|
||||
"provider":"maven",
|
||||
"renames":{"jdk15to18":"jdk15on"},
|
||||
"version":"mvnLatest",
|
||||
"confirm":true
|
||||
}
|
Binary file not shown.
12
ressourcen/libs/bctls-jdk15on.jar.dep.json
Normal file
12
ressourcen/libs/bctls-jdk15on.jar.dep.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"artefact":"org.bouncycastle/bctls-jdk15to18",
|
||||
"files":["bctls-jdk15on.jar"],
|
||||
"installedVersion":"1.76",
|
||||
"lastUpdate":"2023-08-31T11:52:39 CEST",
|
||||
"license":"\n <license>\n <name>Bouncy Castle Licence</name>\n <url>http://www.bouncycastle.org/licence.html</url>\n <distribution>repo</distribution>\n </license>\n ",
|
||||
"minJRE":null,
|
||||
"provider":"maven",
|
||||
"renames":{"jdk15to18":"jdk15on"},
|
||||
"version":"mvnLatest",
|
||||
"confirm":true
|
||||
}
|
Binary file not shown.
12
ressourcen/libs/bcutil-jdk15on.jar.dep.json
Normal file
12
ressourcen/libs/bcutil-jdk15on.jar.dep.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"artefact":"org.bouncycastle/bcutil-jdk15to18",
|
||||
"files":["bcutil-jdk15on.jar"],
|
||||
"installedVersion":"1.76",
|
||||
"lastUpdate":"2023-08-31T11:52:39 CEST",
|
||||
"license":"\n <license>\n <name>Bouncy Castle Licence</name>\n <url>http://www.bouncycastle.org/licence.html</url>\n <distribution>repo</distribution>\n </license>\n ",
|
||||
"minJRE":null,
|
||||
"provider":"maven",
|
||||
"renames":{"jdk15to18":"jdk15on"},
|
||||
"version":"mvnLatest",
|
||||
"confirm":true
|
||||
}
|
12
ressourcen/libs/jna.jar.dep.json
Normal file
12
ressourcen/libs/jna.jar.dep.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"artefact":"net.java.dev.jna/jna",
|
||||
"files":["jna.jar"],
|
||||
"installedVersion":"5.13.0",
|
||||
"lastUpdate":"2023-08-31T11:52:39 CEST",
|
||||
"license":"\n <license>\n <name>LGPL-2.1-or-later</name>\n <url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1</url>\n <distribution>repo</distribution>\n <comments>\n Java Native Access (JNA) is licensed under the LGPL, version 2.1 or\n later, or the Apache License, version 2.0. You can freely decide which\n license you want to apply to the project.\n </comments>\n </license>\n <license>\n <name>Apache-2.0</name>\n <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>\n <distribution>repo</distribution>\n <comments>\n Java Native Access (JNA) is licensed under the LGPL, version 2.1 or\n later, or the Apache License, version 2.0. You can freely decide which\n license you want to apply to the project.\n </comments>\n </license>\n ",
|
||||
"minJRE":null,
|
||||
"provider":"maven",
|
||||
"renames":null,
|
||||
"version":"mvnLatest",
|
||||
"confirm":true
|
||||
}
|
12
ressourcen/libs/jna_platform.jar.dep.json
Normal file
12
ressourcen/libs/jna_platform.jar.dep.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"artefact":"net.java.dev.jna/jna-platform",
|
||||
"files":["jna_platform.jar"],
|
||||
"installedVersion":"5.13.0",
|
||||
"lastUpdate":"2023-08-31T11:52:39 CEST",
|
||||
"license":"\n <license>\n <name>LGPL-2.1-or-later</name>\n <url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1</url>\n <distribution>repo</distribution>\n <comments>\n Java Native Access (JNA) is licensed under the LGPL, version 2.1 or\n later, or the Apache License, version 2.0. You can freely decide which\n license you want to apply to the project.\n </comments>\n </license>\n <license>\n <name>Apache-2.0</name>\n <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>\n <distribution>repo</distribution>\n <comments>\n Java Native Access (JNA) is licensed under the LGPL, version 2.1 or\n later, or the Apache License, version 2.0. You can freely decide which\n license you want to apply to the project.\n </comments>\n </license>\n ",
|
||||
"minJRE":null,
|
||||
"provider":"maven",
|
||||
"renames":{"jna-platform.jar":"jna_platform.jar"},
|
||||
"version":"mvnLatest",
|
||||
"confirm":true
|
||||
}
|
12
ressourcen/libs/sequence-library.jar.dep.json
Normal file
12
ressourcen/libs/sequence-library.jar.dep.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"artefact":"de.regnis.q.sequence/sequence-library",
|
||||
"files":["sequence-library.jar"],
|
||||
"installedVersion":"1.0.2",
|
||||
"lastUpdate":"2023-08-31T11:52:39 CEST",
|
||||
"license":"\n <license>\n <name>Sequence Library License (BSD-like)</name>\n <url>https://svn.tmatesoft.com/repos/3rdparty/de.regnis.q.sequnce/trunk/LICENSE.txt</url>\n <distribution>repos</distribution>\n <comments>Sequence Library License (BSD-like)</comments>\n </license>\n ",
|
||||
"minJRE":null,
|
||||
"provider":"maven",
|
||||
"renames":null,
|
||||
"version":"1.0.2",
|
||||
"confirm":true
|
||||
}
|
12
ressourcen/libs/sqljet.jar.dep.json
Normal file
12
ressourcen/libs/sqljet.jar.dep.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"artefact":"org.tmatesoft.sqljet/sqljet",
|
||||
"files":["sqljet.jar"],
|
||||
"installedVersion":"1.1.10",
|
||||
"lastUpdate":"2023-08-31T11:52:39 CEST",
|
||||
"license":"\n <license>\n <name>GNU General Public License (GPL)</name>\n <url>http://www.gnu.org/licenses/gpl.html</url>\n <distribution>repos</distribution>\n <comments>GPL license with a dual-licensing option for closed source usage</comments>\n </license>\n <license>\n <name>GNU General Public License Version 3 (GPL v3)</name>\n <url>https://www.gnu.org/licenses/gpl-3.0.txt</url>\n <distribution>repos</distribution>\n <comments>GPL Version 3 license with a dual-licensing option for closed source usage</comments>\n </license>\n ",
|
||||
"minJRE":null,
|
||||
"provider":"maven",
|
||||
"renames":null,
|
||||
"version":"1.1.10",
|
||||
"confirm":true
|
||||
}
|
12
ressourcen/libs/svnkit.jar.dep.json
Normal file
12
ressourcen/libs/svnkit.jar.dep.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"artefact":"org.tmatesoft.svnkit/svnkit",
|
||||
"files":["svnkit.jar"],
|
||||
"installedVersion":"1.8.10",
|
||||
"lastUpdate":"2023-08-31T11:52:39 CEST",
|
||||
"license":"\n <license>\n <name>TMate Open Source License</name>\n <url>https://svnkit.com/license.html</url>\n <distribution>repos</distribution>\n <comments>GPL-like license with a dual-licensing option for closed source usage</comments>\n </license>\n ",
|
||||
"minJRE":null,
|
||||
"provider":"maven",
|
||||
"renames":null,
|
||||
"version":"1.8.10",
|
||||
"confirm":true
|
||||
}
|
250
src/org/appwork/utils/svn/ExportEditor.java
Normal file
250
src/org/appwork/utils/svn/ExportEditor.java
Normal file
@ -0,0 +1,250 @@
|
||||
/**
|
||||
*
|
||||
* ====================================================================================================================================================
|
||||
* "AppWork Utilities" License
|
||||
* The "AppWork Utilities" will be called [The Product] from now on.
|
||||
* ====================================================================================================================================================
|
||||
* Copyright (c) 2009-2015, AppWork GmbH <e-mail@appwork.org>
|
||||
* Schwabacher Straße 117
|
||||
* 90763 Fürth
|
||||
* Germany
|
||||
* === Preamble ===
|
||||
* This license establishes the terms under which the [The Product] Source Code & Binary files may be used, copied, modified, distributed, and/or redistributed.
|
||||
* The intent is that the AppWork GmbH is able to provide their utilities library for free to non-commercial projects whereas commercial usage is only permitted after obtaining a commercial license.
|
||||
* These terms apply to all files that have the [The Product] License header (IN the file), a <filename>.license or <filename>.info (like mylib.jar.info) file that contains a reference to this license.
|
||||
*
|
||||
* === 3rd Party Licences ===
|
||||
* Some parts of the [The Product] use or reference 3rd party libraries and classes. These parts may have different licensing conditions. Please check the *.license and *.info files of included libraries
|
||||
* to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header.
|
||||
*
|
||||
* === Definition: Commercial Usage ===
|
||||
* If anybody or any organization is generating income (directly or indirectly) by using [The Product] or if there's any commercial interest or aspect in what you are doing, we consider this as a commercial usage.
|
||||
* If your use-case is neither strictly private nor strictly educational, it is commercial. If you are unsure whether your use-case is commercial or not, consider it as commercial or contact us.
|
||||
* === Dual Licensing ===
|
||||
* === Commercial Usage ===
|
||||
* If you want to use [The Product] in a commercial way (see definition above), you have to obtain a paid license from AppWork GmbH.
|
||||
* Contact AppWork for further details: <e-mail@appwork.org>
|
||||
* === Non-Commercial Usage ===
|
||||
* If there is no commercial usage (see definition above), you may use [The Product] under the terms of the
|
||||
* "GNU Affero General Public License" (http://www.gnu.org/licenses/agpl-3.0.en.html).
|
||||
*
|
||||
* If the AGPL does not fit your needs, please contact us. We'll find a solution.
|
||||
* ====================================================================================================================================================
|
||||
* ==================================================================================================================================================== */
|
||||
package org.appwork.utils.svn;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
|
||||
import org.tmatesoft.svn.core.SVNCommitInfo;
|
||||
import org.tmatesoft.svn.core.SVNErrorCode;
|
||||
import org.tmatesoft.svn.core.SVNErrorMessage;
|
||||
import org.tmatesoft.svn.core.SVNException;
|
||||
import org.tmatesoft.svn.core.SVNPropertyValue;
|
||||
import org.tmatesoft.svn.core.io.ISVNEditor;
|
||||
import org.tmatesoft.svn.core.io.diff.SVNDeltaProcessor;
|
||||
import org.tmatesoft.svn.core.io.diff.SVNDiffWindow;
|
||||
|
||||
/**
|
||||
* ISVNEditor implementation that will add directories and files into the target
|
||||
* directory accordingly to update instructions sent by the server.
|
||||
*/
|
||||
public class ExportEditor implements ISVNEditor {
|
||||
|
||||
private File myRootDirectory;
|
||||
private SVNDeltaProcessor myDeltaProcessor;
|
||||
|
||||
/**
|
||||
* root - the local directory where the node tree is to be exported into.
|
||||
*/
|
||||
public ExportEditor(File root) {
|
||||
myRootDirectory = root;
|
||||
/*
|
||||
* Utility class that will help us to transform 'deltas' sent by the
|
||||
* server to the new file contents.
|
||||
*/
|
||||
myDeltaProcessor = new SVNDeltaProcessor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Server reports revision to which application of the further instructions
|
||||
* will update working copy to.
|
||||
*/
|
||||
public void targetRevision(long revision) throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called before sending other instructions.
|
||||
*/
|
||||
public void openRoot(long revision) throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a new directory has to be added.
|
||||
*
|
||||
* For each 'addDir' call server will call 'closeDir' method after all
|
||||
* children of the added directory are added.
|
||||
*
|
||||
* This implementation creates corresponding directory below root directory.
|
||||
*/
|
||||
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException {
|
||||
File newDir = new File(myRootDirectory, path);
|
||||
if (!newDir.exists()) {
|
||||
if (!newDir.mkdirs()) {
|
||||
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "error: failed to add the directory ''{0}''.", newDir);
|
||||
throw new SVNException(err);
|
||||
}
|
||||
}
|
||||
org.appwork.loggingv3.LogV3.fine("dir added: " + path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when there is an existing directory that has to be 'opened' either
|
||||
* to modify this directory properties or to process other files and
|
||||
* directories inside this directory.
|
||||
*
|
||||
* In case of export this method will never be called because we reported
|
||||
* that our 'working copy' is empty and so server knows that there are no
|
||||
* 'existing' directories.
|
||||
*/
|
||||
public void openDir(String path, long revision) throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Instructs to change opened or added directory property.
|
||||
*
|
||||
* This method is called to update properties set by the user as well as
|
||||
* those created automatically, like "svn:committed-rev". See SVNProperty
|
||||
* class for default property names.
|
||||
*
|
||||
* When property has to be deleted value will be 'null'.
|
||||
*/
|
||||
|
||||
public void changeDirProperty(String name, SVNPropertyValue property) throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a new file has to be created.
|
||||
*
|
||||
* For each 'addFile' call server will call 'closeFile' method after sending
|
||||
* file properties and contents.
|
||||
*
|
||||
* This implementation creates empty file below root directory, file
|
||||
* contents will be updated later, and for empty files may not be sent at
|
||||
* all.
|
||||
*/
|
||||
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException {
|
||||
File file = new File(myRootDirectory, path);
|
||||
if (file.exists()) {
|
||||
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "error: exported file ''{0}'' already exists!", file);
|
||||
throw new SVNException(err);
|
||||
}
|
||||
try {
|
||||
file.createNewFile();
|
||||
} catch (IOException e) {
|
||||
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "error: cannot create new file ''{0}''", file);
|
||||
throw new SVNException(err);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when there is an existing files that has to be 'opened' either to
|
||||
* modify file contents or properties.
|
||||
*
|
||||
* In case of export this method will never be called because we reported
|
||||
* that our 'working copy' is empty and so server knows that there are no
|
||||
* 'existing' files.
|
||||
*/
|
||||
public void openFile(String path, long revision) throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Instructs to add, modify or delete file property. In this example we skip
|
||||
* this instruction, but 'real' export operation may inspect 'svn:eol-style'
|
||||
* or 'svn:mime-type' property values to transfor file contents propertly
|
||||
* after receiving.
|
||||
*/
|
||||
public void changeFileProperty(String path, String name, SVNPropertyValue property) throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called before sending 'delta' for a file. Delta may include instructions
|
||||
* on how to create a file or how to modify existing file. In this example
|
||||
* delta will always contain instructions on how to create a new file and so
|
||||
* we set up deltaProcessor with 'null' base file and target file to which
|
||||
* we would like to store the result of delta application.
|
||||
*/
|
||||
public void applyTextDelta(String path, String baseChecksum) throws SVNException {
|
||||
myDeltaProcessor.applyTextDelta((File) null, new File(myRootDirectory, path), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Server sends deltas in form of 'diff windows'. Depending on the file size
|
||||
* there may be several diff windows. Utility class SVNDeltaProcessor
|
||||
* processes these windows for us.
|
||||
*/
|
||||
public OutputStream textDeltaChunk(String path, SVNDiffWindow diffWindow) throws SVNException {
|
||||
return myDeltaProcessor.textDeltaChunk(diffWindow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when all diff windows (delta) is transferred.
|
||||
*/
|
||||
public void textDeltaEnd(String path) throws SVNException {
|
||||
myDeltaProcessor.textDeltaEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when file update is completed. This call always matches addFile or
|
||||
* openFile call.
|
||||
*/
|
||||
public void closeFile(String path, String textChecksum) throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when all child files and directories are processed. This call
|
||||
* always matches addDir, openDir or openRoot call.
|
||||
*/
|
||||
public void closeDir() throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Insturcts to delete an entry in the 'working copy'. Of course will not be
|
||||
* called during export operation.
|
||||
*/
|
||||
public void deleteEntry(String path, long revision) throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when directory at 'path' should be somehow processed, but
|
||||
* authenticated user (or anonymous user) doesn't have enough access rights
|
||||
* to get information on this directory (properties, children).
|
||||
*/
|
||||
public void absentDir(String path) throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when file at 'path' should be somehow processed, but authenticated
|
||||
* user (or anonymous user) doesn't have enough access rights to get
|
||||
* information on this file (contents, properties).
|
||||
*/
|
||||
public void absentFile(String path) throws SVNException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when update is completed.
|
||||
*/
|
||||
public SVNCommitInfo closeEdit() throws SVNException {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when update is completed with an error or server requests client
|
||||
* to abort update operation.
|
||||
*/
|
||||
public void abortEdit() throws SVNException {
|
||||
}
|
||||
|
||||
}
|
70
src/org/appwork/utils/svn/ExportReporterBaton.java
Normal file
70
src/org/appwork/utils/svn/ExportReporterBaton.java
Normal file
@ -0,0 +1,70 @@
|
||||
/**
|
||||
*
|
||||
* ====================================================================================================================================================
|
||||
* "AppWork Utilities" License
|
||||
* The "AppWork Utilities" will be called [The Product] from now on.
|
||||
* ====================================================================================================================================================
|
||||
* Copyright (c) 2009-2015, AppWork GmbH <e-mail@appwork.org>
|
||||
* Schwabacher Straße 117
|
||||
* 90763 Fürth
|
||||
* Germany
|
||||
* === Preamble ===
|
||||
* This license establishes the terms under which the [The Product] Source Code & Binary files may be used, copied, modified, distributed, and/or redistributed.
|
||||
* The intent is that the AppWork GmbH is able to provide their utilities library for free to non-commercial projects whereas commercial usage is only permitted after obtaining a commercial license.
|
||||
* These terms apply to all files that have the [The Product] License header (IN the file), a <filename>.license or <filename>.info (like mylib.jar.info) file that contains a reference to this license.
|
||||
*
|
||||
* === 3rd Party Licences ===
|
||||
* Some parts of the [The Product] use or reference 3rd party libraries and classes. These parts may have different licensing conditions. Please check the *.license and *.info files of included libraries
|
||||
* to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header.
|
||||
*
|
||||
* === Definition: Commercial Usage ===
|
||||
* If anybody or any organization is generating income (directly or indirectly) by using [The Product] or if there's any commercial interest or aspect in what you are doing, we consider this as a commercial usage.
|
||||
* If your use-case is neither strictly private nor strictly educational, it is commercial. If you are unsure whether your use-case is commercial or not, consider it as commercial or contact us.
|
||||
* === Dual Licensing ===
|
||||
* === Commercial Usage ===
|
||||
* If you want to use [The Product] in a commercial way (see definition above), you have to obtain a paid license from AppWork GmbH.
|
||||
* Contact AppWork for further details: <e-mail@appwork.org>
|
||||
* === Non-Commercial Usage ===
|
||||
* If there is no commercial usage (see definition above), you may use [The Product] under the terms of the
|
||||
* "GNU Affero General Public License" (http://www.gnu.org/licenses/agpl-3.0.en.html).
|
||||
*
|
||||
* If the AGPL does not fit your needs, please contact us. We'll find a solution.
|
||||
* ====================================================================================================================================================
|
||||
* ==================================================================================================================================================== */
|
||||
package org.appwork.utils.svn;
|
||||
|
||||
|
||||
import org.tmatesoft.svn.core.SVNDepth;
|
||||
import org.tmatesoft.svn.core.SVNException;
|
||||
import org.tmatesoft.svn.core.io.ISVNReporter;
|
||||
import org.tmatesoft.svn.core.io.ISVNReporterBaton;
|
||||
|
||||
public class ExportReporterBaton implements ISVNReporterBaton {
|
||||
|
||||
private long exportRevision;
|
||||
|
||||
public ExportReporterBaton(long revision) {
|
||||
exportRevision = revision;
|
||||
}
|
||||
|
||||
public void report(ISVNReporter reporter) throws SVNException {
|
||||
try {
|
||||
/*
|
||||
* Here empty working copy is reported.
|
||||
*
|
||||
* ISVNReporter includes methods that allows to report mixed-rev
|
||||
* working copy and even let server know that some files or
|
||||
* directories are locally missing or locked.
|
||||
*/
|
||||
reporter.setPath("", null, exportRevision, SVNDepth.INFINITY, true);
|
||||
|
||||
/*
|
||||
* Don't forget to finish the report!
|
||||
*/
|
||||
reporter.finishReport();
|
||||
} catch (SVNException svne) {
|
||||
reporter.abortReport();
|
||||
org.appwork.loggingv3.LogV3.fine("Report failed.");
|
||||
}
|
||||
}
|
||||
}
|
45
src/org/appwork/utils/svn/FilePathFilter.java
Normal file
45
src/org/appwork/utils/svn/FilePathFilter.java
Normal file
@ -0,0 +1,45 @@
|
||||
/**
|
||||
*
|
||||
* ====================================================================================================================================================
|
||||
* "AppWork Utilities" License
|
||||
* The "AppWork Utilities" will be called [The Product] from now on.
|
||||
* ====================================================================================================================================================
|
||||
* Copyright (c) 2009-2015, AppWork GmbH <e-mail@appwork.org>
|
||||
* Schwabacher Straße 117
|
||||
* 90763 Fürth
|
||||
* Germany
|
||||
* === Preamble ===
|
||||
* This license establishes the terms under which the [The Product] Source Code & Binary files may be used, copied, modified, distributed, and/or redistributed.
|
||||
* The intent is that the AppWork GmbH is able to provide their utilities library for free to non-commercial projects whereas commercial usage is only permitted after obtaining a commercial license.
|
||||
* These terms apply to all files that have the [The Product] License header (IN the file), a <filename>.license or <filename>.info (like mylib.jar.info) file that contains a reference to this license.
|
||||
*
|
||||
* === 3rd Party Licences ===
|
||||
* Some parts of the [The Product] use or reference 3rd party libraries and classes. These parts may have different licensing conditions. Please check the *.license and *.info files of included libraries
|
||||
* to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header.
|
||||
*
|
||||
* === Definition: Commercial Usage ===
|
||||
* If anybody or any organization is generating income (directly or indirectly) by using [The Product] or if there's any commercial interest or aspect in what you are doing, we consider this as a commercial usage.
|
||||
* If your use-case is neither strictly private nor strictly educational, it is commercial. If you are unsure whether your use-case is commercial or not, consider it as commercial or contact us.
|
||||
* === Dual Licensing ===
|
||||
* === Commercial Usage ===
|
||||
* If you want to use [The Product] in a commercial way (see definition above), you have to obtain a paid license from AppWork GmbH.
|
||||
* Contact AppWork for further details: <e-mail@appwork.org>
|
||||
* === Non-Commercial Usage ===
|
||||
* If there is no commercial usage (see definition above), you may use [The Product] under the terms of the
|
||||
* "GNU Affero General Public License" (http://www.gnu.org/licenses/agpl-3.0.en.html).
|
||||
*
|
||||
* If the AGPL does not fit your needs, please contact us. We'll find a solution.
|
||||
* ====================================================================================================================================================
|
||||
* ==================================================================================================================================================== */
|
||||
package org.appwork.utils.svn;
|
||||
|
||||
import org.tmatesoft.svn.core.SVNDirEntry;
|
||||
|
||||
/**
|
||||
* @author Thomas
|
||||
*
|
||||
*/
|
||||
public interface FilePathFilter {
|
||||
|
||||
public boolean accept(SVNDirEntry path);
|
||||
}
|
95
src/org/appwork/utils/svn/InfoEventHandler.java
Normal file
95
src/org/appwork/utils/svn/InfoEventHandler.java
Normal file
@ -0,0 +1,95 @@
|
||||
/**
|
||||
*
|
||||
* ====================================================================================================================================================
|
||||
* "AppWork Utilities" License
|
||||
* The "AppWork Utilities" will be called [The Product] from now on.
|
||||
* ====================================================================================================================================================
|
||||
* Copyright (c) 2009-2015, AppWork GmbH <e-mail@appwork.org>
|
||||
* Schwabacher Straße 117
|
||||
* 90763 Fürth
|
||||
* Germany
|
||||
* === Preamble ===
|
||||
* This license establishes the terms under which the [The Product] Source Code & Binary files may be used, copied, modified, distributed, and/or redistributed.
|
||||
* The intent is that the AppWork GmbH is able to provide their utilities library for free to non-commercial projects whereas commercial usage is only permitted after obtaining a commercial license.
|
||||
* These terms apply to all files that have the [The Product] License header (IN the file), a <filename>.license or <filename>.info (like mylib.jar.info) file that contains a reference to this license.
|
||||
*
|
||||
* === 3rd Party Licences ===
|
||||
* Some parts of the [The Product] use or reference 3rd party libraries and classes. These parts may have different licensing conditions. Please check the *.license and *.info files of included libraries
|
||||
* to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header.
|
||||
*
|
||||
* === Definition: Commercial Usage ===
|
||||
* If anybody or any organization is generating income (directly or indirectly) by using [The Product] or if there's any commercial interest or aspect in what you are doing, we consider this as a commercial usage.
|
||||
* If your use-case is neither strictly private nor strictly educational, it is commercial. If you are unsure whether your use-case is commercial or not, consider it as commercial or contact us.
|
||||
* === Dual Licensing ===
|
||||
* === Commercial Usage ===
|
||||
* If you want to use [The Product] in a commercial way (see definition above), you have to obtain a paid license from AppWork GmbH.
|
||||
* Contact AppWork for further details: <e-mail@appwork.org>
|
||||
* === Non-Commercial Usage ===
|
||||
* If there is no commercial usage (see definition above), you may use [The Product] under the terms of the
|
||||
* "GNU Affero General Public License" (http://www.gnu.org/licenses/agpl-3.0.en.html).
|
||||
*
|
||||
* If the AGPL does not fit your needs, please contact us. We'll find a solution.
|
||||
* ====================================================================================================================================================
|
||||
* ==================================================================================================================================================== */
|
||||
package org.appwork.utils.svn;
|
||||
|
||||
|
||||
import org.tmatesoft.svn.core.SVNNodeKind;
|
||||
import org.tmatesoft.svn.core.wc.ISVNInfoHandler;
|
||||
import org.tmatesoft.svn.core.wc.SVNInfo;
|
||||
|
||||
public class InfoEventHandler implements ISVNInfoHandler {
|
||||
|
||||
public void handleInfo(SVNInfo info) {
|
||||
org.appwork.loggingv3.LogV3.fine("-----------------INFO-----------------");
|
||||
org.appwork.loggingv3.LogV3.fine("Local Path: " + info.getPath());
|
||||
org.appwork.loggingv3.LogV3.fine("URL: " + info.getURL());
|
||||
|
||||
if (info.isRemote() && info.getRepositoryRootURL() != null) {
|
||||
org.appwork.loggingv3.LogV3.fine("Repository Root URL: " + info.getRepositoryRootURL());
|
||||
}
|
||||
|
||||
if (info.getRepositoryUUID() != null) {
|
||||
org.appwork.loggingv3.LogV3.fine("Repository UUID: " + info.getRepositoryUUID());
|
||||
}
|
||||
|
||||
org.appwork.loggingv3.LogV3.fine("Revision: " + info.getRevision().getNumber());
|
||||
org.appwork.loggingv3.LogV3.fine("Node Kind: " + info.getKind().toString());
|
||||
|
||||
if (!info.isRemote()) {
|
||||
org.appwork.loggingv3.LogV3.fine("Schedule: " + (info.getSchedule() != null ? info.getSchedule() : "normal"));
|
||||
}
|
||||
|
||||
org.appwork.loggingv3.LogV3.fine("Last Changed Author: " + info.getAuthor());
|
||||
org.appwork.loggingv3.LogV3.fine("Last Changed Revision: " + info.getCommittedRevision().getNumber());
|
||||
org.appwork.loggingv3.LogV3.fine("Last Changed Date: " + info.getCommittedDate());
|
||||
|
||||
if (info.getPropTime() != null) {
|
||||
org.appwork.loggingv3.LogV3.fine("Properties Last Updated: " + info.getPropTime());
|
||||
}
|
||||
|
||||
if (info.getKind() == SVNNodeKind.FILE && info.getChecksum() != null) {
|
||||
if (info.getTextTime() != null) {
|
||||
org.appwork.loggingv3.LogV3.fine("Text Last Updated: " + info.getTextTime());
|
||||
}
|
||||
org.appwork.loggingv3.LogV3.fine("Checksum: " + info.getChecksum());
|
||||
}
|
||||
|
||||
if (info.getLock() != null) {
|
||||
if (info.getLock().getID() != null) {
|
||||
org.appwork.loggingv3.LogV3.fine("Lock Token: " + info.getLock().getID());
|
||||
}
|
||||
|
||||
org.appwork.loggingv3.LogV3.fine("Lock Owner: " + info.getLock().getOwner());
|
||||
org.appwork.loggingv3.LogV3.fine("Lock Created: " + info.getLock().getCreationDate());
|
||||
|
||||
if (info.getLock().getExpirationDate() != null) {
|
||||
org.appwork.loggingv3.LogV3.fine("Lock Expires: " + info.getLock().getExpirationDate());
|
||||
}
|
||||
|
||||
if (info.getLock().getComment() != null) {
|
||||
org.appwork.loggingv3.LogV3.fine("Lock Comment: " + info.getLock().getComment());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
56
src/org/appwork/utils/svn/LocaleRunnable.java
Normal file
56
src/org/appwork/utils/svn/LocaleRunnable.java
Normal file
@ -0,0 +1,56 @@
|
||||
/**
|
||||
*
|
||||
* ====================================================================================================================================================
|
||||
* "AppWork Utilities" License
|
||||
* The "AppWork Utilities" will be called [The Product] from now on.
|
||||
* ====================================================================================================================================================
|
||||
* Copyright (c) 2009-2015, AppWork GmbH <e-mail@appwork.org>
|
||||
* Schwabacher Straße 117
|
||||
* 90763 Fürth
|
||||
* Germany
|
||||
* === Preamble ===
|
||||
* This license establishes the terms under which the [The Product] Source Code & Binary files may be used, copied, modified, distributed, and/or redistributed.
|
||||
* The intent is that the AppWork GmbH is able to provide their utilities library for free to non-commercial projects whereas commercial usage is only permitted after obtaining a commercial license.
|
||||
* These terms apply to all files that have the [The Product] License header (IN the file), a <filename>.license or <filename>.info (like mylib.jar.info) file that contains a reference to this license.
|
||||
*
|
||||
* === 3rd Party Licences ===
|
||||
* Some parts of the [The Product] use or reference 3rd party libraries and classes. These parts may have different licensing conditions. Please check the *.license and *.info files of included libraries
|
||||
* to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header.
|
||||
*
|
||||
* === Definition: Commercial Usage ===
|
||||
* If anybody or any organization is generating income (directly or indirectly) by using [The Product] or if there's any commercial interest or aspect in what you are doing, we consider this as a commercial usage.
|
||||
* If your use-case is neither strictly private nor strictly educational, it is commercial. If you are unsure whether your use-case is commercial or not, consider it as commercial or contact us.
|
||||
* === Dual Licensing ===
|
||||
* === Commercial Usage ===
|
||||
* If you want to use [The Product] in a commercial way (see definition above), you have to obtain a paid license from AppWork GmbH.
|
||||
* Contact AppWork for further details: <e-mail@appwork.org>
|
||||
* === Non-Commercial Usage ===
|
||||
* If there is no commercial usage (see definition above), you may use [The Product] under the terms of the
|
||||
* "GNU Affero General Public License" (http://www.gnu.org/licenses/agpl-3.0.en.html).
|
||||
*
|
||||
* If the AGPL does not fit your needs, please contact us. We'll find a solution.
|
||||
* ====================================================================================================================================================
|
||||
* ==================================================================================================================================================== */
|
||||
package org.appwork.utils.svn;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public abstract class LocaleRunnable<T, E extends Exception> {
|
||||
private static final Object LOCK = new Object();
|
||||
|
||||
protected abstract T run() throws E;
|
||||
|
||||
public T runEnglish() throws E {
|
||||
synchronized (LOCK) {
|
||||
|
||||
Locale bef = Locale.getDefault();
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
try {
|
||||
return run();
|
||||
} finally {
|
||||
Locale.setDefault(bef);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
44
src/org/appwork/utils/svn/ResolveHandler.java
Normal file
44
src/org/appwork/utils/svn/ResolveHandler.java
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
*
|
||||
* ====================================================================================================================================================
|
||||
* "AppWork Utilities" License
|
||||
* The "AppWork Utilities" will be called [The Product] from now on.
|
||||
* ====================================================================================================================================================
|
||||
* Copyright (c) 2009-2015, AppWork GmbH <e-mail@appwork.org>
|
||||
* Schwabacher Straße 117
|
||||
* 90763 Fürth
|
||||
* Germany
|
||||
* === Preamble ===
|
||||
* This license establishes the terms under which the [The Product] Source Code & Binary files may be used, copied, modified, distributed, and/or redistributed.
|
||||
* The intent is that the AppWork GmbH is able to provide their utilities library for free to non-commercial projects whereas commercial usage is only permitted after obtaining a commercial license.
|
||||
* These terms apply to all files that have the [The Product] License header (IN the file), a <filename>.license or <filename>.info (like mylib.jar.info) file that contains a reference to this license.
|
||||
*
|
||||
* === 3rd Party Licences ===
|
||||
* Some parts of the [The Product] use or reference 3rd party libraries and classes. These parts may have different licensing conditions. Please check the *.license and *.info files of included libraries
|
||||
* to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header.
|
||||
*
|
||||
* === Definition: Commercial Usage ===
|
||||
* If anybody or any organization is generating income (directly or indirectly) by using [The Product] or if there's any commercial interest or aspect in what you are doing, we consider this as a commercial usage.
|
||||
* If your use-case is neither strictly private nor strictly educational, it is commercial. If you are unsure whether your use-case is commercial or not, consider it as commercial or contact us.
|
||||
* === Dual Licensing ===
|
||||
* === Commercial Usage ===
|
||||
* If you want to use [The Product] in a commercial way (see definition above), you have to obtain a paid license from AppWork GmbH.
|
||||
* Contact AppWork for further details: <e-mail@appwork.org>
|
||||
* === Non-Commercial Usage ===
|
||||
* If there is no commercial usage (see definition above), you may use [The Product] under the terms of the
|
||||
* "GNU Affero General Public License" (http://www.gnu.org/licenses/agpl-3.0.en.html).
|
||||
*
|
||||
* If the AGPL does not fit your needs, please contact us. We'll find a solution.
|
||||
* ====================================================================================================================================================
|
||||
* ==================================================================================================================================================== */
|
||||
package org.appwork.utils.svn;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.tmatesoft.svn.core.wc.SVNInfo;
|
||||
|
||||
public interface ResolveHandler {
|
||||
|
||||
String resolveConflict(SVNInfo info, File file, String contents, int startMine, int endMine, int startTheirs, int endTheirs);
|
||||
|
||||
}
|
249
src/org/appwork/utils/svn/StatusEventHandler.java
Normal file
249
src/org/appwork/utils/svn/StatusEventHandler.java
Normal file
@ -0,0 +1,249 @@
|
||||
/**
|
||||
*
|
||||
* ====================================================================================================================================================
|
||||
* "AppWork Utilities" License
|
||||
* The "AppWork Utilities" will be called [The Product] from now on.
|
||||
* ====================================================================================================================================================
|
||||
* Copyright (c) 2009-2015, AppWork GmbH <e-mail@appwork.org>
|
||||
* Schwabacher Straße 117
|
||||
* 90763 Fürth
|
||||
* Germany
|
||||
* === Preamble ===
|
||||
* This license establishes the terms under which the [The Product] Source Code & Binary files may be used, copied, modified, distributed, and/or redistributed.
|
||||
* The intent is that the AppWork GmbH is able to provide their utilities library for free to non-commercial projects whereas commercial usage is only permitted after obtaining a commercial license.
|
||||
* These terms apply to all files that have the [The Product] License header (IN the file), a <filename>.license or <filename>.info (like mylib.jar.info) file that contains a reference to this license.
|
||||
*
|
||||
* === 3rd Party Licences ===
|
||||
* Some parts of the [The Product] use or reference 3rd party libraries and classes. These parts may have different licensing conditions. Please check the *.license and *.info files of included libraries
|
||||
* to ensure that they are compatible to your use-case. Further more, some *.java have their own license. In this case, they have their license terms in the java file header.
|
||||
*
|
||||
* === Definition: Commercial Usage ===
|
||||
* If anybody or any organization is generating income (directly or indirectly) by using [The Product] or if there's any commercial interest or aspect in what you are doing, we consider this as a commercial usage.
|
||||
* If your use-case is neither strictly private nor strictly educational, it is commercial. If you are unsure whether your use-case is commercial or not, consider it as commercial or contact us.
|
||||
* === Dual Licensing ===
|
||||
* === Commercial Usage ===
|
||||
* If you want to use [The Product] in a commercial way (see definition above), you have to obtain a paid license from AppWork GmbH.
|
||||
* Contact AppWork for further details: <e-mail@appwork.org>
|
||||
* === Non-Commercial Usage ===
|
||||
* If there is no commercial usage (see definition above), you may use [The Product] under the terms of the
|
||||
* "GNU Affero General Public License" (http://www.gnu.org/licenses/agpl-3.0.en.html).
|
||||
*
|
||||
* If the AGPL does not fit your needs, please contact us. We'll find a solution.
|
||||
* ====================================================================================================================================================
|
||||
* ==================================================================================================================================================== */
|
||||
package org.appwork.utils.svn;
|
||||
|
||||
|
||||
import org.tmatesoft.svn.core.SVNCancelException;
|
||||
import org.tmatesoft.svn.core.SVNLock;
|
||||
import org.tmatesoft.svn.core.wc.ISVNEventHandler;
|
||||
import org.tmatesoft.svn.core.wc.ISVNStatusHandler;
|
||||
import org.tmatesoft.svn.core.wc.SVNEvent;
|
||||
import org.tmatesoft.svn.core.wc.SVNEventAction;
|
||||
import org.tmatesoft.svn.core.wc.SVNStatus;
|
||||
import org.tmatesoft.svn.core.wc.SVNStatusType;
|
||||
|
||||
public class StatusEventHandler implements ISVNStatusHandler, ISVNEventHandler {
|
||||
private final boolean myIsRemote;
|
||||
|
||||
public StatusEventHandler(final boolean isRemote) {
|
||||
this.myIsRemote = isRemote;
|
||||
}
|
||||
|
||||
public void checkCancelled() throws SVNCancelException {
|
||||
}
|
||||
|
||||
public void handleEvent(final SVNEvent event, final double progress) {
|
||||
final SVNEventAction action = event.getAction();
|
||||
/*
|
||||
* Print out the revision against which the status was performed. This
|
||||
* event is dispatched when the SVNStatusClient.doStatus() was invoked
|
||||
* with the flag remote set to true - that is for a local status it
|
||||
* won't be dispatched.
|
||||
*/
|
||||
if (action == SVNEventAction.STATUS_COMPLETED) {
|
||||
org.appwork.loggingv3.LogV3.fine("Status against revision: " + event.getRevision());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void handleStatus(final SVNStatus status) {
|
||||
/*
|
||||
* Gets the status of file/directory/symbolic link text contents. It is
|
||||
* SVNStatusType who contains information on the state of an item.
|
||||
*/
|
||||
final SVNStatusType contentsStatus = status.getContentsStatus();
|
||||
|
||||
String pathChangeType = " ";
|
||||
|
||||
final boolean isAddedWithHistory = status.isCopied();
|
||||
if (contentsStatus == SVNStatusType.STATUS_MODIFIED) {
|
||||
/*
|
||||
* The contents of the file have been Modified.
|
||||
*/
|
||||
pathChangeType = "M";
|
||||
} else if (contentsStatus == SVNStatusType.STATUS_CONFLICTED) {
|
||||
/*
|
||||
* The item is in a state of Conflict.
|
||||
*/
|
||||
pathChangeType = "C";
|
||||
} else if (contentsStatus == SVNStatusType.STATUS_DELETED) {
|
||||
/*
|
||||
* The item has been scheduled for Deletion from the repository.
|
||||
*/
|
||||
pathChangeType = "D";
|
||||
} else if (contentsStatus == SVNStatusType.STATUS_ADDED) {
|
||||
/*
|
||||
* The item has been scheduled for Addition to the repository.
|
||||
*/
|
||||
pathChangeType = "A";
|
||||
} else if (contentsStatus == SVNStatusType.STATUS_UNVERSIONED) {
|
||||
/*
|
||||
* The item is not under version control.
|
||||
*/
|
||||
pathChangeType = "?";
|
||||
} else if (contentsStatus == SVNStatusType.STATUS_EXTERNAL) {
|
||||
/*
|
||||
* The item is unversioned, but is used by an eXternals definition.
|
||||
*/
|
||||
pathChangeType = "X";
|
||||
} else if (contentsStatus == SVNStatusType.STATUS_IGNORED) {
|
||||
/*
|
||||
* The item is Ignored.
|
||||
*/
|
||||
pathChangeType = "I";
|
||||
} else if (contentsStatus == SVNStatusType.STATUS_MISSING || contentsStatus == SVNStatusType.STATUS_INCOMPLETE) {
|
||||
/*
|
||||
* The file, directory or symbolic link item is under version
|
||||
* control but is missing or somehow incomplete.
|
||||
*/
|
||||
pathChangeType = "!";
|
||||
} else if (contentsStatus == SVNStatusType.STATUS_OBSTRUCTED) {
|
||||
/*
|
||||
* The item is in the repository as one kind of object, but what's
|
||||
* actually in the user's working copy is some other kind.
|
||||
*/
|
||||
pathChangeType = "~";
|
||||
} else if (contentsStatus == SVNStatusType.STATUS_REPLACED) {
|
||||
/*
|
||||
* The item was Replaced in the user's working copy; that is, the
|
||||
* item was deleted, and a new item with the same name was added
|
||||
* (within a single revision).
|
||||
*/
|
||||
pathChangeType = "R";
|
||||
} else if (contentsStatus == SVNStatusType.STATUS_NONE || contentsStatus == SVNStatusType.STATUS_NORMAL) {
|
||||
/*
|
||||
* The item was not modified (normal).
|
||||
*/
|
||||
pathChangeType = " ";
|
||||
}
|
||||
|
||||
/*
|
||||
* If SVNStatusClient.doStatus(..) is invoked with remote = true the
|
||||
* following code finds out whether the current item has been changed in
|
||||
* the repository
|
||||
*/
|
||||
String remoteChangeType = " ";
|
||||
|
||||
if (status.getRemotePropertiesStatus() != SVNStatusType.STATUS_NONE || status.getRemoteContentsStatus() != SVNStatusType.STATUS_NONE) {
|
||||
/*
|
||||
* the local item is out of date
|
||||
*/
|
||||
remoteChangeType = "*";
|
||||
}
|
||||
|
||||
/*
|
||||
* Now getting the status of properties of an item. SVNStatusType also
|
||||
* contains information on the properties state.
|
||||
*/
|
||||
final SVNStatusType propertiesStatus = status.getPropertiesStatus();
|
||||
|
||||
/*
|
||||
* Default - properties are normal (unmodified).
|
||||
*/
|
||||
String propertiesChangeType = " ";
|
||||
if (propertiesStatus == SVNStatusType.STATUS_MODIFIED) {
|
||||
/*
|
||||
* Properties were modified.
|
||||
*/
|
||||
propertiesChangeType = "M";
|
||||
} else if (propertiesStatus == SVNStatusType.STATUS_CONFLICTED) {
|
||||
/*
|
||||
* Properties are in conflict with the repository.
|
||||
*/
|
||||
propertiesChangeType = "C";
|
||||
}
|
||||
|
||||
/*
|
||||
* Whether the item was locked in the .svn working area (for example,
|
||||
* during a commit or maybe the previous operation was interrupted, in
|
||||
* this case the lock needs to be cleaned up).
|
||||
*/
|
||||
final boolean isLocked = status.isLocked();
|
||||
/*
|
||||
* Whether the item is switched to a different URL (branch).
|
||||
*/
|
||||
final boolean isSwitched = status.isSwitched();
|
||||
/*
|
||||
* If the item is a file it may be locked.
|
||||
*/
|
||||
final SVNLock localLock = status.getLocalLock();
|
||||
/*
|
||||
* If doStatus() was run with remote = true and the item is a file,
|
||||
* checks whether a remote lock presents.
|
||||
*/
|
||||
final SVNLock remoteLock = status.getRemoteLock();
|
||||
String lockLabel = " ";
|
||||
|
||||
if (localLock != null) {
|
||||
/*
|
||||
* at first suppose the file is locKed
|
||||
*/
|
||||
lockLabel = "K";
|
||||
if (remoteLock != null) {
|
||||
/*
|
||||
* if the lock-token of the local lock differs from the lock-
|
||||
* token of the remote lock - the lock was sTolen!
|
||||
*/
|
||||
if (!remoteLock.getID().equals(localLock.getID())) {
|
||||
lockLabel = "T";
|
||||
}
|
||||
} else {
|
||||
if (this.myIsRemote) {
|
||||
/*
|
||||
* the local lock presents but there's no lock in the
|
||||
* repository - the lock was Broken. This is true only if
|
||||
* doStatus() was invoked with remote=true.
|
||||
*/
|
||||
lockLabel = "B";
|
||||
}
|
||||
}
|
||||
} else if (remoteLock != null) {
|
||||
/*
|
||||
* the file is not locally locked but locked in the repository - the
|
||||
* lock token is in some Other working copy.
|
||||
*/
|
||||
lockLabel = "O";
|
||||
}
|
||||
|
||||
/*
|
||||
* Obtains the working revision number of the item.
|
||||
*/
|
||||
final long workingRevision = status.getRevision().getNumber();
|
||||
/*
|
||||
* Obtains the number of the revision when the item was last changed.
|
||||
*/
|
||||
final long lastChangedRevision = status.getCommittedRevision().getNumber();
|
||||
final String offset = " ";
|
||||
final String[] offsets = new String[3];
|
||||
offsets[0] = offset.substring(0, 6 - String.valueOf(workingRevision).length());
|
||||
offsets[1] = offset.substring(0, 6 - String.valueOf(lastChangedRevision).length());
|
||||
offsets[2] = offset.substring(0, offset.length() - (status.getAuthor() != null ? status.getAuthor().length() : 1));
|
||||
/*
|
||||
* status is shown in the manner of the native Subversion command line
|
||||
* client's command "svn status"
|
||||
*/
|
||||
|
||||
org.appwork.loggingv3.LogV3.fine(pathChangeType + propertiesChangeType + (isLocked ? "L" : " ") + (isAddedWithHistory ? "+" : " ") + (isSwitched ? "S" : " ") + lockLabel + " " + remoteChangeType + " " + workingRevision + offsets[0] + (lastChangedRevision >= 0 ? String.valueOf(lastChangedRevision) : "?") + offsets[1] + (status.getAuthor() != null ? status.getAuthor() : "?") + offsets[2] + status.getFile().getPath());
|
||||
}
|
||||
}
|
1077
src/org/appwork/utils/svn/Subversion.java
Normal file
1077
src/org/appwork/utils/svn/Subversion.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,8 +6,6 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import jd.SecondLevelLaunch;
|
||||
|
||||
import org.appwork.app.launcher.parameterparser.CommandSwitch;
|
||||
import org.appwork.app.launcher.parameterparser.ParameterParser;
|
||||
import org.appwork.utils.Application;
|
||||
@ -34,6 +32,8 @@ import org.jdownloader.startup.commands.SetConfigCommand;
|
||||
import org.jdownloader.startup.commands.ThreadDump;
|
||||
import org.jdownloader.updatev2.RestartController;
|
||||
|
||||
import jd.SecondLevelLaunch;
|
||||
|
||||
public class ParameterHandler implements InstanceMessageListener {
|
||||
private final HashMap<String, StartupCommand> commandMap;
|
||||
private final LogSource logger;
|
||||
@ -93,7 +93,7 @@ public class ParameterHandler implements InstanceMessageListener {
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
/**kept to avoid JDownloader.jar <-> Core.jar update compatibility issues. can be removed in future**/
|
||||
/** kept to avoid JDownloader.jar <-> Core.jar update compatibility issues. can be removed in future **/
|
||||
public void parseMessage(String[] args) {
|
||||
onIncommingMessage(null, args);
|
||||
}
|
||||
|
BIN
themes/themes/standard/org/jdownloader/images/nonpinned.png
Normal file
BIN
themes/themes/standard/org/jdownloader/images/nonpinned.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
BIN
themes/themes/standard/org/jdownloader/images/pinned.png
Normal file
BIN
themes/themes/standard/org/jdownloader/images/pinned.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 999 B |
1
themes/themes/standard/org/jdownloader/images/pinned.svg
Normal file
1
themes/themes/standard/org/jdownloader/images/pinned.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="32px" height="32px"><path fill="#a3b7cc" d="M1.979 38.729L1 39 1.271 38.021 18.646 20.646 19.354 21.354z"/><path fill="#e87070" d="M16.721,16.014c4.881-2.255,7.232-4.215,9.62-9.466l7.096,7.096 c-5.494,2.293-7.652,4.407-9.629,9.457L16.721,16.014z"/><path fill="#c74343" d="M26.492,7.406l6.069,6.069c-4.843,2.127-7.062,4.29-8.933,8.739l-6.05-6.05 C21.951,14.067,24.25,12.089,26.492,7.406 M26.179,5.679c-2.508,5.792-4.798,7.705-10.321,10.179L24,24 c2.038-5.523,4.06-7.671,10.321-10.179L26.179,5.679L26.179,5.679z"/><path fill="#f78f8f" d="M35.012,14.5c-0.58,0-1.125-0.226-1.535-0.636l-7.341-7.342c-0.846-0.846-0.846-2.223,0-3.069 l1.671-1.739l10.479,10.479l-1.732,1.665C36.137,14.274,35.592,14.5,35.012,14.5z"/><path fill="#c74343" d="M27.814,2.429l9.757,9.757l-1.379,1.325C35.877,13.826,35.458,14,35.012,14 c-0.446,0-0.866-0.174-1.181-0.489l-7.341-7.342C26.174,5.853,26,5.434,26,4.988c0-0.446,0.174-0.865,0.503-1.195L27.814,2.429 M27.8,1l-2.018,2.1c-1.043,1.043-1.043,2.733,0,3.776l7.341,7.342C33.645,14.739,34.329,15,35.012,15 c0.683,0,1.367-0.261,1.888-0.782L39,12.2L27.8,1L27.8,1z"/><g><path fill="#f78f8f" d="M8.707,17.239l1.237-1.237c0.968-0.968,2.255-1.501,3.624-1.501l0,0 c1.369,0,2.656,0.533,3.624,1.501L24,22.809c1.998,1.998,1.998,5.249,0,7.247l-1.238,1.238L8.707,17.239z"/><path fill="#c74343" d="M13.568,15c1.235,0,2.397,0.481,3.271,1.355l6.807,6.807c1.802,1.803,1.802,4.737,0,6.54 l-0.885,0.884L9.414,17.239l0.884-0.884C11.172,15.481,12.333,15,13.568,15 M13.568,14c-1.439,0-2.879,0.549-3.978,1.648L8,17.239 L22.761,32l1.592-1.591c2.196-2.197,2.196-5.757,0-7.954l-6.807-6.807C16.447,14.549,15.008,14,13.568,14L13.568,14z"/></g></svg>
|
After Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in New Issue
Block a user