diff --git a/utils/releasetools/changelog.tcl b/utils/releasetools/changelog.tcl index 9b3a2cdd..06e38ba9 100755 --- a/utils/releasetools/changelog.tcl +++ b/utils/releasetools/changelog.tcl @@ -1,12 +1,17 @@ #!/usr/bin/env tclsh -if {[llength $::argv] != 2} { - puts "Usage: $::argv0 " +if {[llength $::argv] != 2 && [llength $::argv] != 3} { + puts "Usage: $::argv0 \[\]" exit 1 } set branch [lindex $::argv 0] set ver [lindex $::argv 1] +if {[llength $::argv] == 3} { + set count [lindex ::$argv 2] +} else { + set count 100 +} set template { ================================================================================ @@ -21,7 +26,7 @@ append template "\n\n" set date [clock format [clock seconds]] set template [string map [list %ver% $ver %date% $date] $template] -append template [exec git log $branch~100..$branch "--format=format:%an in commit %h:%n %s" --shortstat] +append template [exec git log $branch~$count..$branch "--format=format:%an in commit %h:%n %s" --shortstat] #Older, more verbose version. #