Skip to content

Commit

Permalink
Only use parallel version avoidance for significants
Browse files Browse the repository at this point in the history
Only if reckoning a significant version should we try to avoid
version numbers tagged on parallel branches. This is in line with our
existing documented axioms (which focused on two TAGGED parallel
versions).

What this helps with is feature branches where you aren't intending to
make a release, and there's more benefit to having the version
logically related to what the history of the branch is, rather than
assuming the feature branch will eventually conflict and try to
eagerly avoid the existing parallel version.
  • Loading branch information
ajoberstar committed Aug 19, 2022
1 parent 0c85609 commit eba7a4c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ private Version reckonNormal(VcsInventory inventory) {
}

var targetNormal = inventory.getBaseNormal().incrementNormal(scope);
var probableStage = stageCalc.calculate(inventory, targetNormal);

// if a version's already being developed on a parallel branch we'll skip it
if (inventory.getParallelNormals().contains(targetNormal)) {
if (inventory.getParallelNormals().contains(targetNormal) && probableStage.isPresent()) {
if (scope.compareTo(parallelBranchScope) < 0) {
logger.debug("Skipping {} as it's being developed on a parallel branch. While {} was requested, parallel branches claim a {}, using that instead.", scope, parallelBranchScope);
targetNormal = targetNormal.incrementNormal(parallelBranchScope);
Expand Down

0 comments on commit eba7a4c

Please sign in to comment.