comparison src/org/tmatesoft/hg/internal/BlameHelper.java @ 629:5f52074707b2

Diff/blame methods as command, their residence in HgDataFile was a mistake
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 22 May 2013 16:46:15 +0200
parents 6526d8adbc0f
children cce0387c6041
comparison
equal deleted inserted replaced
628:6526d8adbc0f 629:5f52074707b2
23 import java.util.ListIterator; 23 import java.util.ListIterator;
24 24
25 import org.tmatesoft.hg.core.HgCallbackTargetException; 25 import org.tmatesoft.hg.core.HgCallbackTargetException;
26 import org.tmatesoft.hg.internal.DiffHelper.LineSequence; 26 import org.tmatesoft.hg.internal.DiffHelper.LineSequence;
27 import org.tmatesoft.hg.internal.DiffHelper.LineSequence.ByteChain; 27 import org.tmatesoft.hg.internal.DiffHelper.LineSequence.ByteChain;
28 import org.tmatesoft.hg.repo.HgBlameInspector.Block; 28 import org.tmatesoft.hg.core.HgBlameInspector;
29 import org.tmatesoft.hg.repo.HgBlameInspector.BlockData; 29 import org.tmatesoft.hg.core.HgBlameInspector.*;
30 import org.tmatesoft.hg.repo.HgBlameInspector.ChangeBlock;
31 import org.tmatesoft.hg.repo.HgBlameInspector.EqualBlock;
32 import org.tmatesoft.hg.repo.HgBlameInspector.RevisionDescriptor;
33 import org.tmatesoft.hg.repo.HgBlameInspector.RevisionDescriptor.Recipient;
34 import org.tmatesoft.hg.repo.HgBlameInspector;
35 import org.tmatesoft.hg.repo.HgDataFile; 30 import org.tmatesoft.hg.repo.HgDataFile;
36 import org.tmatesoft.hg.repo.HgInvalidStateException; 31 import org.tmatesoft.hg.repo.HgInvalidStateException;
37 import org.tmatesoft.hg.repo.HgRuntimeException; 32 import org.tmatesoft.hg.repo.HgRuntimeException;
38 import org.tmatesoft.hg.util.Adaptable; 33 import org.tmatesoft.hg.util.Adaptable;
39 import org.tmatesoft.hg.util.CancelledException; 34 import org.tmatesoft.hg.util.CancelledException;
251 } 246 }
252 ContentBlock originContent = new ContentBlock(s1); 247 ContentBlock originContent = new ContentBlock(s1);
253 ContentBlock targetContent = new ContentBlock(s2); 248 ContentBlock targetContent = new ContentBlock(s2);
254 annotatedRevision.set(originContent, targetContent); 249 annotatedRevision.set(originContent, targetContent);
255 annotatedRevision.set(csetOrigin, csetTarget, p2MergeCommon != null ? csetMergeParent : NO_REVISION); 250 annotatedRevision.set(csetOrigin, csetTarget, p2MergeCommon != null ? csetMergeParent : NO_REVISION);
256 Recipient curious = Adaptable.Factory.getAdapter(insp, Recipient.class, null); 251 RevisionDescriptor.Recipient curious = Adaptable.Factory.getAdapter(insp, RevisionDescriptor.Recipient.class, null);
257 if (curious != null) { 252 if (curious != null) {
258 try { 253 try {
259 curious.start(annotatedRevision); 254 curious.start(annotatedRevision);
260 } catch (HgCallbackTargetException ex) { 255 } catch (HgCallbackTargetException ex) {
261 error = ex; 256 error = ex;
267 public void end() { 262 public void end() {
268 super.end(); 263 super.end();
269 if (shallStop()) { 264 if (shallStop()) {
270 return; 265 return;
271 } 266 }
272 Recipient curious = Adaptable.Factory.getAdapter(insp, Recipient.class, null); 267 RevisionDescriptor.Recipient curious = Adaptable.Factory.getAdapter(insp, RevisionDescriptor.Recipient.class, null);
273 if (curious != null) { 268 if (curious != null) {
274 try { 269 try {
275 curious.done(annotatedRevision); 270 curious.done(annotatedRevision);
276 } catch (HgCallbackTargetException ex) { 271 } catch (HgCallbackTargetException ex) {
277 error = ex; 272 error = ex;