Package org.tmatesoft.hg.repo

Examples of org.tmatesoft.hg.repo.HgLookup


    if (!hgRepo.init(cmdLineOpts.findRepository())) {
      System.err.printf("Can't find repository in: %s\n", hgRepo.getRepository().getLocation());
      return;
    }
    // XXX perhaps, HgRepoFacade shall get detectRemote() analog (to get remote server with respect of facade's repo)
    HgRemoteRepository hgRemote = new HgLookup().detectRemote(cmdLineOpts.getSingle(""), hgRepo.getRepository());
    if (hgRemote.isInvalid()) {
      System.err.printf("Remote repository %s is not valid", hgRemote.getLocation());
      return;
    }
    HgPushCommand cmd = hgRepo.createPushCommand();
View Full Code Here


    if (hgRepo.isInvalid()) {
      System.err.printf("Can't find repository in: %s\n", hgRepo.getLocation());
      return;
    }
    File bundleFile = new File("/temp/hg/hg-bundle-cpython.tmp");
    HgBundle hgBundle = new HgLookup().loadBundle(bundleFile);
    hgBundle.inspectFiles(new Dump());
    if (Boolean.parseBoolean("true")) {
      return;
    }
    /* pass -R <path-to-repo-with-less-revisions-than-bundle>, e.g. for bundle with tip=168 and -R \temp\hg4j-50 with tip:159
View Full Code Here

    HgRepoFacade hgRepo = new HgRepoFacade();
    if (!hgRepo.init(cmdLineOpts.findRepository())) {
      System.err.printf("Can't find repository in: %s\n", hgRepo.getRepository().getLocation());
      return;
    }
    HgRemoteRepository hgRemote = new HgLookup().detectRemote(cmdLineOpts.getSingle(""), hgRepo.getRepository());
    if (hgRemote.isInvalid()) {
      System.err.printf("Remote repository %s is not valid", hgRemote.getLocation());
      return;
    }
    HgIncomingCommand cmd = hgRepo.createIncomingCommand();
View Full Code Here

    HgRepoFacade hgRepo = new HgRepoFacade();
    if (!hgRepo.init(cmdLineOpts.findRepository())) {
      System.err.printf("Can't find repository in: %s\n", hgRepo.getRepository().getLocation());
      return;
    }
    HgRemoteRepository hgRemote = new HgLookup().detectRemote(cmdLineOpts.getSingle(""), hgRepo.getRepository());
    if (hgRemote.isInvalid()) {
      System.err.printf("Remote repository %s is not valid", hgRemote.getLocation());
      return;
    }
    HgPullCommand cmd = hgRepo.createPullCommand();
View Full Code Here

    if (!hgRepo.init(cmdLineOpts.findRepository())) {
      System.err.printf("Can't find repository in: %s\n", hgRepo.getRepository().getLocation());
      return;
    }
    // XXX perhaps, HgRepoFacade shall get detectRemote() analog (to get remote server with respect of facade's repo)
    HgRemoteRepository hgRemote = new HgLookup().detectRemote(cmdLineOpts.getSingle(""), hgRepo.getRepository());
    if (hgRemote.isInvalid()) {
      System.err.printf("Remote repository %s is not valid", hgRemote.getLocation());
      return;
    }
    //
View Full Code Here

  }
 
  public HgRepository findRepository() throws Exception {
    String repoLocation = getSingle("-R", "--repository");
    if (repoLocation != null) {
      return new HgLookup().detect(repoLocation);
    }
    return new HgLookup().detectFromWorkingDir();
  }
View Full Code Here

      System.err.println("Need at least one argument pointing to remote server to pull changes from");
      return;
    }
    HgCloneCommand cmd = new HgCloneCommand();
    String remoteRepo = noOptsArgs.get(0);
    HgRemoteRepository hgRemote = new HgLookup().detectRemote(remoteRepo, null);
    if (hgRemote.isInvalid()) {
      System.err.printf("Remote repository %s is not valid", hgRemote.getLocation());
      return;
    }
    cmd.source(hgRemote);
View Full Code Here

    patch1.read(new ByteArrayDataAccess(patchData.array(), patchData.arrayOffset(), patchData.remaining()));
    return patch1;
  }
 
  private byte[] getRevisionTrueContent(File repoLoc, final int manifestRev, int clogRev) throws HgRepositoryNotFoundException, IllegalArgumentException, HgRuntimeException {
    HgRepository hgRepo = new HgLookup().detect(repoLoc);
    final ByteArrayOutputStream out = new ByteArrayOutputStream(1024 * 1000);
    hgRepo.getManifest().walk(clogRev, clogRev, new HgManifest.Inspector() {
     
      public boolean next(Nodeid nid, Path fname, Flags flags) {
        try {
View Full Code Here

    }
    return result;
  }

  public static void main(String[] args) throws Exception {
    HgRepository repo = new HgLookup().detect(System.getProperty("user.home") + "/hg/test-phases/");
    HgPhase[] v = readPhases(repo);
    printPhases(v);
  }
View Full Code Here

  public ErrorCollectorExt errorCollector = new ErrorCollectorExt();

  private HgRepository repo;
 
  public TestCatCommand() throws Exception {
    repo = new HgLookup().detectFromWorkingDir();
  }
View Full Code Here

TOP

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

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.