Package org.tmatesoft.hg.util

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


      throw new HgBadArgumentException("Command needs file argument", null);
    }
    final ProgressSupport progress = getProgressSupport(inspector);
    final CancelSupport cancellation = getCancelSupport(inspector, true);
    cancellation.checkCancelled();
    progress.start(200);
    try {
      HgDataFile df = repo.getFileNode(file);
      if (!df.exists()) {
        return;
      }
View Full Code Here


      throw new IllegalArgumentException("Delegate can't be null");
    }
    final ProgressSupport ps = getProgressSupport(handler);
    final CancelSupport cs = getCancelSupport(handler, true);
    try {
      ps.start(200);
      ChangesetTransformer inspector = new ChangesetTransformer(localRepo, handler, getParentHelper(), new ProgressSupport.Sub(ps, 100), cs);
      inspector.limitBranches(branches);
      List<Nodeid> out = getOutgoingRevisions(new ProgressSupport.Sub(ps, 100), cs);
      int[] outRevIndex = new int[out.size()];
      int i = 0;
View Full Code Here

   * @throws HgException subclass thereof to indicate specific issue with the command arguments or repository state
   */
  public void executeDiff(HgBlameInspector insp) throws HgCallbackTargetException, CancelledException, HgException {
    checkFile();
    final ProgressSupport progress = getProgressSupport(insp);
    progress.start(2);
    try {
      final int startRevIndex = clogRevIndexStart.get(0);
      final int endRevIndex = clogRevIndexEnd.get(TIP);
      final CancelSupport cancel = getCancelSupport(insp, true);
      int fileRevIndex1 = fileRevIndex(df, startRevIndex);
View Full Code Here

      int totalWork = 0;
      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)) {
View Full Code Here

   * @throws HgException subclass thereof to indicate specific issue with the command arguments or repository state
   */
  public void executeParentsAnnotate(HgBlameInspector insp) throws HgCallbackTargetException, CancelledException, HgException {
    checkFile();
    final ProgressSupport progress = getProgressSupport(insp);
    progress.start(2);
    try {
      final CancelSupport cancel = getCancelSupport(insp, true);
      int changelogRevisionIndex = clogRevIndexEnd.get(TIP);
      // TODO detect if file is text/binary (e.g. looking for chars < ' ' and not \t\r\n\f
      int fileRevIndex = fileRevIndex(df, changelogRevisionIndex);
View Full Code Here

  // FIXME get repository lock
  public void execute() throws HgRemoteConnectionException, HgIOException, HgLibraryFailureException, CancelledException {
    final ProgressSupport progress = getProgressSupport(null);
    try {
      progress.start(100);
      // TODO refactor same code in HgIncomingCommand #getComparator and #getParentHelper
      final HgChangelog clog = repo.getChangelog();
      final HgParentChildMap<HgChangelog> parentHelper = new HgParentChildMap<HgChangelog>(clog);
      parentHelper.init();
      final RepositoryComparator comparator = new RepositoryComparator(parentHelper, remote);
View Full Code Here

      // prior to passing cset to next Inspector, which is either (a) collector to reverse cset order, then invokes
      // transformer from (b), below, with alternative cset order or (b) transformer to hi-level csets.
      FilteringInspector filterInsp = new FilteringInspector();
      filterInsp.changesets(firstCset, lastCset);
      if (file == null) {
        progressHelper.start(lastCset - firstCset + 1);
        if (iterateDirection == HgIterateDirection.OldToNew) {
          filterInsp.delegateTo(csetTransform);
          repo.getChangelog().range(firstCset, lastCset, filterInsp);
          csetTransform.checkFailure();
        } else {
View Full Code Here

      } else {
        filterInsp.delegateTo(csetTransform);
        final HgFileRenameHandlerMixin withCopyHandler = Adaptable.Factory.getAdapter(handler, HgFileRenameHandlerMixin.class, null);
        FileRenameQueueBuilder frqBuilder = new FileRenameQueueBuilder();
        List<QueueElement> fileRenames = frqBuilder.buildFileRenamesQueue(firstCset, lastCset);
        progressHelper.start(fileRenames.size());
        for (int nameIndex = 0, fileRenamesSize = fileRenames.size(); nameIndex < fileRenamesSize; nameIndex++) {
          QueueElement curRename = fileRenames.get(nameIndex);
          HgDataFile fileNode = curRename.file();
          if (followAncestry) {
            TreeBuildInspector treeBuilder = new TreeBuildInspector(followAncestry);
View Full Code Here

      // i.e. if we iterate from new to old, recent filenames come first
      FileRenameQueueBuilder frqBuilder = new FileRenameQueueBuilder();
      List<QueueElement> fileRenamesQueue = frqBuilder.buildFileRenamesQueue(firstCset, lastCset);
      // XXX perhaps, makes sense to look at selected file's revision when followAncestry is true
      // to ensure file we attempt to trace is in the WC's parent. Native hg aborts if not.
      progressHelper.start(4 * fileRenamesQueue.size());
      for (int namesIndex = 0, renamesQueueSize = fileRenamesQueue.size(); namesIndex < renamesQueueSize; namesIndex++) {
  
        final QueueElement renameInfo = fileRenamesQueue.get(namesIndex);
        dispatcher.prepare(progressHelper, renameInfo);
        cancelHelper.checkCancelled();
View Full Code Here

  public void execute() throws HgException, CancelledException {
    try {
      final ProgressSupport progress = getProgressSupport(null);
      final CancelSupport cancellation = getCancelSupport(null, true);
      cancellation.checkCancelled();
      progress.start(6);
      Internals internalRepo = Internals.getInstance(repo);
      if (cleanCheckout) {
        // remove tracked files from wd (perhaps, just forget 'Added'?)
        // for now, just delete each and every tracked file
        // TODO WorkingCopy container with getFile(HgDataFile/Path) to access files in WD
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.