Examples of LineReader


Examples of org.tmatesoft.hg.internal.LineReader

    if (!f.exists()) {
      return this;
    }
    state = new HashMap<Nodeid, Nodeid>();
    try {
      LineReader lr = new LineReader(f, repo.getSessionContext().getLog());
      ArrayList<String> contents = new ArrayList<String>();
      lr.read(new LineReader.SimpleLineCollector(), contents);
      Iterator<String> it = contents.iterator();
      workingDirParent = Nodeid.fromAscii(it.next());
      destRevision = Nodeid.fromAscii(it.next());
      externalParent = Nodeid.fromAscii(it.next());
      collapse = "1".equals(it.next());
View Full Code Here

Examples of org.tmatesoft.hg.internal.LineReader

      final ManifestRevision m2 = new ManifestRevision(nodeidPool, fnamePool);
      if (!wcp2.isNull()) {
        final int rp2 = hgRepo.getChangelog().getRevisionIndex(wcp2);
        hgRepo.getManifest().walk(rp2, rp2, m2);
      }
      LineReader lr = new LineReader(f, repo.getLog());
      Iterator<String> lines = lr.read(new LineReader.SimpleLineCollector(), new ArrayList<String>()).iterator();
      String s = lines.next();
      stateParent = nodeidPool.unify(Nodeid.fromAscii(s));
      final int rp1 = hgRepo.getChangelog().getRevisionIndex(stateParent);
      hgRepo.getManifest().walk(rp1, rp1, m1);
      while (lines.hasNext()) {
View Full Code Here

Examples of org.tmatesoft.hg.internal.LineReader

    final LogFacility log = repo.getLog();
    File all = repo.getRepositoryFile(HgRepositoryFiles.Bookmarks);
    try {
      LinkedHashMap<String, Nodeid> bm = new LinkedHashMap<String, Nodeid>();
      if (all.canRead() && all.isFile()) {
        LineReader lr1 = new LineReader(all, log);
        ArrayList<String> c = new ArrayList<String>();
        lr1.read(new LineReader.SimpleLineCollector(), c);
        for (String s : c) {
          int x = s.indexOf(' ');
          try {
            if (x > 0) {
              Nodeid nid = Nodeid.fromAscii(s.substring(0, x));
View Full Code Here

Examples of org.tmatesoft.hg.internal.LineReader

  private void readActiveBookmark() throws HgInvalidControlFileException {
    activeBookmark = null;
    File active = repo.getRepositoryFile(HgRepositoryFiles.BookmarksCurrent);
    try {
      if (active.canRead() && active.isFile()) {
        LineReader lr2 = new LineReader(active, repo.getLog());
        ArrayList<String> c = new ArrayList<String>(2);
        lr2.read(new LineReader.SimpleLineCollector(), c);
        if (c.size() > 0) {
          activeBookmark = c.get(0);
        }
      }
      if (activeTracker == null) {
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.