Examples of LogCommand


Examples of org.eclipse.jgit.api.LogCommand

            @Override
            public FileTime lastModifiedTime() {
                if ( lastModifiedDate == -1L ) {
                    RevWalk revWalk = null;
                    try {
                        final LogCommand logCommand = fs.gitRepo().log().add( id ).setMaxCount( 1 );
                        if ( !gPath.isEmpty() ) {
                            logCommand.addPath( gPath );
                        }
                        revWalk = (RevWalk) logCommand.call();
                        lastModifiedDate = revWalk.iterator().next().getCommitterIdent().getWhen().getTime();
                    } catch ( Exception ex ) {
                        lastModifiedDate = 0;
                    } finally {
                        if ( revWalk != null ) {
                            revWalk.dispose();
                        }
                    }
                }
                return new FileTimeImpl( lastModifiedDate );
            }

            @Override
            public FileTime lastAccessTime() {
                return null;
            }

            @Override
            public FileTime creationTime() {
                if ( creationDate == -1L ) {
                    RevWalk revWalk = null;
                    try {
                        final LogCommand logCommand = fs.gitRepo().log().add( id ).setMaxCount( 1 );
                        if ( !gPath.isEmpty() ) {
                            logCommand.addPath( gPath );
                        }
                        revWalk = (RevWalk) logCommand.call();
                        creationDate = revWalk.iterator().next().getCommitterIdent().getWhen().getTime();
                    } catch ( Exception ex ) {
                        creationDate = 0;
                    } finally {
                        if ( revWalk != null ) {
View Full Code Here

Examples of org.hivedb.teamcity.plugin.commands.LogCommand

      new CloneCommand(configuration).run(false);
    }
    else {
      new FetchCommand(configuration).run();
    }
    LogCommand getLog = new LogCommand(configuration);
    Commit head = getLog.head();
    if (head == null) {
      log.warn("No current version!");
      return null;
    }
    log.warn("Version: " + head);
View Full Code Here

Examples of org.hivedb.teamcity.plugin.commands.LogCommand

    VersionNumber to = new VersionNumber(toVersion);
    if (from.equals(to)) {
      return modifications;
    }
    GitConfiguration configuration = GitConfiguration.createServerConfiguration(root);
    LogCommand logCommand = new LogCommand(configuration);
    for (Commit commit : logCommand.between(from, to)) {
      log.info(commit);
      List<VcsChange> vcsChanged = new ArrayList<VcsChange>();
      for (NameAndStatus change : commit.getChanges()) {
        log.info(change);
        vcsChanged.add(createChange(change, fromVersion, toVersion));
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.