Mercurial > hg > mercurial
comparison mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java @ 271:c0540bbe7c2a
Revert premature commit. Parents are not part of API yet
author | Dmitry Neverov <dmitry.neverov@jetbrains.com> |
---|---|
date | Wed, 20 Jul 2011 17:40:04 +0400 |
parents | f8f67a96b892 |
children | 5cbb5ae712e9 |
comparison
equal
deleted
inserted
replaced
270:0af40adc4791 | 271:c0540bbe7c2a |
---|---|
454 PersonalBranchDescription description = myVcs.getPersonalBranchDescription(originalRoot, "default"); | 454 PersonalBranchDescription description = myVcs.getPersonalBranchDescription(originalRoot, "default"); |
455 assertNull(description); | 455 assertNull(description); |
456 } | 456 } |
457 | 457 |
458 | 458 |
459 public void collected_changes_should_contain_parents() throws Exception { | |
460 VcsRootImpl vcsRoot = createVcsRoot(mergeCommittsRepo()); | |
461 List<ModificationData> changes = collectChanges(vcsRoot, "0:e0ad3ddde5aa", "4:6eeb8974fe67", new CheckoutRules("")); | |
462 Map<String, List<String>> child2parent = new HashMap<String, List<String>>(); | |
463 for (ModificationData change : changes) { | |
464 child2parent.put(change.getVersion(), change.getParentRevisions()); | |
465 } | |
466 assertEquals(Arrays.asList("0:e0ad3ddde5aa"), child2parent.get("1:a3d15477d297")); | |
467 assertEquals(Arrays.asList("0:e0ad3ddde5aa"), child2parent.get("2:db8a04d262f3")); | |
468 assertEquals(Arrays.asList("2:db8a04d262f3"), child2parent.get("3:2538c02bafeb")); | |
469 assertEquals(Arrays.asList("1:a3d15477d297", "3:2538c02bafeb"), child2parent.get("4:6eeb8974fe67")); | |
470 } | |
471 | |
472 | |
473 private void assertFiles(final List<String> expectedFiles, final ModificationData modificationData) { | 459 private void assertFiles(final List<String> expectedFiles, final ModificationData modificationData) { |
474 List<String> actualFiles = new ArrayList<String>(); | 460 List<String> actualFiles = new ArrayList<String>(); |
475 for (VcsChange vc: modificationData.getChanges()) { | 461 for (VcsChange vc: modificationData.getChanges()) { |
476 actualFiles.add(toFileStatus(vc.getType()) + " " + vc.getRelativeFileName()); | 462 actualFiles.add(toFileStatus(vc.getType()) + " " + vc.getRelativeFileName()); |
477 } | 463 } |