00001 # TKE - Advanced Programmer's Editor 00002 # Copyright (C) 2014-2019 Trevor Williams (phase1geo@gmail.com) 00003 # 00004 # This program is free software; you can redistribute it and/or modify 00005 # it under the terms of the GNU General Public License as published by 00006 # the Free Software Foundation; either version 2 of the License, or 00007 # (at your option) any later version. 00008 # 00009 # This program is distributed in the hope that it will be useful, 00010 # but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 # GNU General Public License for more details. 00013 # 00014 # You should have received a copy of the GNU General Public License along 00015 # with this program; if not, write to the Free Software Foundation, Inc., 00016 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00017 00018 ###################################################################### 00019 # Name: commit.tcl 00020 # Author: Trevor Williams (phase1geo@gmail.com) 00021 # Date: 9/12/2013 00022 ###################################################################### 00023 00024 # Read the contents of the version file to get the dot version 00025 source "version.tcl" 00026 00027 # Get the global ID and local ID 00028 set id [exec hg id -n] 00029 00030 if {[catch "open version.tcl w" rc]} { 00031 error $rc 00032 exit 1 00033 } else { 00034 puts $rc "set version_major \"$version_major\"" 00035 puts $rc "set version_minor \"$version_minor\"" 00036 puts $rc "set version_point \"$version_point\"" 00037 puts $rc "set version_hgid \"[string range $id 0 end-1]\"" 00038 close $rc 00039 } 00040