diff --git a/differences/dometahierarchy.groovy b/differences/dometahierarchy.groovy index 5350529..f98b96f 100644 --- a/differences/dometahierarchy.groovy +++ b/differences/dometahierarchy.groovy @@ -115,14 +115,14 @@ def getgitlogdifferences(String gitrootfolder, String earlyrevision, String late } def extractsha(String line) { - def pattern = ~"^(.*)\\s(.*)" + def pattern = ~"^(\\p{XDigit}*) (.*)" - def sha = line.replaceFirst(pattern) { _, shabit, therest -> "${shabit.trim()}" } - def restofline = line.replaceFirst(pattern) { _, shabit, therest -> "${therest.trim()}" } + def sha = line.replaceFirst(pattern) { _, shabit, therest -> "${shabit}" } + def restofline = line.replaceFirst(pattern) { _, shabit, therest -> "${therest}" } echo "Sha filtering: line: ${line} sha: ${sha} therest: ${restofline}" - return [sha, therest] + return [sha.trim(), therest.trim()] } def DifferenceRecord fillrecord(meta, line) { @@ -137,7 +137,7 @@ def DifferenceRecord fillrecord(meta, line) { // Example of raw text to process: // 76056562e4 GIS-1621 - Removing redundant lines and effects of this - Restore nuget_version_edit.py - (sha, line) = extractsha(line) + (sha, line2) = extractsha(line) dr.sha = sha dr.type = 0