1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Issue a warning and prompt the user to continue if the releasetest.tcl script

is run in a checkout with uncommitted changes.

FossilOrigin-Name: 30e917fff05b02ce2cb1f1c871d638200fbe5716
This commit is contained in:
drh
2016-09-08 23:12:08 +00:00
parent f78dcd1b96
commit 1fbd008cf4
3 changed files with 23 additions and 8 deletions

View File

@@ -926,6 +926,21 @@ proc process_options {argv} {
PUTS ""
}
# Check to see if there are changes in the checkout. If there are
# prompt the user to see if he wants to continue.
#
proc check_uncommitted {} {
if {[catch {exec fossil changes} res]==0 && [string trim $res]!=""} {
puts "The check-out contains uncommitted changes:"
puts $res
puts -nonewline "Run test anyhow (y/N)? "
flush stdout
set in [gets stdin]
if {$in!="y"} exit
}
}
# Main routine.
#
proc main {argv} {
@@ -933,6 +948,7 @@ proc main {argv} {
# Process any command line options.
set ::EXTRACONFIG {}
process_options $argv
if {!$::DRYRUN} check_uncommitted
PUTS [string repeat * 79]
set ::NERR 0