Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-24 18:10:08 +01:00
java based merging?
Dieser Commit ist enthalten in:
Ursprung
3eb77e3e8b
Commit
1556101a98
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1 +1,2 @@
|
||||
*.java diff=java
|
||||
#*.java merge=import-driver #TODO not implemented, I'm just using a merge tool instead
|
3
.gitconfig
Normale Datei
3
.gitconfig
Normale Datei
@ -0,0 +1,3 @@
|
||||
[merge "import-driver"]
|
||||
name = Java merge driver used to resolve conflicts
|
||||
driver = merge-imports.sh %O %A %B %L %P
|
@ -85,9 +85,9 @@ if (!project.hasProperty("gitCommitHash")) {
|
||||
}
|
||||
}
|
||||
|
||||
buildScan {
|
||||
setTermsOfServiceUrl("https://gradle.com/terms-of-service")
|
||||
setTermsOfServiceAgree("yes")
|
||||
|
||||
publishAlways()
|
||||
}
|
||||
//buildScan {
|
||||
// setTermsOfServiceUrl("https://gradle.com/terms-of-service")
|
||||
// setTermsOfServiceAgree("yes")
|
||||
//
|
||||
// publishAlways()
|
||||
//}
|
||||
|
@ -1,8 +1,8 @@
|
||||
group=com.sk89q.worldedit
|
||||
#version=7.1.0-SNAPSHOT
|
||||
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
#org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
#org.gradle.jvmargs=-Xmx1G
|
||||
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
org.gradle.daemon=true
|
||||
org.gradle.configureondemand=true
|
||||
org.gradle.parallel=true
|
||||
|
3
merge-imports.sh
Normale Datei
3
merge-imports.sh
Normale Datei
@ -0,0 +1,3 @@
|
||||
javac merge/Merge.java
|
||||
java -cp merge Merge "$1" "$2" "$3" "$4" "$5"
|
||||
exit $?
|
BIN
merge/Merge.class
Normale Datei
BIN
merge/Merge.class
Normale Datei
Binäre Datei nicht angezeigt.
36
merge/Merge.java
Normale Datei
36
merge/Merge.java
Normale Datei
@ -0,0 +1,36 @@
|
||||
import java.awt.Desktop;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
public class Merge {
|
||||
public static void main(String[] args) throws IOException {
|
||||
File ancestor = new File(args[0]);
|
||||
File current = new File(args[1]);
|
||||
File other = new File(args[2]);
|
||||
int markerLenth = Integer.parseInt(args[3]);
|
||||
File original = new File(args[4]);
|
||||
|
||||
// HOWTO:
|
||||
// 1. Add contents of .gitconfig to your local .git/config
|
||||
// 2. This script will run for any merge conflicts
|
||||
|
||||
// TODO auto resolve merge conflicts in `current`
|
||||
// - imports
|
||||
|
||||
boolean failed = true;
|
||||
if (failed) {
|
||||
System.exit(1); // Auto merge failed
|
||||
}
|
||||
}
|
||||
|
||||
private static String read(File file) throws IOException {
|
||||
byte[] encoded = Files.readAllBytes(file.toPath());
|
||||
return new String(encoded, StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren