blob: 6a2877cae500c841532a1d146eeeed6f1bad7b6f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
package org.eclipse.fx.code.compensator.project.vcs.git;
import java.io.IOException;
import java.nio.file.Path;
import java.util.Collection;
import org.eclipse.fx.code.compensator.project.InstanceProject;
import org.eclipse.fx.code.compensator.project.vcs.VCSRepositoryInstance;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
public class GitVCSRepositoryInstance implements VCSRepositoryInstance {
private Path path;
private Repository repo;
public GitVCSRepositoryInstance(Path path) {
this.path = path;
try {
FileRepositoryBuilder builder = new FileRepositoryBuilder();
repo = builder.setGitDir(path.toFile()).readEnvironment().findGitDir().build();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Override
public Path getRootPath() {
return path;
}
@Override
public void fetch() {
// TODO Auto-generated method stub
}
@Override
public void push() {
// TODO Auto-generated method stub
}
@Override
public void merge() {
// TODO Auto-generated method stub
}
@Override
public void commit() {
// TODO Auto-generated method stub
}
@Override
public void commit(Collection<Path> pathList) {
System.err.println("COMMIT: " + pathList);
}
}
|