Mercurial > hg > mercurial
diff 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 |
line wrap: on
line diff
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java Wed Jan 24 21:19:56 2018 +0100 +++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java Wed Jan 24 22:02:52 2018 +0100 @@ -308,6 +308,21 @@ } + @TestFor(issues = "TW-50033") + public void labeling_with_branch_tag_clash() throws Exception { + VcsRootImpl vcsRoot = createVcsRoot(new File("mercurial-tests/testData/rep2").getAbsolutePath(), "default"); + RepositoryStateData s1 = myVcs.getCollectChangesPolicy().getCurrentState(vcsRoot); + //repository contains the 'topic' branch, create tag on non-last revision in this branch + myVcs.label("topic", "26:27184c50d7ef", vcsRoot, CheckoutRules.DEFAULT); + RepositoryStateData s2 = myVcs.getCollectChangesPolicy().getCurrentState(vcsRoot); + //retrieve tag into local clone + myVcs.getCollectChangesPolicy().collectChanges(vcsRoot, s1, s2, CheckoutRules.DEFAULT); + + //tag another commit from the 'topic' branch + myVcs.label("v1", "27:2a368008e4d9", vcsRoot, CheckoutRules.DEFAULT); + } + + public void tag_should_be_created_in_branch_to_which_tagged_revision_belongs() throws Exception { File remoteRepo = copyRepository(myTempFiles, myRep2Path); VcsRoot root = vcsRoot().withUrl(remoteRepo.getCanonicalPath()).withBranch("default").build();