Browse Source

punk::repo handle missing fossil executable a little better

master
Julian Noble 1 year ago
parent
commit
2b928515ac
  1. 1173
      src/bootsupport/modules/punk/repo-0.1.1.tm
  2. 15
      src/modules/punk/repo-999999.0a1.0.tm

1173
src/bootsupport/modules/punk/repo-0.1.1.tm

File diff suppressed because it is too large Load Diff

15
src/modules/punk/repo-999999.0a1.0.tm

@ -125,10 +125,17 @@ namespace eval punk::repo {
puts stdout [dict get $repostate warnings]
}
set fossil_prog [auto_execok fossil]
if {$fossil_prog ne ""} {
{*}$fossil_prog {*}$args
} else {
puts stderr "fossil command not found. Please install fossil"
}
}
interp alias "" fossil "" punk::repo::fossil_proxy
if {[auto_execok fossil] ne ""} {
interp alias "" FOSSIL "" {*}[auto_execok fossil]
}
proc askuser {question} {
puts stdout $question
@ -370,7 +377,9 @@ namespace eval punk::repo {
if {$rt eq "fossil"} {
dict set resultdict repotype fossil
set fossil_cmd [auto_execok fossil]
if {$fossil_cmd eq ""} {
error "workingdir_state error: fossil executable doesn't seem to be available"
}
if {[catch {punk::mix::util::do_in_path $repodir [list exec {*}$fossil_cmd status --all --differ --merge $abspath]} fossilstate]} {
error "workingdir_state error: Unable to retrieve workingdir state using fossil. Errormsg: $fossilstate"
}
@ -760,6 +769,10 @@ namespace eval punk::repo {
set startdir $opt_parentfolder
set fossil_prog [auto_execok fossil]
if {$fossil_prog eq ""} {
puts stderr "Fossil not found. Please install fossil"
return
}
set fossilinfo [exec {*}$fossil_prog info] ;#will give us the necessary config-db info whether in a project folder or not
set matching_lines [punk::repo::grep {config-db:*} $fossilinfo]

Loading…
Cancel
Save