Skip to content

Commit cdee38f

Browse files
committed
packages - fix subversion version checks
Use "Last Changed Rev:" rather than "Revision:" as we want the last revision for the URL/branch/tag rather than the last revision for the repository. Don't just compare commits if the commit is HEAD (used for svn repos) as it's not a static commit but references the latest commit.
1 parent c32ffe4 commit cdee38f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scriptmodules/packages.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ function rp_getRemoteRepoHash() {
540540
;;
541541
svn)
542542
cmd=(svn info -r"$commit" "$url")
543-
hash=$("${cmd[@]}" 2>/dev/null | grep -oP "Revision: \K.*")
543+
hash=$("${cmd[@]}" 2>/dev/null | grep -oP "Last Changed Rev: \K.*")
544544
;;
545545
esac
546546
ret="$?"
@@ -594,7 +594,7 @@ function rp_hasNewerModule() {
594594
local repo_branch="$(rp_resolveRepoParam "${__mod_info[$id/repo_branch]}")"
595595
local repo_commit="$(rp_resolveRepoParam "${__mod_info[$id/repo_commit]}")"
596596
# if we are locked to a single commit, then we compare against the current module commit only
597-
if [[ -n "$repo_commit" ]]; then
597+
if [[ -n "$repo_commit" && "$repo_commit" != "HEAD" ]]; then
598598
# if we are using git and the module has an 8 character commit hash, then adjust
599599
# the package commit to 8 characters also for the comparison
600600
if [[ "$repo_type" == "git" && "${#repo_commit}" -eq 8 ]]; then
@@ -785,7 +785,7 @@ function rp_setPackageInfo() {
785785
else
786786
pkg_repo_date="$(svn info . | grep -oP "Last Changed Date: \K.*")"
787787
pkg_repo_date="$(date -Iseconds -d "$pkg_repo_date")"
788-
pkg_repo_commit="$(svn info . | grep -oP "Revision: \K.*")"
788+
pkg_repo_commit="$(svn info . | grep -oP "Last Changed Rev: \K.*")"
789789
fi
790790
;;
791791
file)

0 commit comments

Comments
 (0)