You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
2.6 KiB
92 lines
2.6 KiB
# -*- tcl -*- |
|
# Maintenance Instruction: leave the 999999.xxx.x as is and use 'pmix make' or src/make.tcl to update from <pkg>-buildversion.txt |
|
# |
|
# Please consider using a BSD or MIT style license for greatest compatibility with the Tcl ecosystem. |
|
# Code using preferred Tcl licenses can be eligible for inclusion in Tcllib, Tklib and the punk package repository. |
|
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
|
# (C) 2023 |
|
# |
|
# @@ Meta Begin |
|
# Application punk::mix::commandset::repo 999999.0a1.0 |
|
# Meta platform tcl |
|
# Meta license <unspecified> |
|
# @@ Meta End |
|
|
|
|
|
|
|
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
|
## Requirements |
|
##e.g package require frobz |
|
|
|
|
|
|
|
|
|
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
|
namespace eval punk::mix::commandset::repo { |
|
namespace export * |
|
proc tickets {{project ""}} { |
|
set result "" |
|
if {[string length $project]} { |
|
puts stderr "project status unimplemented" |
|
return |
|
} |
|
set active_dir [pwd] |
|
append result "Retrieving top 10 tickets only (for more, use fossil timeline -n <int> -t t)" \n |
|
append result [exec fossil timeline -n 10 -t t] |
|
|
|
return $result |
|
} |
|
|
|
proc fossilize { args} { |
|
#check if project already managed by fossil.. initialise and check in if not. |
|
puts stderr "unimplemented" |
|
} |
|
|
|
proc unfossilize {projectname args} { |
|
#remove/archive .fossil |
|
puts stderr "unimplemented" |
|
} |
|
proc state {} { |
|
set result "" |
|
set repopaths [punk::repo::find_repos [pwd]] |
|
set repos [dict get $repopaths repos] |
|
if {![llength $repos]} { |
|
append result [dict get $repopaths warnings] |
|
} else { |
|
append result [dict get $repopaths warnings] |
|
lassign [lindex $repos 0] repopath repotypes |
|
if {"fossil" in $repotypes} { |
|
append result \n "Fossil repo based at $repopath" |
|
set repostate [punk::repo::workingdir_state $repopath -repopaths $repopaths -repotypes fossil] |
|
append result \n [punk::repo::workingdir_state_summary $repostate] |
|
} |
|
if {"git" in $repotypes} { |
|
append result \n "Git repo based at $repopath" |
|
set repostate [punk::repo::workingdir_state $repopath -repopaths $repopaths -repotypes git] |
|
append result \n [punk::repo::workingdir_state_summary $repostate] |
|
} |
|
} |
|
return $result |
|
} |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
|
## Ready |
|
package provide punk::mix::commandset::repo [namespace eval punk::mix::commandset::repo { |
|
variable version |
|
set version 999999.0a1.0 |
|
}] |
|
return
|
|
|