# HG changeset patch # User Dennis Schoen # Date 2008-01-16 10:50:24 # Node ID 108636b9b981869320d2e9377f4718835b37c117 # Parent 55ba3bc5b8fdc41dc65b86cbca4f93cba4f01611 hgk: don't exit if mercurial commands only print warnings diff --git a/contrib/hgk b/contrib/hgk --- a/contrib/hgk +++ b/contrib/hgk @@ -343,11 +343,24 @@ proc parsecommit {id contents listed old proc readrefs {} { global tagids idtags headids idheads tagcontents env curid - set curid [exec $env(HG) --config ui.report_untrusted=false id] + set status [catch {exec $env(HG) --config ui.report_untrusted=false id} curid] + if { $status != 0 } { + puts $::errorInfo + if { ![string equal $::errorCode NONE] } { + exit 2 + } + } regexp -- {[[:xdigit:]]+} $curid curid - set tags [exec $env(HG) --config ui.report_untrusted=false tags] + set status [catch {exec $env(HG) --config ui.report_untrusted=false tags} tags] + if { $status != 0 } { + puts $::errorInfo + if { ![string equal $::errorCode NONE] } { + exit 2 + } + } regsub -all "\r\n" $tags "\n" tags + set lines [split $tags "\n"] foreach f $lines { regexp {(\S+)$} $f full