Mercurial > hg > mercurial
comparison mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java @ 982:4a0ea921c214 Indore-2017.2.x
Merge back changes since 28.04.2017
author | Dmitry Neverov <dmitry.neverov@gmail.com> |
---|---|
date | Wed, 24 Jan 2018 22:02:52 +0100 |
parents | 7bf4d943d5bb 38e96101a6ef |
children | e78734c8fa95 |
comparison
equal
deleted
inserted
replaced
981:64b5816390f9 | 982:4a0ea921c214 |
---|---|
306 assertTrue(res.getRawStdout().contains("branch_tag")); | 306 assertTrue(res.getRawStdout().contains("branch_tag")); |
307 assertTrue(res.getRawStdout().contains("7:376dcf05cd2a")); | 307 assertTrue(res.getRawStdout().contains("7:376dcf05cd2a")); |
308 } | 308 } |
309 | 309 |
310 | 310 |
311 @TestFor(issues = "TW-50033") | |
312 public void labeling_with_branch_tag_clash() throws Exception { | |
313 VcsRootImpl vcsRoot = createVcsRoot(new File("mercurial-tests/testData/rep2").getAbsolutePath(), "default"); | |
314 RepositoryStateData s1 = myVcs.getCollectChangesPolicy().getCurrentState(vcsRoot); | |
315 //repository contains the 'topic' branch, create tag on non-last revision in this branch | |
316 myVcs.label("topic", "26:27184c50d7ef", vcsRoot, CheckoutRules.DEFAULT); | |
317 RepositoryStateData s2 = myVcs.getCollectChangesPolicy().getCurrentState(vcsRoot); | |
318 //retrieve tag into local clone | |
319 myVcs.getCollectChangesPolicy().collectChanges(vcsRoot, s1, s2, CheckoutRules.DEFAULT); | |
320 | |
321 //tag another commit from the 'topic' branch | |
322 myVcs.label("v1", "27:2a368008e4d9", vcsRoot, CheckoutRules.DEFAULT); | |
323 } | |
324 | |
325 | |
311 public void tag_should_be_created_in_branch_to_which_tagged_revision_belongs() throws Exception { | 326 public void tag_should_be_created_in_branch_to_which_tagged_revision_belongs() throws Exception { |
312 File remoteRepo = copyRepository(myTempFiles, myRep2Path); | 327 File remoteRepo = copyRepository(myTempFiles, myRep2Path); |
313 VcsRoot root = vcsRoot().withUrl(remoteRepo.getCanonicalPath()).withBranch("default").build(); | 328 VcsRoot root = vcsRoot().withUrl(remoteRepo.getCanonicalPath()).withBranch("default").build(); |
314 RepositoryStateData beforeLabelState = myVcs.getCollectChangesPolicy().getCurrentState(root); | 329 RepositoryStateData beforeLabelState = myVcs.getCollectChangesPolicy().getCurrentState(root); |
315 String topicCurrentVersion = beforeLabelState.getBranchRevisions().get("topic"); | 330 String topicCurrentVersion = beforeLabelState.getBranchRevisions().get("topic"); |