Examples of textUpTo()


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

        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);
        }
        List<Changeset> changesets = logCmd.execute();
        for (Changeset changeset : changesets) {
            String data = dataMap.get(changeset.getRevision());
View Full Code Here

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<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();
                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(':');
                name = name.substring(0, name.lastIndexOf(' ')).trim();
                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()

            while (!stream.isEof()) {
              // $ hg log --debug --template "{node} {phase}" --rev 5b80e11a7c32121b5fd926b06056bb773eff050f
              // removing unknown node dd8c766936b9 from 1-phase boundary
              // 5b80e11a7c32121b5fd926b06056bb773eff050f draft
              // Observed with at least Mercurial Distributed SCM (version 2.3+10-9d9d15928521)
              String node = stream.textUpTo(' ');

              while ("removing".equals(node) && stream.find('\n')) {
                node = stream.textUpTo(' ');
              }
             
View Full Code Here

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

              // 5b80e11a7c32121b5fd926b06056bb773eff050f draft
              // Observed with at least Mercurial Distributed SCM (version 2.3+10-9d9d15928521)
              String node = stream.textUpTo(' ');

              while ("removing".equals(node) && stream.find('\n')) {
                node = stream.textUpTo(' ');
              }
             
                String phaseName = stream.textUpTo('\0');
                Phase phase = Phase.fromText(phaseName);
                result.put(changeset(node), phase);
View Full Code Here

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

              while ("removing".equals(node) && stream.find('\n')) {
                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.