Ticket #27485: 0001-Add-support-for-git-managed-portdirs2.patch

File 0001-Add-support-for-git-managed-portdirs2.patch, 1.6 KB (added by mklein-de (Michael Klein), 12 years ago)
  • base/src/macports1.0/macports.tcl

    diff --git a/base/src/macports1.0/macports.tcl b/base/src/macports1.0/macports.tcl
    index 576ff73..ac9bf15 100644
    a b proc mportsync {{optionslist {}}} { 
    22272227                        incr numfailed
    22282228                        continue
    22292229                    }
    2230                 } elseif {$git_cmd != "" && [file exists $portdir/.git]} {
    2231                     set git_commandline "pushd $portdir ; $git_cmd pull --rebase ; popd"
     2230                } elseif {$git_cmd != "" && ![catch {exec sh -c "cd ${portdir} && $git_cmd rev-parse --is-inside-work-tree"} result]} {
     2231                    # determine what type of git repository this is
     2232                    if {![catch {exec sh -c "cd ${portdir} && $git_cmd config --local --get svn-remote.svn.url"} result]} {
     2233                        set git_action "svn rebase"
     2234                    } else {
     2235                        set git_action "pull"
     2236                    }
     2237                    set git_commandline "cd ${portdir} && $git_cmd $git_action"
    22322238                    ui_debug $git_commandline
    22332239                    if {
    22342240                        [catch {
    proc mportsync {{optionslist {}}} { 
    22472253                        }]
    22482254                    } {
    22492255                        ui_debug "$::errorInfo"
    2250                         ui_error "Synchronization of the local ports tree failed doing a git pull --rebase"
     2256                        ui_error "Synchronization of the local ports tree failed doing a git pull"
    22512257                        incr numfailed
    22522258                        continue
    22532259                    }