Ticket #20760: sourcesconf_nosvn.diff

File sourcesconf_nosvn.diff, 1.3 KB (added by jmroot (Joshua Root), 14 years ago)
  • src/upgrade_sources_conf_default.tcl

     
    4242            set addDefault true
    4343         } elseif {[regexp {file://(/.+)} $url -> filepath]} {
    4444            if {[file exists [file join ${filepath} .svn]]} {
    45                if {![catch {set svnChannel [open "|svn info ${filepath}" r]} err]} {
     45               if {![info exists svnCmd]} {
     46                  set svnCmd ""
     47                  foreach path [concat [list ${prefix}/bin] [split $env(PATH) :]] {
     48                     if {[file executable ${path}/svn]} {
     49                        set svnCmd ${path}/svn
     50                        break
     51                     }
     52                  }
     53               }
     54               if {$svnCmd == ""} {
     55                  puts "WARNING: Unable to check svn URL for '$filepath' because no svn command could be found; please manually verify $sourcesConf!"
     56                  continue
     57               }
     58               if {![catch {set svnChannel [open "|$svnCmd info ${filepath}" r]} err]} {
    4659                  set svnURL {}
    4760                  while {[gets $svnChannel svnLine] >= 0} {
    4861                     regexp {^URL: (.*)} $svnLine -> svnURL