Mercurial > jhg
comparison src/org/tmatesoft/hg/internal/RepositoryComparator.java @ 295:981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 16 Sep 2011 05:35:32 +0200 |
parents | 9fb50c04f03c |
children | 5f9073eabf06 |
comparison
equal
deleted
inserted
replaced
294:32890bab7209 | 295:981f9f50bb6c |
---|---|
28 import java.util.Map; | 28 import java.util.Map; |
29 import java.util.Map.Entry; | 29 import java.util.Map.Entry; |
30 import java.util.Set; | 30 import java.util.Set; |
31 | 31 |
32 import org.tmatesoft.hg.core.HgBadStateException; | 32 import org.tmatesoft.hg.core.HgBadStateException; |
33 import org.tmatesoft.hg.core.HgException; | |
34 import org.tmatesoft.hg.core.HgRemoteConnectionException; | 33 import org.tmatesoft.hg.core.HgRemoteConnectionException; |
35 import org.tmatesoft.hg.core.Nodeid; | 34 import org.tmatesoft.hg.core.Nodeid; |
36 import org.tmatesoft.hg.repo.HgChangelog; | 35 import org.tmatesoft.hg.repo.HgChangelog; |
37 import org.tmatesoft.hg.repo.HgRemoteRepository; | 36 import org.tmatesoft.hg.repo.HgRemoteRepository; |
38 import org.tmatesoft.hg.repo.HgRemoteRepository.Range; | 37 import org.tmatesoft.hg.repo.HgRemoteRepository.Range; |
391 } | 390 } |
392 | 391 |
393 /** | 392 /** |
394 * @return list of nodeids from branchRoot to branchHead, inclusive. IOW, first element of the list is always root of the branch | 393 * @return list of nodeids from branchRoot to branchHead, inclusive. IOW, first element of the list is always root of the branch |
395 */ | 394 */ |
396 public List<Nodeid> completeBranch(final Nodeid branchRoot, final Nodeid branchHead) throws HgException { | 395 public List<Nodeid> completeBranch(final Nodeid branchRoot, final Nodeid branchHead) throws HgRemoteConnectionException { |
397 class DataEntry { | 396 class DataEntry { |
398 public final Nodeid queryHead; | 397 public final Nodeid queryHead; |
399 public final int headIndex; | 398 public final int headIndex; |
400 public List<Nodeid> entries; | 399 public List<Nodeid> entries; |
401 | 400 |
510 | 509 |
511 /** | 510 /** |
512 * returns in order from branch root to head | 511 * returns in order from branch root to head |
513 * for a non-empty BranchChain, shall return modifiable list | 512 * for a non-empty BranchChain, shall return modifiable list |
514 */ | 513 */ |
515 public List<Nodeid> visitBranches(BranchChain bc) throws HgException { | 514 public List<Nodeid> visitBranches(BranchChain bc) throws HgRemoteConnectionException { |
516 if (bc == null) { | 515 if (bc == null) { |
517 return Collections.emptyList(); | 516 return Collections.emptyList(); |
518 } | 517 } |
519 List<Nodeid> mine = completeBranch(bc.branchRoot, bc.branchHead); | 518 List<Nodeid> mine = completeBranch(bc.branchRoot, bc.branchHead); |
520 if (bc.isTerminal() || bc.isRepoStart()) { | 519 if (bc.isTerminal() || bc.isRepoStart()) { |