Examples of worked()


Examples of org.tmatesoft.hg.util.ProgressSupport.worked()

      for (FileRevisionHistoryChunk fhc : fileHistory.iterate(iterateDirection)) {
        totalWork += fhc.revisionCount();
      }
      progress = getProgressSupport(insp);
      progress.start(totalWork + 1);
      progress.worked(1); // BlameHelper.prepare
      //
      int[] fileClogParentRevs = new int[2];
      int[] fileParentRevs = new int[2];
      for (FileRevisionHistoryChunk fhc : fileHistory.iterate(iterateDirection)) {
        for (int fri : fhc.fileRevisions(iterateDirection)) {
View Full Code Here

Examples of org.tmatesoft.hg.util.ProgressSupport.worked()

          assert clogRevIndex >= startRevIndex;
          assert clogRevIndex <= endRevIndex;
          fhc.fillFileParents(fri, fileParentRevs);
          fhc.fillCsetParents(fri, fileClogParentRevs);
          bh.annotateChange(fri, clogRevIndex, fileParentRevs, fileClogParentRevs);
          progress.worked(1);
          cancel.checkCancelled();
        }
      }
    } catch (HgRuntimeException ex) {
      throw new HgLibraryFailureException(ex);
View Full Code Here

Examples of org.tmatesoft.hg.util.ProgressSupport.worked()

      fileClogParentRevs[0] = fileRevParents[0] == NO_REVISION ? NO_REVISION : df.getChangesetRevisionIndex(fileRevParents[0]);
      fileClogParentRevs[1] = fileRevParents[1] == NO_REVISION ? NO_REVISION : df.getChangesetRevisionIndex(fileRevParents[1]);
      BlameHelper bh = new BlameHelper(insp);
      int clogIndexStart = fileClogParentRevs[0] == NO_REVISION ? (fileClogParentRevs[1] == NO_REVISION ? 0 : fileClogParentRevs[1]) : fileClogParentRevs[0];
      bh.prepare(df, clogIndexStart, changelogRevisionIndex);
      progress.worked(1);
      cancel.checkCancelled();
      bh.annotateChange(fileRevIndex, changelogRevisionIndex, fileRevParents, fileClogParentRevs);
      progress.worked(1);
      cancel.checkCancelled();
    } catch (HgRuntimeException ex) {
View Full Code Here

Examples of org.tmatesoft.hg.util.ProgressSupport.worked()

      int clogIndexStart = fileClogParentRevs[0] == NO_REVISION ? (fileClogParentRevs[1] == NO_REVISION ? 0 : fileClogParentRevs[1]) : fileClogParentRevs[0];
      bh.prepare(df, clogIndexStart, changelogRevisionIndex);
      progress.worked(1);
      cancel.checkCancelled();
      bh.annotateChange(fileRevIndex, changelogRevisionIndex, fileRevParents, fileClogParentRevs);
      progress.worked(1);
      cancel.checkCancelled();
    } catch (HgRuntimeException ex) {
      throw new HgLibraryFailureException(ex);
    } finally {
      progress.done();
View Full Code Here

Examples of org.tmatesoft.hg.util.ProgressSupport.worked()

        throw ex;
      } catch (RuntimeException ex) {
        tr.rollback();
        throw ex;
      }
      progress.worked(45);
      added = insp.addedChangesets();
     
      if (!added.isEmpty()) {
        parentHelper.init(); // refresh the map, we use it for phases below
      }
View Full Code Here

Examples of org.tmatesoft.hg.util.ProgressSupport.worked()

      if (phaseHelper.isCapableOfPhases()) {
        RevisionSet rsCommon = new RevisionSet(common);
        HgRemoteRepository.Phases remotePhases = remote.getPhases();
        phaseHelper.synchronizeWithRemote(remotePhases, rsCommon.union(added));
      }
      progress.worked(5);
      incoming.unlink(); // keep the file only in case of failure
    } catch (HgRuntimeException ex) {
      throw new HgLibraryFailureException(ex);
    } finally {
      progress.done();
View Full Code Here

Examples of org.tmatesoft.hg.util.ProgressSupport.worked()

              src = nextRename.last();
              dst = curRename.first(src);
            }
            withCopyHandler.copy(src, dst);
          }
          progressHelper.worked(1);
        } // for renames
        frqBuilder.reportRenameIfNotInQueue(fileRenames, withCopyHandler);
      } // file != null
    } catch (HgRuntimeException ex) {
      throw new HgLibraryFailureException(ex);
View Full Code Here

Examples of org.tmatesoft.hg.util.ProgressSupport.worked()

          }
        });
      } else {
        throw new HgBadArgumentException("Sorry, only clean checkout is supported now, use #clean(true)", null);
      }
      progress.worked(1);
      cancellation.checkCancelled();
      final DirstateBuilder dirstateBuilder = new DirstateBuilder(internalRepo);
      final CheckoutWorker worker = new CheckoutWorker(internalRepo);
      HgManifest.Inspector insp = new HgManifest.Inspector() {
       
View Full Code Here

Examples of org.tmatesoft.hg.util.ProgressSupport.worked()

      // checkout tip if no revision set
      final int coRevision = revisionToCheckout.get(HgRepository.TIP);
      dirstateBuilder.parents(repo.getChangelog().getRevision(coRevision), null);
      repo.getManifest().walk(coRevision, coRevision, insp);
      worker.checkFailed();
      progress.worked(3);
      cancellation.checkCancelled();
      File dirstateFile = internalRepo.getRepositoryFile(Dirstate);
      try {
        FileChannel dirstateFileChannel = new FileOutputStream(dirstateFile).getChannel();
        dirstateBuilder.serialize(dirstateFileChannel);
View Full Code Here

Examples of org.tmatesoft.hg.util.ProgressSupport.worked()

        dirstateBuilder.serialize(dirstateFileChannel);
        dirstateFileChannel.close();
      } catch (IOException ex) {
        throw new HgIOException("Can't write down new directory state", ex, dirstateFile);
      }
      progress.worked(1);
      cancellation.checkCancelled();
      String branchName = repo.getChangelog().range(coRevision, coRevision).get(0).branch();
      assert branchName != null;
      File branchFile = internalRepo.getRepositoryFile(Branch);
      if (HgRepository.DEFAULT_BRANCH_NAME.equals(branchName)) {
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.