Mercurial > hg4j
diff src/org/tmatesoft/hg/internal/Filter.java @ 114:46291ec605a0
Filters to read and initialize according to configuration files
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 03 Feb 2011 22:13:55 +0100 |
parents | 67ae317408c9 |
children | c0cc2535462c |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/Filter.java Wed Feb 02 21:19:02 2011 +0100 +++ b/src/org/tmatesoft/hg/internal/Filter.java Thu Feb 03 22:13:55 2011 +0100 @@ -31,14 +31,25 @@ ByteBuffer filter(ByteBuffer src); interface Factory { - Filter create(HgRepository hgRepo, Path path, Options opts); + void initialize(HgRepository hgRepo, ConfigFile cfg); + // may return null if for a given path and/or options this filter doesn't make any sense + Filter create(Path path, Options opts); } enum Direction { FromRepo, ToRepo } - abstract class Options { - abstract Direction getDirection(); + public class Options { + + private final Direction direction; + public Options(Direction dir) { + direction = dir; + } + + Direction getDirection() { + return direction; + } + } }