Examples of worked()


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

          ow.close();
        } catch (IOException ex) {
          throw new HgIOException("Can't write down branch information", ex, branchFile);
        }
      }
      progress.worked(1);
      progress.done();
    } catch (HgRuntimeException ex) {
      throw new HgLibraryFailureException(ex);
    }
  }
View Full Code Here

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

            p.preview(buf);
            buf.clear();
          }
          da.reset();
          prepare(revisionNumber, da);
          progressSupport.worked(da.length());
          buf.clear();
        } else {
          progressSupport.start(da.length());
        }
        while (!da.isEmpty()) {
View Full Code Here

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

          }
          if (buf.position() == 0) {
            throw new HgInvalidStateException("Bad sink implementation (consumes no bytes) results in endless loop");
          }
          buf.compact(); // ensure (a) there's space for new (b) data starts at 0
          progressSupport.worked(consumed);
        }
        progressSupport.done(); // XXX shall specify whether #done() is invoked always or only if completed successfully.
      } catch (IOException ex) {
        recordFailure(ex);
      } catch (CancelledException ex) {
View Full Code Here

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

        FileChannel fc = fis.getChannel();
        while (fc.read(buf) != -1) {
          cs.checkCancelled();
          buf.flip();
          int consumed = sink.write(buf);
          progress.worked(flength > Integer.MAX_VALUE ? 1 : consumed);
          buf.compact();
        }
      } catch (IOException ex) {
        throw new HgInvalidFileException("Working copy read failed", ex, f);
      } finally {
View Full Code Here

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

      if (!outgoing.isEmpty()) {
        //
        // prepare bundle
        BundleGenerator bg = new BundleGenerator(implRepo);
        File bundleFile = bg.create(outgoing.asList());
        progress.worked(20);
        b = new HgLookup(repo.getSessionContext()).loadBundle(bundleFile);
        //
        // send changes
        remoteRepo.unbundle(b, comparator.getRemoteHeads());
      } // update phase information nevertheless
View Full Code Here

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

        b = new HgLookup(repo.getSessionContext()).loadBundle(bundleFile);
        //
        // send changes
        remoteRepo.unbundle(b, comparator.getRemoteHeads());
      } // update phase information nevertheless
      progress.worked(20);
      //
      // update phase information
      if (phaseHelper.isCapableOfPhases()) {
        HgRemoteRepository.Phases remotePhases = remoteRepo.getPhases();
        RevisionSet remoteDraftsLocalPublic = phaseHelper.synchronizeWithRemote(remotePhases, outgoing);
View Full Code Here

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

              implRepo.getLog().dump(getClass(), Severity.Error, ex, String.format("Failed to update phase of %s", n.shortNotation()));
            }
          }
        }
      }
      progress.worked(5);
      //
      // update bookmark information
      HgBookmarks localBookmarks = repo.getBookmarks();
      if (!localBookmarks.getAllBookmarks().isEmpty()) {
        for (Pair<String,Nodeid> bm : remoteRepo.getBookmarks()) {
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.