diff --git a/src/port/port.tcl b/src/port/port.tcl
index 3320fba6..3d3cea63 100644
a
|
b
|
proc action_portcmds { action portlist opts } { |
4030 | 4057 | ui_error [format "No homepage for %s" $portname] |
4031 | 4058 | } |
4032 | 4059 | } |
| 4060 | history { |
| 4061 | set tmpdir [pwd] |
| 4062 | if {[file exists "/tmp"]} {set tmpdir "/tmp"} |
| 4063 | catch {set tmpdir $::env(TMPDIR)} |
| 4064 | set tmpfname [file join $tmpdir [join [list $portname "-history-" [pid] ".log"] ""]] |
| 4065 | puts "Commit history for port:$portname ($portfile):\n" |
| 4066 | if {[macports::ui_isset ports_verbose]} { |
| 4067 | # include diffs |
| 4068 | set opt "--color=always -p" |
| 4069 | } else { |
| 4070 | # include just a summary of the changes |
| 4071 | set opt "--no-color --summary" |
| 4072 | } |
| 4073 | if {[catch {system -W $portdir \ |
| 4074 | "git log --decorate=full --source --full-diff $opt . > $tmpfname"} \ |
| 4075 | result]} { |
| 4076 | ui_debug $::errorInfo |
| 4077 | file delete -force $tmpfname |
| 4078 | break_softcontinue "unable to invoke git: $result" 1 status |
| 4079 | } |
| 4080 | if {[file exists $tmpfname]} { |
| 4081 | if {[catch {set fp [open $tmpfname r]} result]} { |
| 4082 | break_softcontinue "Could not open file $tmpfname: $result" 1 status |
| 4083 | } |
| 4084 | set history [read $fp] |
| 4085 | set history [split $history "\n"] |
| 4086 | foreach line $history { |
| 4087 | puts "$line" |
| 4088 | } |
| 4089 | close $fp |
| 4090 | file delete -force $tmpfname |
| 4091 | } |
| 4092 | } |
4033 | 4093 | } |
4034 | 4094 | } else { |
4035 | 4095 | break_softcontinue "Could not read $portfile" 1 status |
… |
… |
array set action_array [list \ |
4279 | 4340 | file [list action_portcmds [ACTION_ARGS_PORTS]] \ |
4280 | 4341 | logfile [list action_portcmds [ACTION_ARGS_PORTS]] \ |
4281 | 4342 | gohome [list action_portcmds [ACTION_ARGS_PORTS]] \ |
| 4343 | history [list action_portcmds [ACTION_ARGS_PORTS]] \ |
4282 | 4344 | \ |
4283 | 4345 | fetch [list action_target [ACTION_ARGS_PORTS]] \ |
4284 | 4346 | checksum [list action_target [ACTION_ARGS_PORTS]] \ |