Examples of textUpTo()


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

     * @throws IOException
     */
    public String clean() throws IOException {
        HgInputStream stream = launchStream("--clean");
        stream.mustMatch(CLEAN_PREFIX);
        String oldName = stream.textUpTo('\n');
        stream.consumeAll();
        return oldName;
    }

}
View Full Code Here

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

            List<Bookmark> result = Lists.newArrayList();
            while (stream.peek() != -1) {
                stream.mustMatch(' ');
                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(' ');
                stream.upTo(':');
                String node = stream.textUpTo('\n');
                Bookmark bookmark = new Bookmark(repo.changeset(node), name, active);
                result.add(bookmark);
            }
View Full Code Here

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

                stream.mustMatch(' ');
                boolean active = stream.read() == '*';
                stream.mustMatch(' ');
                String name = stream.textUpTo(' ');
                stream.upTo(':');
                String node = stream.textUpTo('\n');
                Bookmark bookmark = new Bookmark(repo.changeset(node), name, active);
                result.add(bookmark);
            }
            return result;
        } catch (IOException e) {
View Full Code Here

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

        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);
        int size = lines.size();
        List<AnnotateLine> result = Lists.newArrayListWithCapacity(size);
        for (int i = 0 ; i < size; i ++) {
View Full Code Here

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

        cmd.rev(revs);
        HgInputStream stream = cmd.stream();
        Map<Changeset, Phase> result = Maps.newHashMap();
        try {
            while (!stream.isEof()) {
                String node = stream.textUpTo(' ');
                String phaseName = stream.textUpTo('\0');
                Phase phase = Phase.fromText(phaseName);
                result.put(changeset(node), phase);
            }
        } catch (IOException e) {
View Full Code Here

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

        HgInputStream stream = cmd.stream();
        Map<Changeset, Phase> result = Maps.newHashMap();
        try {
            while (!stream.isEof()) {
                String node = stream.textUpTo(' ');
                String phaseName = stream.textUpTo('\0');
                Phase phase = Phase.fromText(phaseName);
                result.put(changeset(node), phase);
            }
        } catch (IOException e) {
            throw new RuntimeIOException(e);
View Full Code Here

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

        cmd.rev(getNode());
        HgInputStream stream = cmd.stream();
        List<String> result = Lists.newArrayList();
        try {
            while (!stream.isEof()) {
                String tag = stream.textUpTo(0);
                if (!"tip".equals(tag)) {
                    result.add(tag);
                }
            }
        } catch (IOException e) {
View Full Code Here

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

        cmd.rev(revs);
        HgInputStream stream = cmd.stream();
        Map<Changeset, Phase> result = Maps.newHashMap();
        try {
            while (!stream.isEof()) {
                String node = stream.textUpTo(' ');
                String phaseName = stream.textUpTo('\0');
                Phase phase = Phase.fromText(phaseName);
                result.put(changeset(node), phase);
            }
        } catch (IOException e) {
View Full Code Here

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

        HgInputStream stream = cmd.stream();
        Map<Changeset, Phase> result = Maps.newHashMap();
        try {
            while (!stream.isEof()) {
                String node = stream.textUpTo(' ');
                String phaseName = stream.textUpTo('\0');
                Phase phase = Phase.fromText(phaseName);
                result.put(changeset(node), phase);
            }
        } catch (IOException e) {
            throw new RuntimeIOException(e);
View Full Code Here

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

        cmd.rev(getNode());
        HgInputStream stream = cmd.stream();
        List<String> result = Lists.newArrayList();
        try {
            while (!stream.isEof()) {
                String tag = stream.textUpTo(0);
                if (!"tip".equals(tag)) {
                    result.add(tag);
                }
            }
        } catch (IOException e) {
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.