Mercurial > jhg
diff src/org/tmatesoft/hg/core/HgPushCommand.java @ 654:12a4f60ea972
1) Console push tool. 2) Pass class to blame into FileUtils
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 03 Jul 2013 15:11:40 +0200 |
parents | 629a7370554c |
children | 46b56864b483 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgPushCommand.java Wed Jul 03 14:38:30 2013 +0200 +++ b/src/org/tmatesoft/hg/core/HgPushCommand.java Wed Jul 03 15:11:40 2013 +0200 @@ -19,6 +19,8 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; import java.util.List; import org.tmatesoft.hg.internal.BundleGenerator; @@ -52,6 +54,7 @@ private final HgRepository repo; private HgRemoteRepository remoteRepo; + private RevisionSet outgoing; public HgPushCommand(HgRepository hgRepo) { repo = hgRepo; @@ -77,7 +80,6 @@ final RepositoryComparator comparator = new RepositoryComparator(parentHelper, remoteRepo); comparator.compare(new ProgressSupport.Sub(progress, 50), getCancelSupport(null, true)); List<Nodeid> l = comparator.getLocalOnlyRevisions(); - final RevisionSet outgoing; if (phaseHelper.isCapableOfPhases() && phaseHelper.withSecretRoots()) { RevisionSet secret = phaseHelper.allSecret(); outgoing = new RevisionSet(l).subtract(secret); @@ -197,6 +199,10 @@ } } + public Collection<Nodeid> getPushedRevisions() { + return outgoing == null ? Collections.<Nodeid>emptyList() : outgoing.asList(); + } + private RevisionSet knownRemoteDrafts(HgRemoteRepository.Phases remotePhases, HgParentChildMap<HgChangelog> parentHelper, RevisionSet outgoing, RevisionSet localSecret) { ArrayList<Nodeid> knownRemoteDraftRoots = new ArrayList<Nodeid>(); for (Nodeid rdr : remotePhases.draftRoots()) {