[22784] trunk/base/src/darwinports1.0/darwinports.tcl

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 14 01:05:17 PDT 2007


Revision: 22784
          http://trac.macosforge.org/projects/macports/changeset/22784
Author:   eridius at macports.org
Date:     2007-03-14 01:05:16 -0700 (Wed, 14 Mar 2007)

Log Message:
-----------
port sync now updates svn repos

Modified Paths:
--------------
    trunk/base/src/darwinports1.0/darwinports.tcl

Modified: trunk/base/src/darwinports1.0/darwinports.tcl
===================================================================
--- trunk/base/src/darwinports1.0/darwinports.tcl	2007-03-14 08:00:41 UTC (rev 22783)
+++ trunk/base/src/darwinports1.0/darwinports.tcl	2007-03-14 08:05:16 UTC (rev 22784)
@@ -1076,7 +1076,21 @@
 		ui_info "Synchronizing from $source"
 		switch -regexp -- [darwinports::getprotocol $source] {
 			{^file$} {
-				continue
+			    set portdir [darwinports::getportdir $source]
+				if {[file exists $portdir/.svn]} {
+				    if {[catch {set svncmd [darwinports::binaryInPath "svn"]}] == 0} {
+				        set svn_commandline "${svncmd} update --non-interactive \"${portdir}\""
+				        ui_debug $svn_commandline
+				        if {[catch {system $svn_commandline}]} {
+				            return -code error "sync failed doing svn update"
+				        }
+				        if {[catch {system "chmod -R a+r \"${portdir}\""}]} {
+				            ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
+				        }
+				    } else {
+				        return -code error "svn command not found"
+				    }
+				}
 			}
 			{^dports$} {
 				darwinports::index::sync $darwinports::portdbpath $source

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070314/43b406a5/attachment.html


More information about the macports-changes mailing list