< prev index next >

vcs/src/main/java/org/openjdk/skara/vcs/ReadOnlyRepository.java

Print this page

67     Optional<byte[]> show(Path p, Hash h) throws IOException;
68     default Optional<List<String>> lines(Path p, Hash h) throws IOException {
69         return show(p, h).map(bytes -> new String(bytes, StandardCharsets.UTF_8).lines().collect(Collectors.toList()));
70     }
71 
72     List<FileEntry> files(Hash h, List<Path> paths) throws IOException;
73     default List<FileEntry> files(Hash h, Path... paths) throws IOException {
74         return files(h, Arrays.asList(paths));
75     }
76 
77     void dump(FileEntry entry, Path to) throws IOException;
78     List<StatusEntry> status(Hash from, Hash to) throws IOException;
79     Diff diff(Hash base, Hash head) throws IOException;
80     Diff diff(Hash head) throws IOException;
81     List<String> config(String key) throws IOException;
82     Repository copyTo(Path destination) throws IOException;
83     String pullPath(String remote) throws IOException;
84     String pushPath(String remote) throws IOException;
85     boolean isValidRevisionRange(String expression) throws IOException;
86     Optional<String> upstreamFor(Branch branch) throws IOException;


87 
88     static Optional<ReadOnlyRepository> get(Path p) throws IOException {
89         return Repository.get(p).map(r -> r);
90     }
91 
92     static boolean exists(Path p) throws IOException {
93         return Repository.exists(p);
94     }
95 }

67     Optional<byte[]> show(Path p, Hash h) throws IOException;
68     default Optional<List<String>> lines(Path p, Hash h) throws IOException {
69         return show(p, h).map(bytes -> new String(bytes, StandardCharsets.UTF_8).lines().collect(Collectors.toList()));
70     }
71 
72     List<FileEntry> files(Hash h, List<Path> paths) throws IOException;
73     default List<FileEntry> files(Hash h, Path... paths) throws IOException {
74         return files(h, Arrays.asList(paths));
75     }
76 
77     void dump(FileEntry entry, Path to) throws IOException;
78     List<StatusEntry> status(Hash from, Hash to) throws IOException;
79     Diff diff(Hash base, Hash head) throws IOException;
80     Diff diff(Hash head) throws IOException;
81     List<String> config(String key) throws IOException;
82     Repository copyTo(Path destination) throws IOException;
83     String pullPath(String remote) throws IOException;
84     String pushPath(String remote) throws IOException;
85     boolean isValidRevisionRange(String expression) throws IOException;
86     Optional<String> upstreamFor(Branch branch) throws IOException;
87     List<Reference> remoteBranches(String remote) throws IOException;
88     List<String> remotes() throws IOException;
89 
90     static Optional<ReadOnlyRepository> get(Path p) throws IOException {
91         return Repository.get(p).map(r -> r);
92     }
93 
94     static boolean exists(Path p) throws IOException {
95         return Repository.exists(p);
96     }
97 }
< prev index next >