Package org.tmatesoft.hg.repo

Examples of org.tmatesoft.hg.repo.HgInvalidControlFileException


          }
          allKnown.add(pr);
        }
      }
    } catch (HgIOException ex) {
      throw new HgInvalidControlFileException(ex, true);
    }
    return this;
  }
View Full Code Here


    File requiresFile = new File(repoDir, "requires"); // not #getFileFromRepoDir() just in case it gets modified later
    try {
      int flags = new RequiresFile().parse(requiresFile);
      return setRequires(flags);
    } catch (IOException ex) {
      throw new HgInvalidControlFileException("Parse failed", ex, requiresFile);
    }
  }
View Full Code Here

    try {
      Pair<Integer, Nodeid> newRev = revlog.addPatchRevision(ge, clogRevs, revlogRevs);
      revlogRevs.update(newRev.first(), newRev.second());
      return true;
    } catch (HgIOException ex) {
      throw new HgInvalidControlFileException(ex, true);
    }
  }
View Full Code Here

        revlogHeader.offset(0).baseRevision(-1);
        revisionSequence.clear();
        indexFile = new FileOutputStream(currentFile = new File(hgDir, filename = "store/00changelog.i"));
        collectChangelogIndexes = true;
      } catch (IOException ex) {
        throw new HgInvalidControlFileException("Failed to write changelog", ex, new File(hgDir, filename));
      }
      stopIfCancelled();
    }
View Full Code Here

      try {
        clearPreviousContent();
        collectChangelogIndexes = false;
        closeIndexFile();
      } catch (IOException ex) {
        throw new HgInvalidControlFileException("Failed to write changelog", ex, new File(hgDir, filename));
      }
      progressSupport.worked(1);
      stopIfCancelled();
    }
View Full Code Here

      try {
        revlogHeader.offset(0).baseRevision(-1);
        revisionSequence.clear();
        indexFile = new FileOutputStream(currentFile = new File(hgDir, filename = "store/00manifest.i"));
      } catch (IOException ex) {
        throw new HgInvalidControlFileException("Failed to write manifest", ex, new File(hgDir, filename));
      }
      stopIfCancelled();
    }
View Full Code Here

    public void manifestEnd() throws HgInvalidControlFileException {
      try {
        clearPreviousContent();
        closeIndexFile();
      } catch (IOException ex) {
        throw new HgInvalidControlFileException("Failed to write manifest", ex, new File(hgDir, filename));
      }
      progressSupport.worked(1);
      stopIfCancelled();
    }
View Full Code Here

        File file = new File(hgDir, filename = storagePathHelper.rewrite(name).toString());
        file.getParentFile().mkdirs();
        indexFile = new FileOutputStream(currentFile = file);
      } catch (IOException ex) {
        String m = String.format("Failed to write file %s", filename);
        throw new HgInvalidControlFileException(m, ex, new File(filename));
      }
      stopIfCancelled();
    }
View Full Code Here

        fncacheFile.addIndex(pathFactory.path(name));
        clearPreviousContent();
        closeIndexFile();
      } catch (IOException ex) {
        String m = String.format("Failed to write file %s", filename);
        throw new HgInvalidControlFileException(m, ex, new File(filename));
      }
      progressSupport.worked(1);
      stopIfCancelled();
    }
View Full Code Here

            return i;
          }
        }
      }
      String m = String.format("Can't find index of %s for file %s", p.shortNotation(), filename);
      throw new HgInvalidControlFileException(m, null, new File(hgDir, filename)).setRevision(p);
    }
View Full Code Here

TOP

Related Classes of org.tmatesoft.hg.repo.HgInvalidControlFileException

Copyright © 2018 www.massapicom. 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.