comparison mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialCollectChangesPolicy.java @ 875:b06ea5c379cc

more progress for 'hg pull' commands
author Dmitry Neverov <dmitry.neverov@jetbrains.com>
date Wed, 01 Oct 2014 14:21:31 +0200
parents 894b7e0c9dd6
children 45311425ee3c
comparison
equal deleted inserted replaced
874:894b7e0c9dd6 875:b06ea5c379cc
108 if (fromRevision == null) 108 if (fromRevision == null)
109 fromRevision = fromState.getBranchRevisions().get(fromState.getDefaultBranchName()); 109 fromRevision = fromState.getBranchRevisions().get(fromState.getDefaultBranchName());
110 if (toRevision.equals(fromRevision) || fromRevision == null) 110 if (toRevision.equals(fromRevision) || fromRevision == null)
111 continue; 111 continue;
112 112
113 Collection<String> fromRevisions = ctx.getFromRevisionsForBranch(hgRoot, fromRevision, toRevision); 113 Collection<String> fromRevisions = ctx.getFromRevisionsForBranch(hgRoot, fromRevision, toRevision, ctx.getProgressConsumer());
114 List<ModificationData> branchChanges = collectChanges(ctx, root, fromRevisions, toRevision, rules); 114 List<ModificationData> branchChanges = collectChanges(ctx, root, fromRevisions, toRevision, rules);
115 for (ModificationData change : branchChanges) { 115 for (ModificationData change : branchChanges) {
116 if (!ctx.isReportedModification(change)) { 116 if (!ctx.isReportedModification(change)) {
117 changes.add(change); 117 changes.add(change);
118 ctx.markAsReported(change); 118 ctx.markAsReported(change);
191 @NotNull VcsRoot root, 191 @NotNull VcsRoot root,
192 @NotNull Collection<String> fromVersion, 192 @NotNull Collection<String> fromVersion,
193 @Nullable String currentVersion, 193 @Nullable String currentVersion,
194 @NotNull CheckoutRules checkoutRules) throws VcsException { 194 @NotNull CheckoutRules checkoutRules) throws VcsException {
195 HgVcsRoot hgRoot = myHgVcsRootFactory.createHgRoot(root); 195 HgVcsRoot hgRoot = myHgVcsRootFactory.createHgRoot(root);
196 SyncSettings<Void> settings = new SyncSettings<Void>(VcsCallable.NO_OP); 196 ctx.syncRepository(hgRoot, ctx.getProgressConsumer());
197 settings.setProgressConsumer(ctx.getProgressConsumer());
198 ctx.syncRepository(hgRoot);
199 List<ModificationData> result = new ArrayList<ModificationData>(); 197 List<ModificationData> result = new ArrayList<ModificationData>();
200 List<ChangeSet> csets = getChangesets(ctx, hgRoot, fromVersion, currentVersion); 198 List<ChangeSet> csets = getChangesets(ctx, hgRoot, fromVersion, currentVersion);
201 //When commit has no changes in subrepo configuration we can reuse 199 //When commit has no changes in subrepo configuration we can reuse
202 //subrepo revision table calculated for its parent commit(s). To do 200 //subrepo revision table calculated for its parent commit(s). To do
203 //that parents should be processed before children: 201 //that parents should be processed before children: