mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-08 16:42:10 +01:00
Read last commit date for hg branches
This commit is contained in:
@@ -79,10 +79,11 @@ public class HgBranchesCommand extends AbstractCommand
|
||||
node = changeset.getNode();
|
||||
}
|
||||
|
||||
long lastCommitDate = changeset.getTimestamp().getDate().getTime();
|
||||
if (DEFAULT_BRANCH_NAME.equals(hgBranch.getName())) {
|
||||
return Branch.defaultBranch(hgBranch.getName(), node);
|
||||
return Branch.defaultBranch(hgBranch.getName(), node, lastCommitDate);
|
||||
} else {
|
||||
return Branch.normalBranch(hgBranch.getName(), node);
|
||||
return Branch.normalBranch(hgBranch.getName(), node, lastCommitDate);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -42,8 +42,8 @@ public class HgBranchesCommandTest extends AbstractHgCommandTestBase {
|
||||
List<Branch> branches = command.getBranches();
|
||||
|
||||
assertThat(branches).contains(
|
||||
defaultBranch("default", "2baab8e80280ef05a9aa76c49c76feca2872afb7"),
|
||||
normalBranch("test-branch", "79b6baf49711ae675568e0698d730b97ef13e84a")
|
||||
defaultBranch("default", "2baab8e80280ef05a9aa76c49c76feca2872afb7", 1339586381000L),
|
||||
normalBranch("test-branch", "79b6baf49711ae675568e0698d730b97ef13e84a", 1339586299000L)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user