Skip to content

Commit

Permalink
MercurialSCMBuilderTest use head from revision
Browse files Browse the repository at this point in the history
  • Loading branch information
long76 authored Jun 6, 2024
1 parent 299ae1c commit d168208
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void headNameEquals() throws IOException, InterruptedException {
@Test
public void headNameDefault() throws IOException, InterruptedException {
SCMRevision revision = mercurialSCMSource.fetch("version-1.0", listener, null);
MercurialSCM mercurialSCM = new MercurialSCMBuilder(new SCMHead("default"), revision, "", "")
MercurialSCM mercurialSCM = new MercurialSCMBuilder(revision.getHead(), revision, "", "")
.build();
assertEquals(MercurialSCM.RevisionType.CHANGESET, mercurialSCM.getRevisionType());
assertEquals("default", mercurialSCM.getHeadName());
Expand All @@ -79,7 +79,7 @@ public void headNameDefault() throws IOException, InterruptedException {
@Test
public void headNameNonDefault() throws IOException, InterruptedException {
SCMRevision revision = mercurialSCMSource.fetch("version-1.1", listener, null);
MercurialSCM mercurialSCM = new MercurialSCMBuilder(new SCMHead("my-branch"), revision, "", "")
MercurialSCM mercurialSCM = new MercurialSCMBuilder(revision.getHead(), revision, "", "")
.build();
assertEquals(MercurialSCM.RevisionType.CHANGESET, mercurialSCM.getRevisionType());
assertEquals("my-branch", mercurialSCM.getHeadName());
Expand Down

0 comments on commit d168208

Please sign in to comment.