Package com.aragost.javahg.internals

Examples of com.aragost.javahg.internals.HgInputStream.peek()


            if (stream.match(NO_BOOKMARKS)) {
                stream.consumeAll();
                return Collections.emptyList();
            }
            List<Bookmark> result = Lists.newArrayList();
            while (stream.peek() != -1) {
                stream.mustMatch(' ');
                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(' ');
                stream.upTo(':');
View Full Code Here


     */
    public List<ResolveStatusLine> list() {
        HgInputStream stream = launchStream("--list");
        List<ResolveStatusLine> result = Lists.newArrayList();
        try {
            while (stream.peek() != -1) {
                result.add(ResolveStatusLine.fromStream(stream));
            }
        } catch (IOException e) {
            throw new RuntimeIOException(e);
        }
View Full Code Here

    public List<AnnotateLine> execute(String file) throws IOException {
        Repository repo = getRepository();
        List<Integer> revisions = Lists.newArrayList();
        List<String> lines = Lists.newArrayList();
        HgInputStream stream = launchStream(file);
        while (stream.peek() != -1) {
            revisions.add(stream.revisionUpTo(':'));
            stream.skip(1);
            lines.add(stream.textUpTo('\n'));
        }
        Map<Integer, Changeset> revNumMap = createRevNumMap(repo, revisions);
View Full Code Here

     */
    public List<ResolveStatusLine> list() {
        HgInputStream stream = launchStream("--list");
        List<ResolveStatusLine> result = Lists.newArrayList();
        try {
            while (stream.peek() != -1) {
                result.add(ResolveStatusLine.fromStream(stream));
            }
        } catch (IOException e) {
            throw new RuntimeIOException(e);
        }
View Full Code Here

        Repository repo = getRepository();
        HgInputStream stream = launchStream(file);
        LogCommand logCmd = LogCommand.on(repo);
        Map<Integer, String> dataMap = Maps.newHashMap();
        List<AnnotateLine> result = Lists.newArrayList();
        while (stream.peek() != -1) {
            Integer rev = stream.decimalIntUpTo(':');
            logCmd.rev(rev.toString());
            stream.skip(1);
            String data = stream.textUpTo('\n');
            dataMap.put(rev, data);
View Full Code Here

        try {
            if (stream.match(NO_BOOKMARKS)) {
                return Collections.emptyList();
            }
            List<Bookmark> result = Lists.newArrayList();
            while (stream.peek() != -1) {
                stream.mustMatch(' ');
                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(' ');
                stream.upTo(':');
View Full Code Here

     * @throws IOException
     */
    public List<ResolveStatusLine> list() throws IOException {
        HgInputStream stream = launchStream("--list");
        List<ResolveStatusLine> result = Lists.newArrayList();
        while (stream.peek() != -1) {
            result.add(ResolveStatusLine.fromStream(stream));
        }
        return result;
    }

View Full Code Here

            if (stream.match(NO_BOOKMARKS)) {
                stream.consumeAll();
                return Collections.emptyList();
            }
            List<Bookmark> result = Lists.newArrayList();
            while (stream.peek() != -1) {
                stream.mustMatch(' ');
                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(':');
                name = name.substring(0, name.lastIndexOf(' ')).trim();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.