[154451] trunk/base/src/macports1.0/macports.tcl
raimue at macports.org
raimue at macports.org
Sun Oct 30 01:01:07 CEST 2016
Revision: 154451
https://trac.macports.org/changeset/154451
Author: raimue at macports.org
Date: 2016-10-30 01:01:06 +0200 (Sun, 30 Oct 2016)
Log Message:
-----------
sync: warn on obsolete Subversion repository
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2016-10-29 22:44:23 UTC (rev 154450)
+++ trunk/base/src/macports1.0/macports.tcl 2016-10-29 23:01:06 UTC (rev 154451)
@@ -2339,6 +2339,25 @@
return 0
}
+##
+# Checks whether a local source directory is a checkout of the obsolete Subversion repository
+#
+# @param source_dir local directory check
+proc _source_is_obsolete_svn_repo {source_dir} {
+ if {![catch {macports::findBinary svn} svn] &&
+ ([file exists ${source_dir}/.svn] ||
+ ![catch {exec $svn info ${source_dir} >/dev/null 2>@1}])
+ } then {
+ if {![catch {exec $svn info ${source_dir}} svninfo]} {
+ if {[regexp -line {^Repository Root: https://svn\.macports\.org/repository/macports} $svninfo] ||
+ [regexp -line {^Repository UUID: d073be05-634f-4543-b044-5fe20cf6d1d6$} $svninfo]} {
+ return 1
+ }
+ }
+ }
+ return 0
+}
+
proc macports::getportbuildpath {id {portname {}}} {
global macports::portdbpath
regsub {://} $id {.} port_path
@@ -2459,6 +2478,7 @@
}
set numfailed 0
+ set obsoletesvn 0
ui_msg "$macports::ui_prefix Updating the ports tree"
foreach source $sources {
@@ -2473,6 +2493,9 @@
switch -regexp -- [macports::getprotocol $source] {
{^file$} {
set portdir [macports::getportdir $source]
+ if {[_source_is_obsolete_svn_repo $portdir]} {
+ set obsoletesvn 1
+ }
try -pass_signal {
set repoInfo [macports::GetVCSUpdateCmd $portdir]
} catch {*} {
@@ -2737,6 +2760,11 @@
if {$numfailed >= 2} {
return -code error "Synchronization of $numfailed sources failed"
}
+
+ if {$obsoletesvn != 0} {
+ ui_warn "The Subversion repository at svn.macports.org is no longer updated."
+ ui_warn "Please switch to Git: https://trac.macports.org/wiki/howto/SyncingWithGit"
+ }
}
##
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161030/0c305e05/attachment-0002.html>
More information about the macports-changes
mailing list