Testing tangled. Original: https://github.com/j6t/gitk

Compare changes

Choose any two refs to compare.

Changed files
+790 -1152
po
+777 -790
gitk
··· 7 7 # and distributed under the terms of the GNU General Public Licence, 8 8 # either version 2, or (at your option) any later version. 9 9 10 - package require Tk 10 + if {[catch {package require Tcl 8.6-} err]} { 11 + catch {wm withdraw .} 12 + tk_messageBox \ 13 + -icon error \ 14 + -type ok \ 15 + -title "gitk: fatal error" \ 16 + -message $err 17 + exit 1 18 + } 19 + 20 + set MIN_GIT_VERSION 2.20 21 + regexp {^git version ([\d.]*\d)} [exec git version] _ git_version 22 + if {[package vcompare $git_version $MIN_GIT_VERSION] < 0} { 23 + set message "The git executable found is too old. 24 + The minimum required version is $MIN_GIT_VERSION.0. 25 + The version of git found is $git_version." 26 + 27 + catch {wm withdraw .} 28 + tk_messageBox \ 29 + -icon error \ 30 + -type ok \ 31 + -title "gitk: fatal error" \ 32 + -message $message 33 + exit 1 34 + } 35 + 36 + ###################################################################### 37 + ## Enable Tcl8 profile in Tcl9, allowing consumption of data that has 38 + ## bytes not conforming to the assumed encoding profile. 39 + 40 + if {[package vcompare $::tcl_version 9.0] >= 0} { 41 + rename open _strict_open 42 + proc open args { 43 + set f [_strict_open {*}$args] 44 + chan configure $f -profile tcl8 45 + return $f 46 + } 47 + proc convertfrom args { 48 + return [encoding convertfrom -profile tcl8 {*}$args] 49 + } 50 + } else { 51 + proc convertfrom args { 52 + return [encoding convertfrom {*}$args] 53 + } 54 + } 11 55 12 56 ###################################################################### 13 57 ## ··· 113 157 114 158 # End of safe PATH lookup stuff 115 159 160 + # Wrap exec/open to sanitize arguments 161 + 162 + # unsafe arguments begin with redirections or the pipe or background operators 163 + proc is_arg_unsafe {arg} { 164 + regexp {^([<|>&]|2>)} $arg 165 + } 166 + 167 + proc make_arg_safe {arg} { 168 + if {[is_arg_unsafe $arg]} { 169 + set arg [file join . $arg] 170 + } 171 + return $arg 172 + } 173 + 174 + proc make_arglist_safe {arglist} { 175 + set res {} 176 + foreach arg $arglist { 177 + lappend res [make_arg_safe $arg] 178 + } 179 + return $res 180 + } 181 + 182 + # executes one command 183 + # no redirections or pipelines are possible 184 + # cmd is a list that specifies the command and its arguments 185 + # calls `exec` and returns its value 186 + proc safe_exec {cmd} { 187 + eval exec [make_arglist_safe $cmd] 188 + } 189 + 190 + # executes one command with redirections 191 + # no pipelines are possible 192 + # cmd is a list that specifies the command and its arguments 193 + # redir is a list that specifies redirections (output, background, constant(!) commands) 194 + # calls `exec` and returns its value 195 + proc safe_exec_redirect {cmd redir} { 196 + eval exec [make_arglist_safe $cmd] $redir 197 + } 198 + 199 + proc safe_open_file {filename flags} { 200 + # a file name starting with "|" would attempt to run a process 201 + # but such a file name must be treated as a relative path 202 + # hide the "|" behind "./" 203 + if {[string index $filename 0] eq "|"} { 204 + set filename [file join . $filename] 205 + } 206 + open $filename $flags 207 + } 208 + 209 + # opens a command pipeline for reading 210 + # cmd is a list that specifies the command and its arguments 211 + # calls `open` and returns the file id 212 + proc safe_open_command {cmd} { 213 + open |[make_arglist_safe $cmd] r 214 + } 215 + 216 + # opens a command pipeline for reading and writing 217 + # cmd is a list that specifies the command and its arguments 218 + # calls `open` and returns the file id 219 + proc safe_open_command_rw {cmd} { 220 + open |[make_arglist_safe $cmd] r+ 221 + } 222 + 223 + # opens a command pipeline for reading with redirections 224 + # cmd is a list that specifies the command and its arguments 225 + # redir is a list that specifies redirections 226 + # calls `open` and returns the file id 227 + proc safe_open_command_redirect {cmd redir} { 228 + set cmd [make_arglist_safe $cmd] 229 + open |[concat $cmd $redir] r 230 + } 231 + 232 + # opens a pipeline with several commands for reading 233 + # cmds is a list of lists, each of which specifies a command and its arguments 234 + # calls `open` and returns the file id 235 + proc safe_open_pipeline {cmds} { 236 + set cmd {} 237 + foreach subcmd $cmds { 238 + set cmd [concat $cmd | [make_arglist_safe $subcmd]] 239 + } 240 + open $cmd r 241 + } 242 + 243 + # End exec/open wrappers 244 + 116 245 proc hasworktree {} { 117 246 return [expr {[exec git rev-parse --is-bare-repository] == "false" && 118 247 [exec git rev-parse --is-inside-git-dir] == "false"}] ··· 238 367 set mlist {} 239 368 set nr_unmerged 0 240 369 if {[catch { 241 - set fd [open "| git ls-files -u" r] 370 + set fd [safe_open_command {git ls-files -u}] 242 371 } err]} { 243 372 show_error {} . "[mc "Couldn't get list of unmerged files:"] $err" 244 373 exit 1 ··· 260 389 proc parseviewargs {n arglist} { 261 390 global vdatemode vmergeonly vflags vdflags vrevs vfiltered vorigargs env 262 391 global vinlinediff 263 - global worddiff git_version 392 + global worddiff 264 393 265 394 set vdatemode($n) 0 266 395 set vmergeonly($n) 0 ··· 311 440 "--color-words*" - "--word-diff=color" { 312 441 # These trigger a word diff in the console interface, 313 442 # so help the user by enabling our own support 314 - if {[package vcompare $git_version "1.7.2"] >= 0} { 315 - set worddiff [mc "Color words"] 316 - } 443 + set worddiff [mc "Color words"] 317 444 } 318 445 "--word-diff*" { 319 - if {[package vcompare $git_version "1.7.2"] >= 0} { 320 - set worddiff [mc "Markup words"] 321 - } 446 + set worddiff [mc "Markup words"] 322 447 } 323 448 "--stat=*" - "--numstat" - "--shortstat" - "--summary" - 324 449 "--check" - "--exit-code" - "--quiet" - "--topo-order" - ··· 394 519 395 520 proc parseviewrevs {view revs} { 396 521 global vposids vnegids 522 + global hashlength 397 523 398 524 if {$revs eq {}} { 399 525 set revs HEAD 400 526 } elseif {[lsearch -exact $revs --all] >= 0} { 401 527 lappend revs HEAD 402 528 } 403 - if {[catch {set ids [eval exec git rev-parse $revs]} err]} { 529 + if {[catch {set ids [safe_exec [concat git rev-parse $revs]]} err]} { 404 530 # we get stdout followed by stderr in $err 405 531 # for an unknown rev, git rev-parse echoes it and then errors out 406 532 set errlines [split $err "\n"] 407 533 set badrev {} 408 534 for {set l 0} {$l < [llength $errlines]} {incr l} { 409 535 set line [lindex $errlines $l] 410 - if {!([string length $line] == 40 && [string is xdigit $line])} { 536 + if {!([string length $line] == $hashlength && [string is xdigit $line])} { 411 537 if {[string match "fatal:*" $line]} { 412 538 if {[string match "fatal: ambiguous argument*" $line] 413 539 && $badrev ne {}} { ··· 457 583 return $ret 458 584 } 459 585 460 - # Escapes a list of filter paths to be passed to git log via stdin. Note that 461 - # paths must not be quoted. 462 - proc escape_filter_paths {paths} { 463 - set escaped [list] 464 - foreach path $paths { 465 - lappend escaped [string map {\\ \\\\ "\ " "\\\ "} $path] 466 - } 467 - return $escaped 468 - } 469 - 470 586 # Start off a git log process and arrange to read its output 471 587 proc start_rev_list {view} { 472 588 global startmsecs commitidx viewcomplete curview ··· 476 592 global viewactive viewinstances vmergeonly 477 593 global mainheadid viewmainheadid viewmainheadid_orig 478 594 global vcanopt vflags vrevs vorigargs 479 - global show_notes 480 595 481 596 set startmsecs [clock clicks -milliseconds] 482 597 set commitidx($view) 0 ··· 488 603 set args $viewargs($view) 489 604 if {$viewargscmd($view) ne {}} { 490 605 if {[catch { 491 - set str [exec sh -c $viewargscmd($view)] 606 + set str [safe_exec [list sh -c $viewargscmd($view)]] 492 607 } err]} { 493 608 error_popup "[mc "Error executing --argscmd command:"] $err" 494 609 return 0 ··· 526 641 } 527 642 528 643 if {[catch { 529 - set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \ 530 - --parents --boundary $args --stdin \ 531 - "<<[join [concat $revs "--" \ 532 - [escape_filter_paths $files]] "\\n"]"] r] 644 + set fd [safe_open_command_redirect [concat git log --no-color -z --pretty=raw --show-notes \ 645 + --parents --boundary $args --stdin] \ 646 + [list "<<[join [concat $revs "--" $files] "\n"]"]] 533 647 } err]} { 534 648 error_popup "[mc "Error executing git log:"] $err" 535 649 return 0 ··· 563 677 set pid [pid $fd] 564 678 565 679 if {$::tcl_platform(platform) eq {windows}} { 566 - exec taskkill /pid $pid 680 + safe_exec [list taskkill /pid $pid] 567 681 } else { 568 - exec kill $pid 682 + safe_exec [list kill $pid] 569 683 } 570 684 } 571 685 catch {close $fd} ··· 623 737 global mainheadid viewmainheadid viewmainheadid_orig pending_select 624 738 global hasworktree 625 739 global varcid vposids vnegids vflags vrevs 626 - global show_notes 740 + global hashlength 627 741 628 742 set hasworktree [hasworktree] 629 743 rereadrefs ··· 657 771 # take out positive refs that we asked for before or 658 772 # that we have already seen 659 773 foreach rev $revs { 660 - if {[string length $rev] == 40} { 774 + if {[string length $rev] == $hashlength} { 661 775 if {[lsearch -exact $oldpos $rev] < 0 662 776 && ![info exists varcid($view,$rev)]} { 663 777 lappend newrevs $rev ··· 680 794 set args $vorigargs($view) 681 795 } 682 796 if {[catch { 683 - set fd [open [concat | git log --no-color -z --pretty=raw $show_notes \ 684 - --parents --boundary $args --stdin \ 685 - "<<[join [concat $revs "--" \ 686 - [escape_filter_paths \ 687 - $vfilelimit($view)]] "\\n"]"] r] 797 + set fd [safe_open_command_redirect [concat git log --no-color -z --pretty=raw --show-notes \ 798 + --parents --boundary $args --stdin] \ 799 + [list "<<[join [concat $revs "--" $vfilelimit($view)] "\n"]"]] 688 800 } err]} { 689 801 error_popup "[mc "Error executing git log:"] $err" 690 802 return ··· 1542 1654 global parents children curview hlview 1543 1655 global idpending ordertok 1544 1656 global varccommits varcid varctok vtokmod vfilelimit vshortids 1657 + global hashlength 1545 1658 1546 1659 set stuff [read $fd 500000] 1547 1660 # git log doesn't terminate the last commit with a null... ··· 1624 1737 } 1625 1738 set ok 1 1626 1739 foreach id $ids { 1627 - if {[string length $id] != 40} { 1740 + if {[string length $id] != $hashlength} { 1628 1741 set ok 0 1629 1742 break 1630 1743 } ··· 1651 1764 # and if we already know about it, using the rewritten 1652 1765 # parent as a substitute parent for $id's children. 1653 1766 if {![catch { 1654 - set rwid [exec git rev-list --first-parent --max-count=1 \ 1655 - $id -- $vfilelimit($view)] 1767 + set rwid [safe_exec [list git rev-list --first-parent --max-count=1 \ 1768 + $id -- $vfilelimit($view)]] 1656 1769 }]} { 1657 1770 if {$rwid ne {} && [info exists varcid($view,$rwid)]} { 1658 1771 # use $rwid in place of $id ··· 1772 1885 global tclencoding 1773 1886 1774 1887 # Invoke git-log to handle automatic encoding conversion 1775 - set fd [open [concat | git log --no-color --pretty=raw -1 $id] r] 1888 + set fd [safe_open_command [concat git log --no-color --pretty=raw -1 $id]] 1776 1889 # Read the results using i18n.logoutputencoding 1777 1890 fconfigure $fd -translation lf -eofchar {} 1778 1891 if {$tclencoding != {}} { ··· 1870 1983 return 1 1871 1984 } 1872 1985 1873 - # Expand an abbreviated commit ID to a list of full 40-char IDs that match 1874 - # and are present in the current view. 1986 + # Expand an abbreviated commit ID to a list of full 40-char (or 64-char 1987 + # for SHA256 repo) IDs that match and are present in the current view. 1875 1988 # This is fairly slow... 1876 1989 proc longid {prefix} { 1877 1990 global varcid curview vshortids ··· 1899 2012 } 1900 2013 1901 2014 proc readrefs {} { 1902 - global tagids idtags headids idheads tagobjid 2015 + global tagids idtags headids idheads tagobjid upstreamofref 1903 2016 global otherrefids idotherrefs mainhead mainheadid 1904 2017 global selecthead selectheadid 1905 2018 global hideremotes 1906 2019 global tclencoding 2020 + global hashlength 1907 2021 1908 - foreach v {tagids idtags headids idheads otherrefids idotherrefs} { 2022 + foreach v {tagids idtags headids idheads otherrefids idotherrefs upstreamofref} { 1909 2023 unset -nocomplain $v 1910 2024 } 1911 - set refd [open [list | git show-ref -d] r] 2025 + set refd [safe_open_command [list git show-ref -d]] 1912 2026 if {$tclencoding != {}} { 1913 2027 fconfigure $refd -encoding $tclencoding 1914 2028 } 1915 2029 while {[gets $refd line] >= 0} { 1916 - if {[string index $line 40] ne " "} continue 1917 - set id [string range $line 0 39] 1918 - set ref [string range $line 41 end] 2030 + if {[string index $line $hashlength] ne " "} continue 2031 + set id [string range $line 0 [expr {$hashlength - 1}]] 2032 + set ref [string range $line [expr {$hashlength + 1}] end] 1919 2033 if {![string match "refs/*" $ref]} continue 1920 2034 set name [string range $ref 5 end] 1921 2035 if {[string match "remotes/*" $name]} { ··· 1958 2072 set selectheadid {} 1959 2073 if {$selecthead ne {}} { 1960 2074 catch { 1961 - set selectheadid [exec git rev-parse --verify $selecthead] 2075 + set selectheadid [safe_exec [list git rev-parse --verify $selecthead]] 2076 + } 2077 + } 2078 + #load the local_branch->upstream mapping 2079 + # the result of the for-each-ref command produces: local_branch NUL upstream 2080 + set refd [safe_open_command [list git for-each-ref {--format=%(refname:short)%00%(upstream)} refs/heads/]] 2081 + while {[gets $refd local_tracking] >= 0} { 2082 + set line [split $local_tracking \0] 2083 + if {[lindex $line 1] ne {}} { 2084 + set upstream_ref [string map {"refs/" ""} [lindex $line 1]] 2085 + set upstreamofref([lindex $line 0]) $upstream_ref 1962 2086 } 1963 2087 } 2088 + catch {close $refd} 1964 2089 } 1965 2090 1966 2091 # skip over fake commits ··· 2001 2126 } 2002 2127 2003 2128 proc ttk_toplevel {w args} { 2004 - global use_ttk 2005 2129 eval [linsert $args 0 ::toplevel $w] 2006 - if {$use_ttk} { 2007 - place [ttk::frame $w._toplevel_background] -x 0 -y 0 -relwidth 1 -relheight 1 2008 - } 2130 + place [ttk::frame $w._toplevel_background] -x 0 -y 0 -relwidth 1 -relheight 1 2009 2131 return $w 2010 2132 } 2011 2133 2012 2134 proc make_transient {window origin} { 2013 - global have_tk85 2014 - 2015 - # In MacOS Tk 8.4 transient appears to work by setting 2016 - # overrideredirect, which is utterly useless, since the 2017 - # windows get no border, and are not even kept above 2018 - # the parent. 2019 - if {!$have_tk85 && [tk windowingsystem] eq {aqua}} return 2020 - 2021 2135 wm transient $window $origin 2022 2136 2023 2137 # Windows fails to place transient windows normally, so ··· 2028 2142 } 2029 2143 2030 2144 proc show_error {w top msg} { 2031 - global NS 2032 - if {![info exists NS]} {set NS ""} 2033 2145 if {[wm state $top] eq "withdrawn"} { wm deiconify $top } 2034 2146 message $w.m -text $msg -justify center -aspect 400 2035 2147 pack $w.m -side top -fill x -padx 20 -pady 20 2036 - ${NS}::button $w.ok -default active -text [mc OK] -command "destroy $top" 2148 + ttk::button $w.ok -default active -text [mc OK] -command "destroy $top" 2037 2149 pack $w.ok -side bottom -fill x 2038 2150 bind $top <Visibility> "grab $top; focus $top" 2039 2151 bind $top <Key-Return> "destroy $top" ··· 2055 2167 } 2056 2168 2057 2169 proc confirm_popup {msg {owner .}} { 2058 - global confirm_ok NS 2170 + global confirm_ok 2059 2171 set confirm_ok 0 2060 2172 set w .confirm 2061 2173 ttk_toplevel $w 2062 2174 make_transient $w $owner 2063 2175 message $w.m -text $msg -justify center -aspect 400 2064 2176 pack $w.m -side top -fill x -padx 20 -pady 20 2065 - ${NS}::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w" 2177 + ttk::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w" 2066 2178 pack $w.ok -side left -fill x 2067 - ${NS}::button $w.cancel -text [mc Cancel] -command "destroy $w" 2179 + ttk::button $w.cancel -text [mc Cancel] -command "destroy $w" 2068 2180 pack $w.cancel -side right -fill x 2069 2181 bind $w <Visibility> "grab $w; focus $w" 2070 2182 bind $w <Key-Return> "set confirm_ok 1; destroy $w" ··· 2080 2192 } 2081 2193 2082 2194 proc setoptions {} { 2083 - global use_ttk 2084 - 2085 2195 if {[tk windowingsystem] ne "win32"} { 2086 2196 option add *Panedwindow.showHandle 1 startupFile 2087 2197 option add *Panedwindow.sashRelief raised startupFile ··· 2174 2284 $w selection clear 2175 2285 } 2176 2286 proc makedroplist {w varname args} { 2177 - global use_ttk 2178 - if {$use_ttk} { 2179 - set width 0 2180 - foreach label $args { 2181 - set cx [string length $label] 2182 - if {$cx > $width} {set width $cx} 2183 - } 2184 - set gm [ttk::combobox $w -width $width -state readonly\ 2185 - -textvariable $varname -values $args \ 2186 - -exportselection false] 2187 - bind $gm <<ComboboxSelected>> [list $gm selection clear] 2188 - } else { 2189 - set gm [eval [linsert $args 0 tk_optionMenu $w $varname]] 2287 + set width 0 2288 + foreach label $args { 2289 + set cx [string length $label] 2290 + if {$cx > $width} {set width $cx} 2190 2291 } 2292 + set gm [ttk::combobox $w -width $width -state readonly\ 2293 + -textvariable $varname -values $args \ 2294 + -exportselection false] 2295 + bind $gm <<ComboboxSelected>> [list $gm selection clear] 2191 2296 return $gm 2192 2297 } 2193 2298 2299 + proc scrollval {D {koff 0}} { 2300 + global kscroll scroll_D0 2301 + return [expr int(-($D / $scroll_D0) * max(1, $kscroll-$koff))] 2302 + } 2303 + 2304 + proc bind_mousewheel {} { 2305 + global canv cflist ctext 2306 + bindall <MouseWheel> {allcanvs yview scroll [scrollval %D] units} 2307 + bindall <Shift-MouseWheel> break 2308 + bind $ctext <MouseWheel> {$ctext yview scroll [scrollval %D 2] units} 2309 + bind $ctext <Shift-MouseWheel> {$ctext xview scroll [scrollval %D 2] units} 2310 + bind $cflist <MouseWheel> {$cflist yview scroll [scrollval %D 2] units} 2311 + bind $cflist <Shift-MouseWheel> break 2312 + bind $canv <Shift-MouseWheel> {$canv xview scroll [scrollval %D] units} 2313 + 2314 + if {[package vcompare $::tcl_version 8.7] >= 0} { 2315 + bindall <Alt-MouseWheel> {allcanvs yview scroll [scrollval 5*%D] units} 2316 + bindall <Alt-Shift-MouseWheel> break 2317 + bind $ctext <Alt-MouseWheel> {$ctext yview scroll [scrollval 5*%D 2] units} 2318 + bind $ctext <Alt-Shift-MouseWheel> {$ctext xview scroll [scrollval 5*%D 2] units} 2319 + bind $cflist <Alt-MouseWheel> {$cflist yview scroll [scrollval 5*%D 2] units} 2320 + bind $cflist <Alt-Shift-MouseWheel> break 2321 + bind $canv <Alt-Shift-MouseWheel> {$canv xview scroll [scrollval 5*%D] units} 2322 + } 2323 + } 2324 + 2325 + proc bind_mousewheel_buttons {} { 2326 + global canv cflist ctext 2327 + bindall <ButtonRelease-4> {allcanvs yview scroll [scrollval 1] units} 2328 + bindall <ButtonRelease-5> {allcanvs yview scroll [scrollval -1] units} 2329 + bindall <Shift-ButtonRelease-4> break 2330 + bindall <Shift-ButtonRelease-5> break 2331 + bind $ctext <ButtonRelease-4> {$ctext yview scroll [scrollval 1 2] units} 2332 + bind $ctext <ButtonRelease-5> {$ctext yview scroll [scrollval -1 2] units} 2333 + bind $ctext <Shift-ButtonRelease-4> {$ctext xview scroll [scrollval 1 2] units} 2334 + bind $ctext <Shift-ButtonRelease-5> {$ctext xview scroll [scrollval -1 2] units} 2335 + bind $cflist <ButtonRelease-4> {$cflist yview scroll [scrollval 1 2] units} 2336 + bind $cflist <ButtonRelease-5> {$cflist yview scroll [scrollval -1 2] units} 2337 + bind $cflist <Shift-ButtonRelease-4> break 2338 + bind $cflist <Shift-ButtonRelease-5> break 2339 + bind $canv <Shift-ButtonRelease-4> {$canv xview scroll [scrollval 1] units} 2340 + bind $canv <Shift-ButtonRelease-5> {$canv xview scroll [scrollval -1] units} 2341 + } 2342 + 2194 2343 proc makewindow {} { 2195 2344 global canv canv2 canv3 linespc charspc ctext cflist cscroll 2196 2345 global tabstop ··· 2209 2358 global headctxmenu progresscanv progressitem progresscoords statusw 2210 2359 global fprogitem fprogcoord lastprogupdate progupdatepending 2211 2360 global rprogitem rprogcoord rownumsel numcommits 2212 - global have_tk85 have_tk86 use_ttk NS 2213 - global git_version 2214 2361 global worddiff 2362 + global hashlength scroll_D0 2215 2363 2216 2364 # The "mc" arguments here are purely so that xgettext 2217 2365 # sees the following string as needing to be translated ··· 2222 2370 {mc "Reread re&ferences" command rereadrefs} 2223 2371 {mc "&List references" command showrefs -accelerator F2} 2224 2372 {xx "" separator} 2225 - {mc "Start git &gui" command {exec git gui &}} 2373 + {mc "Start git &gui" command {safe_exec_redirect [list git gui] [list &]}} 2226 2374 {xx "" separator} 2227 2375 {mc "&Quit" command doquit -accelerator Meta1-Q} 2228 2376 }} ··· 2263 2411 makemenu .bar $bar 2264 2412 . configure -menu .bar 2265 2413 2266 - if {$use_ttk} { 2267 - # cover the non-themed toplevel with a themed frame. 2268 - place [ttk::frame ._main_background] -x 0 -y 0 -relwidth 1 -relheight 1 2269 - } 2414 + # cover the non-themed toplevel with a themed frame. 2415 + place [ttk::frame ._main_background] -x 0 -y 0 -relwidth 1 -relheight 1 2270 2416 2271 2417 # the gui has upper and lower half, parts of a paned window. 2272 - ${NS}::panedwindow .ctop -orient vertical 2418 + ttk::panedwindow .ctop -orient vertical 2273 2419 2274 2420 # possibly use assumed geometry 2275 2421 if {![info exists geometry(pwsash0)]} { ··· 2282 2428 } 2283 2429 2284 2430 # the upper half will have a paned window, a scroll bar to the right, and some stuff below 2285 - ${NS}::frame .tf -height $geometry(topheight) -width $geometry(topwidth) 2286 - ${NS}::frame .tf.histframe 2287 - ${NS}::panedwindow .tf.histframe.pwclist -orient horizontal 2288 - if {!$use_ttk} { 2289 - .tf.histframe.pwclist configure -sashpad 0 -handlesize 4 2290 - } 2431 + ttk::frame .tf -height $geometry(topheight) -width $geometry(topwidth) 2432 + ttk::frame .tf.histframe 2433 + ttk::panedwindow .tf.histframe.pwclist -orient horizontal 2291 2434 2292 2435 # create three canvases 2293 2436 set cscroll .tf.histframe.csb ··· 2295 2438 canvas $canv \ 2296 2439 -selectbackground $selectbgcolor \ 2297 2440 -background $bgcolor -bd 0 \ 2441 + -xscrollincr $linespc \ 2298 2442 -yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll" 2299 2443 .tf.histframe.pwclist add $canv 2300 2444 set canv2 .tf.histframe.pwclist.canv2 ··· 2307 2451 -selectbackground $selectbgcolor \ 2308 2452 -background $bgcolor -bd 0 -yscrollincr $linespc 2309 2453 .tf.histframe.pwclist add $canv3 2310 - if {$use_ttk} { 2311 - bind .tf.histframe.pwclist <Map> { 2312 - bind %W <Map> {} 2313 - .tf.histframe.pwclist sashpos 1 [lindex $::geometry(pwsash1) 0] 2314 - .tf.histframe.pwclist sashpos 0 [lindex $::geometry(pwsash0) 0] 2315 - } 2316 - } else { 2317 - eval .tf.histframe.pwclist sash place 0 $geometry(pwsash0) 2318 - eval .tf.histframe.pwclist sash place 1 $geometry(pwsash1) 2454 + bind .tf.histframe.pwclist <Map> { 2455 + bind %W <Map> {} 2456 + .tf.histframe.pwclist sashpos 1 [lindex $::geometry(pwsash1) 0] 2457 + .tf.histframe.pwclist sashpos 0 [lindex $::geometry(pwsash0) 0] 2319 2458 } 2320 2459 2321 2460 # a scroll bar to rule them 2322 - ${NS}::scrollbar $cscroll -command {allcanvs yview} 2323 - if {!$use_ttk} {$cscroll configure -highlightthickness 0} 2461 + ttk::scrollbar $cscroll -command {allcanvs yview} 2324 2462 pack $cscroll -side right -fill y 2325 2463 bind .tf.histframe.pwclist <Configure> {resizeclistpanes %W %w} 2326 2464 lappend bglist $canv $canv2 $canv3 2327 2465 pack .tf.histframe.pwclist -fill both -expand 1 -side left 2328 2466 2329 2467 # we have two button bars at bottom of top frame. Bar 1 2330 - ${NS}::frame .tf.bar 2331 - ${NS}::frame .tf.lbar -height 15 2468 + ttk::frame .tf.bar 2469 + ttk::frame .tf.lbar -height 15 2332 2470 2333 2471 set sha1entry .tf.bar.sha1 2334 2472 set entries $sha1entry ··· 2337 2475 -command gotocommit -width 8 2338 2476 $sha1but conf -disabledforeground [$sha1but cget -foreground] 2339 2477 pack .tf.bar.sha1label -side left 2340 - ${NS}::entry $sha1entry -width 40 -font textfont -textvariable sha1string 2478 + ttk::entry $sha1entry -width $hashlength -font textfont -textvariable sha1string 2341 2479 trace add variable sha1string write sha1change 2342 2480 pack $sha1entry -side left -pady 2 2343 2481 ··· 2362 2500 image create bitmap bm-right -data $bm_right_data -foreground $uifgcolor 2363 2501 image create bitmap bm-right-gray -data $bm_right_data -foreground $uifgdisabledcolor 2364 2502 2365 - ${NS}::button .tf.bar.leftbut -command goback -state disabled -width 26 2366 - if {$use_ttk} { 2367 - .tf.bar.leftbut configure -image [list bm-left disabled bm-left-gray] 2368 - } else { 2369 - .tf.bar.leftbut configure -image bm-left 2370 - } 2503 + ttk::button .tf.bar.leftbut -command goback -state disabled -width 26 2504 + .tf.bar.leftbut configure -image [list bm-left disabled bm-left-gray] 2371 2505 pack .tf.bar.leftbut -side left -fill y 2372 - ${NS}::button .tf.bar.rightbut -command goforw -state disabled -width 26 2373 - if {$use_ttk} { 2374 - .tf.bar.rightbut configure -image [list bm-right disabled bm-right-gray] 2375 - } else { 2376 - .tf.bar.rightbut configure -image bm-right 2377 - } 2506 + ttk::button .tf.bar.rightbut -command goforw -state disabled -width 26 2507 + .tf.bar.rightbut configure -image [list bm-right disabled bm-right-gray] 2378 2508 pack .tf.bar.rightbut -side left -fill y 2379 2509 2380 - ${NS}::label .tf.bar.rowlabel -text [mc "Row"] 2510 + ttk::label .tf.bar.rowlabel -text [mc "Row"] 2381 2511 set rownumsel {} 2382 - ${NS}::label .tf.bar.rownum -width 7 -textvariable rownumsel \ 2512 + ttk::label .tf.bar.rownum -width 7 -textvariable rownumsel \ 2383 2513 -relief sunken -anchor e 2384 - ${NS}::label .tf.bar.rowlabel2 -text "/" 2385 - ${NS}::label .tf.bar.numcommits -width 7 -textvariable numcommits \ 2514 + ttk::label .tf.bar.rowlabel2 -text "/" 2515 + ttk::label .tf.bar.numcommits -width 7 -textvariable numcommits \ 2386 2516 -relief sunken -anchor e 2387 2517 pack .tf.bar.rowlabel .tf.bar.rownum .tf.bar.rowlabel2 .tf.bar.numcommits \ 2388 2518 -side left 2389 - if {!$use_ttk} { 2390 - foreach w {rownum numcommits} {.tf.bar.$w configure -font textfont} 2391 - } 2392 2519 global selectedline 2393 2520 trace add variable selectedline write selectedline_change 2394 2521 2395 2522 # Status label and progress bar 2396 2523 set statusw .tf.bar.status 2397 - ${NS}::label $statusw -width 15 -relief sunken 2524 + ttk::label $statusw -width 15 -relief sunken 2398 2525 pack $statusw -side left -padx 5 2399 - if {$use_ttk} { 2400 - set progresscanv [ttk::progressbar .tf.bar.progress] 2401 - } else { 2402 - set h [expr {[font metrics uifont -linespace] + 2}] 2403 - set progresscanv .tf.bar.progress 2404 - canvas $progresscanv -relief sunken -height $h -borderwidth 2 2405 - set progressitem [$progresscanv create rect -1 0 0 $h -fill "#00ff00"] 2406 - set fprogitem [$progresscanv create rect -1 0 0 $h -fill yellow] 2407 - set rprogitem [$progresscanv create rect -1 0 0 $h -fill red] 2408 - } 2526 + set progresscanv [ttk::progressbar .tf.bar.progress] 2409 2527 pack $progresscanv -side right -expand 1 -fill x -padx {0 2} 2410 2528 set progresscoords {0 0} 2411 2529 set fprogcoord 0 ··· 2415 2533 set progupdatepending 0 2416 2534 2417 2535 # build up the bottom bar of upper window 2418 - ${NS}::label .tf.lbar.flabel -text "[mc "Find"] " 2536 + ttk::label .tf.lbar.flabel -text "[mc "Find"] " 2419 2537 2420 2538 set bm_down_data { 2421 2539 #define down_width 16 ··· 2427 2545 0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01}; 2428 2546 } 2429 2547 image create bitmap bm-down -data $bm_down_data -foreground $uifgcolor 2430 - ${NS}::button .tf.lbar.fnext -width 26 -command {dofind 1 1} 2548 + ttk::button .tf.lbar.fnext -width 26 -command {dofind 1 1} 2431 2549 .tf.lbar.fnext configure -image bm-down 2432 2550 2433 2551 set bm_up_data { ··· 2440 2558 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01}; 2441 2559 } 2442 2560 image create bitmap bm-up -data $bm_up_data -foreground $uifgcolor 2443 - ${NS}::button .tf.lbar.fprev -width 26 -command {dofind -1 1} 2561 + ttk::button .tf.lbar.fprev -width 26 -command {dofind -1 1} 2444 2562 .tf.lbar.fprev configure -image bm-up 2445 2563 2446 - ${NS}::label .tf.lbar.flab2 -text " [mc "commit"] " 2564 + ttk::label .tf.lbar.flab2 -text " [mc "commit"] " 2447 2565 2448 2566 pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \ 2449 2567 -side left -fill y ··· 2459 2577 set findstring {} 2460 2578 set fstring .tf.lbar.findstring 2461 2579 lappend entries $fstring 2462 - ${NS}::entry $fstring -width 30 -textvariable findstring 2580 + ttk::entry $fstring -width 30 -textvariable findstring 2463 2581 trace add variable findstring write find_change 2464 2582 set findtype [mc "Exact"] 2465 2583 set findtypemenu [makedroplist .tf.lbar.findtype \ ··· 2478 2596 pack .tf.bar -in .tf -side bottom -fill x 2479 2597 pack .tf.histframe -fill both -side top -expand 1 2480 2598 .ctop add .tf 2481 - if {!$use_ttk} { 2482 - .ctop paneconfigure .tf -height $geometry(topheight) 2483 - .ctop paneconfigure .tf -width $geometry(topwidth) 2484 - } 2485 2599 2486 2600 # now build up the bottom 2487 - ${NS}::panedwindow .pwbottom -orient horizontal 2601 + ttk::panedwindow .pwbottom -orient horizontal 2488 2602 2489 2603 # lower left, a text box over search bar, scroll bar to the right 2490 2604 # if we know window height, then that will set the lower text height, otherwise 2491 2605 # we set lower text height which will drive window height 2492 2606 if {[info exists geometry(main)]} { 2493 - ${NS}::frame .bleft -width $geometry(botwidth) 2607 + ttk::frame .bleft -width $geometry(botwidth) 2494 2608 } else { 2495 - ${NS}::frame .bleft -width $geometry(botwidth) -height $geometry(botheight) 2609 + ttk::frame .bleft -width $geometry(botwidth) -height $geometry(botheight) 2496 2610 } 2497 - ${NS}::frame .bleft.top 2498 - ${NS}::frame .bleft.mid 2499 - ${NS}::frame .bleft.bottom 2611 + ttk::frame .bleft.top 2612 + ttk::frame .bleft.mid 2613 + ttk::frame .bleft.bottom 2500 2614 2501 2615 # gap between sub-widgets 2502 2616 set wgap [font measure uifont "i"] 2503 2617 2504 - ${NS}::button .bleft.top.search -text [mc "Search"] -command dosearch 2618 + ttk::button .bleft.top.search -text [mc "Search"] -command dosearch 2505 2619 pack .bleft.top.search -side left -padx 5 2506 2620 set sstring .bleft.top.sstring 2507 2621 set searchstring "" 2508 - ${NS}::entry $sstring -width 20 -textvariable searchstring 2622 + ttk::entry $sstring -width 20 -textvariable searchstring 2509 2623 lappend entries $sstring 2510 2624 trace add variable searchstring write incrsearch 2511 2625 pack $sstring -side left -expand 1 -fill x 2512 - ${NS}::radiobutton .bleft.mid.diff -text [mc "Diff"] \ 2626 + ttk::radiobutton .bleft.mid.diff -text [mc "Diff"] \ 2513 2627 -command changediffdisp -variable diffelide -value {0 0} 2514 - ${NS}::radiobutton .bleft.mid.old -text [mc "Old version"] \ 2628 + ttk::radiobutton .bleft.mid.old -text [mc "Old version"] \ 2515 2629 -command changediffdisp -variable diffelide -value {0 1} 2516 - ${NS}::radiobutton .bleft.mid.new -text [mc "New version"] \ 2630 + ttk::radiobutton .bleft.mid.new -text [mc "New version"] \ 2517 2631 -command changediffdisp -variable diffelide -value {1 0} 2518 2632 2519 - ${NS}::label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: " 2633 + ttk::label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: " 2520 2634 pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left -ipadx $wgap 2521 2635 spinbox .bleft.mid.diffcontext -width 5 \ 2522 2636 -from 0 -increment 1 -to 10000000 \ ··· 2526 2640 trace add variable diffcontextstring write diffcontextchange 2527 2641 lappend entries .bleft.mid.diffcontext 2528 2642 pack .bleft.mid.labeldiffcontext .bleft.mid.diffcontext -side left -ipadx $wgap 2529 - ${NS}::checkbutton .bleft.mid.ignspace -text [mc "Ignore space change"] \ 2643 + ttk::checkbutton .bleft.mid.ignspace -text [mc "Ignore space change"] \ 2530 2644 -command changeignorespace -variable ignorespace 2531 2645 pack .bleft.mid.ignspace -side left -padx 5 2532 2646 2533 2647 set worddiff [mc "Line diff"] 2534 - if {[package vcompare $git_version "1.7.2"] >= 0} { 2535 - makedroplist .bleft.mid.worddiff worddiff [mc "Line diff"] \ 2536 - [mc "Markup words"] [mc "Color words"] 2537 - trace add variable worddiff write changeworddiff 2538 - pack .bleft.mid.worddiff -side left -padx 5 2539 - } 2648 + makedroplist .bleft.mid.worddiff worddiff [mc "Line diff"] \ 2649 + [mc "Markup words"] [mc "Color words"] 2650 + trace add variable worddiff write changeworddiff 2651 + pack .bleft.mid.worddiff -side left -padx 5 2540 2652 2541 2653 set ctext .bleft.bottom.ctext 2542 2654 text $ctext -background $bgcolor -foreground $fgcolor \ 2543 2655 -state disabled -undo 0 -font textfont \ 2544 2656 -yscrollcommand scrolltext -wrap $wrapdefault \ 2545 2657 -xscrollcommand ".bleft.bottom.sbhorizontal set" 2546 - if {$have_tk85} { 2547 - $ctext conf -tabstyle wordprocessor 2548 - } 2549 - ${NS}::scrollbar .bleft.bottom.sb -command "$ctext yview" 2550 - ${NS}::scrollbar .bleft.bottom.sbhorizontal -command "$ctext xview" -orient h 2658 + $ctext conf -tabstyle wordprocessor 2659 + ttk::scrollbar .bleft.bottom.sb -command "$ctext yview" 2660 + ttk::scrollbar .bleft.bottom.sbhorizontal -command "$ctext xview" -orient h 2551 2661 pack .bleft.top -side top -fill x 2552 2662 pack .bleft.mid -side top -fill x 2553 2663 grid $ctext .bleft.bottom.sb -sticky nsew ··· 2598 2708 $ctext tag lower d0 2599 2709 2600 2710 .pwbottom add .bleft 2601 - if {!$use_ttk} { 2602 - .pwbottom paneconfigure .bleft -width $geometry(botwidth) 2603 - } 2604 2711 2605 2712 # lower right 2606 - ${NS}::frame .bright 2607 - ${NS}::frame .bright.mode 2608 - ${NS}::radiobutton .bright.mode.patch -text [mc "Patch"] \ 2713 + ttk::frame .bright 2714 + ttk::frame .bright.mode 2715 + ttk::radiobutton .bright.mode.patch -text [mc "Patch"] \ 2609 2716 -command reselectline -variable cmitmode -value "patch" 2610 - ${NS}::radiobutton .bright.mode.tree -text [mc "Tree"] \ 2717 + ttk::radiobutton .bright.mode.tree -text [mc "Tree"] \ 2611 2718 -command reselectline -variable cmitmode -value "tree" 2612 2719 grid .bright.mode.patch .bright.mode.tree -sticky ew 2613 2720 pack .bright.mode -side top -fill x ··· 2623 2730 -spacing1 1 -spacing3 1 2624 2731 lappend bglist $cflist 2625 2732 lappend fglist $cflist 2626 - ${NS}::scrollbar .bright.sb -command "$cflist yview" 2733 + ttk::scrollbar .bright.sb -command "$cflist yview" 2627 2734 pack .bright.sb -side right -fill y 2628 2735 pack $cflist -side left -fill both -expand 1 2629 2736 $cflist tag configure highlight \ ··· 2658 2765 set ::BM "2" 2659 2766 } 2660 2767 2661 - if {$use_ttk} { 2662 - bind .ctop <Map> { 2663 - bind %W <Map> {} 2664 - %W sashpos 0 $::geometry(topheight) 2665 - } 2666 - bind .pwbottom <Map> { 2667 - bind %W <Map> {} 2668 - %W sashpos 0 $::geometry(botwidth) 2669 - } 2670 - bind .pwbottom <Configure> {resizecdetpanes %W %w} 2768 + bind .ctop <Map> { 2769 + bind %W <Map> {} 2770 + %W sashpos 0 $::geometry(topheight) 2771 + } 2772 + bind .pwbottom <Map> { 2773 + bind %W <Map> {} 2774 + %W sashpos 0 $::geometry(botwidth) 2671 2775 } 2776 + bind .pwbottom <Configure> {resizecdetpanes %W %w} 2672 2777 2673 2778 pack .ctop -fill both -expand 1 2674 2779 bindall <1> {selcanvline %W %x %y} 2675 - #bindall <B1-Motion> {selcanvline %W %x %y} 2676 - if {[tk windowingsystem] == "win32"} { 2677 - bind . <MouseWheel> { windows_mousewheel_redirector %W %X %Y %D } 2678 - bind $ctext <MouseWheel> { windows_mousewheel_redirector %W %X %Y %D ; break } 2780 + 2781 + #Mouse / touchpad scrolling 2782 + if {[tk windowingsystem] == "win32" || [package vcompare $::tcl_version 8.7] >= 0} { 2783 + set scroll_D0 120 2784 + bind_mousewheel 2785 + } elseif {[tk windowingsystem] == "x11"} { 2786 + set scroll_D0 1 2787 + bind_mousewheel_buttons 2788 + } elseif {[tk windowingsystem] == "aqua"} { 2789 + set scroll_D0 1 2790 + bind_mousewheel 2679 2791 } else { 2680 - bindall <ButtonRelease-4> "allcanvs yview scroll -5 units" 2681 - bindall <ButtonRelease-5> "allcanvs yview scroll 5 units" 2682 - bind $ctext <Button> { 2683 - if {"%b" eq 6} { 2684 - $ctext xview scroll -5 units 2685 - } elseif {"%b" eq 7} { 2686 - $ctext xview scroll 5 units 2687 - } 2688 - } 2689 - if {[tk windowingsystem] eq "aqua"} { 2690 - bindall <MouseWheel> { 2691 - set delta [expr {- (%D)}] 2692 - allcanvs yview scroll $delta units 2693 - } 2694 - bindall <Shift-MouseWheel> { 2695 - set delta [expr {- (%D)}] 2696 - $canv xview scroll $delta units 2697 - } 2698 - } 2792 + puts stderr [mc "Unknown windowing system, cannot bind mouse"] 2699 2793 } 2700 2794 bindall <$::BM> "canvscan mark %W %x %y" 2701 2795 bindall <B$::BM-Motion> "canvscan dragto %W %x %y" ··· 2707 2801 bind . <Key-Down> "selnextline 1" 2708 2802 bind . <Shift-Key-Up> "dofind -1 0" 2709 2803 bind . <Shift-Key-Down> "dofind 1 0" 2710 - if {$have_tk86} { 2711 - bindkey <<NextChar>> "goforw" 2712 - bindkey <<PrevChar>> "goback" 2713 - } else { 2714 - bindkey <Key-Right> "goforw" 2715 - bindkey <Key-Left> "goback" 2716 - } 2804 + bindkey <<NextChar>> "goforw" 2805 + bindkey <<PrevChar>> "goback" 2717 2806 bind . <Key-Prior> "selnextpage -1" 2718 2807 bind . <Key-Next> "selnextpage 1" 2719 2808 bind . <$M1B-Home> "allcanvs yview moveto 0.0" ··· 2840 2929 $diff_menu configure -tearoff 0 2841 2930 } 2842 2931 2843 - # Windows sends all mouse wheel events to the current focused window, not 2844 - # the one where the mouse hovers, so bind those events here and redirect 2845 - # to the correct window 2846 - proc windows_mousewheel_redirector {W X Y D} { 2847 - global canv canv2 canv3 2848 - set w [winfo containing -displayof $W $X $Y] 2849 - if {$w ne ""} { 2850 - set u [expr {$D < 0 ? 5 : -5}] 2851 - if {$w == $canv || $w == $canv2 || $w == $canv3} { 2852 - allcanvs yview scroll $u units 2853 - } else { 2854 - catch { 2855 - $w yview scroll $u units 2856 - } 2857 - } 2858 - } 2859 - } 2860 - 2861 2932 # Update row number label when selectedline changes 2862 2933 proc selectedline_change {n1 n2 op} { 2863 2934 global selectedline rownumsel ··· 2920 2991 2921 2992 # Adjust the progress bar for a change in requested extent or canvas size 2922 2993 proc adjustprogress {} { 2923 - global progresscanv progressitem progresscoords 2924 - global fprogitem fprogcoord lastprogupdate progupdatepending 2925 - global rprogitem rprogcoord use_ttk 2994 + global progresscanv 2995 + global fprogcoord 2926 2996 2927 - if {$use_ttk} { 2928 - $progresscanv configure -value [expr {int($fprogcoord * 100)}] 2929 - return 2930 - } 2931 - 2932 - set w [expr {[winfo width $progresscanv] - 4}] 2933 - set x0 [expr {$w * [lindex $progresscoords 0]}] 2934 - set x1 [expr {$w * [lindex $progresscoords 1]}] 2935 - set h [winfo height $progresscanv] 2936 - $progresscanv coords $progressitem $x0 0 $x1 $h 2937 - $progresscanv coords $fprogitem 0 0 [expr {$w * $fprogcoord}] $h 2938 - $progresscanv coords $rprogitem 0 0 [expr {$w * $rprogcoord}] $h 2939 - set now [clock clicks -milliseconds] 2940 - if {$now >= $lastprogupdate + 100} { 2941 - set progupdatepending 0 2942 - update 2943 - } elseif {!$progupdatepending} { 2944 - set progupdatepending 1 2945 - after [expr {$lastprogupdate + 100 - $now}] doprogupdate 2946 - } 2997 + $progresscanv configure -value [expr {int($fprogcoord * 100)}] 2947 2998 } 2948 2999 2949 3000 proc doprogupdate {} { ··· 3002 3053 upvar #0 viewargscmd current_viewargscmd 3003 3054 upvar #0 viewperm current_viewperm 3004 3055 upvar #0 nextviewnum current_nextviewnum 3005 - upvar #0 use_ttk current_use_ttk 3006 3056 3007 3057 if {$stuffsaved} return 3008 3058 if {![winfo viewable .]} return 3009 3059 set remove_tmp 0 3010 3060 if {[catch { 3011 3061 set try_count 0 3012 - while {[catch {set f [open $config_file_tmp {WRONLY CREAT EXCL}]}]} { 3062 + while {[catch {set f [safe_open_file $config_file_tmp {WRONLY CREAT EXCL}]}]} { 3013 3063 if {[incr try_count] > 50} { 3014 3064 error "Unable to write config file: $config_file_tmp exists" 3015 3065 } ··· 3036 3086 puts $f "set geometry(state) [wm state .]" 3037 3087 puts $f "set geometry(topwidth) [winfo width .tf]" 3038 3088 puts $f "set geometry(topheight) [winfo height .tf]" 3039 - if {$current_use_ttk} { 3040 - puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sashpos 0] 1\"" 3041 - puts $f "set geometry(pwsash1) \"[.tf.histframe.pwclist sashpos 1] 1\"" 3042 - } else { 3043 - puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sash coord 0]\"" 3044 - puts $f "set geometry(pwsash1) \"[.tf.histframe.pwclist sash coord 1]\"" 3045 - } 3089 + puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sashpos 0] 1\"" 3090 + puts $f "set geometry(pwsash1) \"[.tf.histframe.pwclist sashpos 1] 1\"" 3046 3091 puts $f "set geometry(botwidth) [winfo width .bleft]" 3047 3092 puts $f "set geometry(botheight) [winfo height .bleft]" 3048 3093 ··· 3088 3133 } 3089 3134 3090 3135 proc resizeclistpanes {win w} { 3091 - global oldwidth oldsash use_ttk 3136 + global oldwidth oldsash 3092 3137 if {[info exists oldwidth($win)]} { 3093 3138 if {[info exists oldsash($win)]} { 3094 3139 set s0 [lindex $oldsash($win) 0] 3095 3140 set s1 [lindex $oldsash($win) 1] 3096 - } elseif {$use_ttk} { 3141 + } else { 3097 3142 set s0 [$win sashpos 0] 3098 3143 set s1 [$win sashpos 1] 3099 - } else { 3100 - set s0 [$win sash coord 0] 3101 - set s1 [$win sash coord 1] 3102 3144 } 3103 3145 if {$w < 60} { 3104 3146 set sash0 [expr {int($w/2 - 2)}] ··· 3120 3162 } 3121 3163 } 3122 3164 } 3123 - if {$use_ttk} { 3124 - $win sashpos 0 $sash0 3125 - $win sashpos 1 $sash1 3126 - } else { 3127 - $win sash place 0 $sash0 [lindex $s0 1] 3128 - $win sash place 1 $sash1 [lindex $s1 1] 3129 - set sash0 [list $sash0 [lindex $s0 1]] 3130 - set sash1 [list $sash1 [lindex $s1 1]] 3131 - } 3165 + $win sashpos 0 $sash0 3166 + $win sashpos 1 $sash1 3132 3167 set oldsash($win) [list $sash0 $sash1] 3133 3168 } 3134 3169 set oldwidth($win) $w 3135 3170 } 3136 3171 3137 3172 proc resizecdetpanes {win w} { 3138 - global oldwidth oldsash use_ttk 3173 + global oldwidth oldsash 3139 3174 if {[info exists oldwidth($win)]} { 3140 3175 if {[info exists oldsash($win)]} { 3141 3176 set s0 $oldsash($win) 3142 - } elseif {$use_ttk} { 3143 - set s0 [$win sashpos 0] 3144 3177 } else { 3145 - set s0 [$win sash coord 0] 3178 + set s0 [$win sashpos 0] 3146 3179 } 3147 3180 if {$w < 60} { 3148 3181 set sash0 [expr {int($w*3/4 - 2)}] ··· 3156 3189 set sash0 [expr {$w - 15}] 3157 3190 } 3158 3191 } 3159 - if {$use_ttk} { 3160 - $win sashpos 0 $sash0 3161 - } else { 3162 - $win sash place 0 $sash0 [lindex $s0 1] 3163 - set sash0 [list $sash0 [lindex $s0 1]] 3164 - } 3192 + $win sashpos 0 $sash0 3165 3193 set oldsash($win) $sash0 3166 3194 } 3167 3195 set oldwidth($win) $w ··· 3182 3210 } 3183 3211 3184 3212 proc about {} { 3185 - global bgcolor NS 3213 + global bgcolor 3186 3214 set w .about 3187 3215 if {[winfo exists $w]} { 3188 3216 raise $w ··· 3199 3227 Use and redistribute under the terms of the GNU General Public License"] \ 3200 3228 -justify center -aspect 400 -border 2 -bg $bgcolor -relief groove 3201 3229 pack $w.m -side top -fill x -padx 2 -pady 2 3202 - ${NS}::button $w.ok -text [mc "Close"] -command "destroy $w" -default active 3230 + ttk::button $w.ok -text [mc "Close"] -command "destroy $w" -default active 3203 3231 pack $w.ok -side bottom 3204 3232 bind $w <Visibility> "focus $w.ok" 3205 3233 bind $w <Key-Escape> "destroy $w" ··· 3208 3236 } 3209 3237 3210 3238 proc keys {} { 3211 - global bgcolor NS 3239 + global bgcolor 3212 3240 set w .keys 3213 3241 if {[winfo exists $w]} { 3214 3242 raise $w ··· 3266 3294 " \ 3267 3295 -justify left -bg $bgcolor -border 2 -relief groove 3268 3296 pack $w.m -side top -fill both -padx 2 -pady 2 3269 - ${NS}::button $w.ok -text [mc "Close"] -command "destroy $w" -default active 3297 + ttk::button $w.ok -text [mc "Close"] -command "destroy $w" -default active 3270 3298 bind $w <Key-Escape> [list destroy $w] 3271 3299 pack $w.ok -side bottom 3272 3300 bind $w <Visibility> "focus $w.ok" ··· 3725 3753 set tmpdir $gitdir 3726 3754 } 3727 3755 set gitktmpformat [file join $tmpdir ".gitk-tmp.XXXXXX"] 3728 - if {[catch {set gitktmpdir [exec mktemp -d $gitktmpformat]}]} { 3756 + if {[catch {set gitktmpdir [safe_exec [list mktemp -d $gitktmpformat]]}]} { 3729 3757 set gitktmpdir [file join $gitdir [format ".gitk-tmp.%s" [pid]]] 3730 3758 } 3731 3759 if {[catch {file mkdir $gitktmpdir} err]} { ··· 3747 3775 proc save_file_from_commit {filename output what} { 3748 3776 global nullfile 3749 3777 3750 - if {[catch {exec git show $filename -- > $output} err]} { 3778 + if {[catch {safe_exec_redirect [list git show $filename --] [list > $output]} err]} { 3751 3779 if {[string match "fatal: bad revision *" $err]} { 3752 3780 return $nullfile 3753 3781 } ··· 3812 3840 3813 3841 if {$difffromfile ne {} && $difftofile ne {}} { 3814 3842 set cmd [list [shellsplit $extdifftool] $difffromfile $difftofile] 3815 - if {[catch {set fl [open |$cmd r]} err]} { 3843 + if {[catch {set fl [safe_open_command $cmd]} err]} { 3816 3844 file delete -force $diffdir 3817 3845 error_popup "$extdifftool: [mc "command failed:"] $err" 3818 3846 } else { ··· 3916 3944 # Find the SHA1 ID of the blob for file $fname in the index 3917 3945 # at stage 0 or 2 3918 3946 proc index_sha1 {fname} { 3919 - set f [open [list | git ls-files -s $fname] r] 3947 + set f [safe_open_command [list git ls-files -s $fname]] 3920 3948 while {[gets $f line] >= 0} { 3921 3949 set info [lindex [split $line "\t"] 0] 3922 3950 set stage [lindex $info 2] ··· 3976 4004 # being given an absolute path... 3977 4005 set f [make_relative $f] 3978 4006 lappend cmdline $base_commit $f 3979 - if {[catch {eval exec $cmdline &} err]} { 4007 + if {[catch {safe_exec_redirect $cmdline [list &]} err]} { 3980 4008 error_popup "[mc "git gui blame: command failed:"] $err" 3981 4009 } 3982 4010 } ··· 4004 4032 # must be a merge in progress... 4005 4033 if {[catch { 4006 4034 # get the last line from .git/MERGE_HEAD 4007 - set f [open [file join $gitdir MERGE_HEAD] r] 4035 + set f [safe_open_file [file join $gitdir MERGE_HEAD] r] 4008 4036 set id [lindex [split [read $f] "\n"] end-1] 4009 4037 close $f 4010 4038 } err]} { ··· 4027 4055 } 4028 4056 set line [lindex $h 1] 4029 4057 } 4030 - set blameargs {} 4058 + set blamefile [file join $cdup $flist_menu_file] 4031 4059 if {$from_index ne {}} { 4032 - lappend blameargs | git cat-file blob $from_index 4033 - } 4034 - lappend blameargs | git blame -p -L$line,+1 4035 - if {$from_index ne {}} { 4036 - lappend blameargs --contents - 4060 + set blameargs [list \ 4061 + [list git cat-file blob $from_index] \ 4062 + [list git blame -p -L$line,+1 --contents - -- $blamefile]] 4037 4063 } else { 4038 - lappend blameargs $id 4064 + set blameargs [list \ 4065 + [list git blame -p -L$line,+1 $id -- $blamefile]] 4039 4066 } 4040 - lappend blameargs -- [file join $cdup $flist_menu_file] 4041 4067 if {[catch { 4042 - set f [open $blameargs r] 4068 + set f [safe_open_pipeline $blameargs] 4043 4069 } err]} { 4044 4070 error_popup [mc "Couldn't start git blame: %s" $err] 4045 4071 return ··· 4064 4090 4065 4091 proc read_line_source {fd inst} { 4066 4092 global blamestuff curview commfd blameinst nullid nullid2 4093 + global hashlength 4067 4094 4068 4095 while {[gets $fd line] >= 0} { 4069 4096 lappend blamestuff($inst) $line ··· 4084 4111 set line [split [lindex $blamestuff($inst) 0] " "] 4085 4112 set id [lindex $line 0] 4086 4113 set lnum [lindex $line 1] 4087 - if {[string length $id] == 40 && [string is xdigit $id] && 4114 + if {[string length $id] == $hashlength && [string is xdigit $id] && 4088 4115 [string is digit -strict $lnum]} { 4089 4116 # look for "filename" line 4090 4117 foreach l $blamestuff($inst) { ··· 4412 4439 4413 4440 proc vieweditor {top n title} { 4414 4441 global newviewname newviewopts viewfiles bgcolor 4415 - global known_view_options NS 4442 + global known_view_options 4416 4443 4417 4444 ttk_toplevel $top 4418 4445 wm title $top [concat $title [mc "-- criteria for selecting revisions"]] 4419 4446 make_transient $top . 4420 4447 4421 4448 # View name 4422 - ${NS}::frame $top.nfr 4423 - ${NS}::label $top.nl -text [mc "View Name"] 4424 - ${NS}::entry $top.name -width 20 -textvariable newviewname($n) 4449 + ttk::frame $top.nfr 4450 + ttk::label $top.nl -text [mc "View Name"] 4451 + ttk::entry $top.name -width 20 -textvariable newviewname($n) 4425 4452 pack $top.nfr -in $top -fill x -pady 5 -padx 3 4426 4453 pack $top.nl -in $top.nfr -side left -padx {0 5} 4427 4454 pack $top.name -in $top.nfr -side left -padx {0 25} ··· 4440 4467 if {$flags eq "+" || $flags eq "*"} { 4441 4468 set cframe $top.fr$cnt 4442 4469 incr cnt 4443 - ${NS}::frame $cframe 4470 + ttk::frame $cframe 4444 4471 pack $cframe -in $top -fill x -pady 3 -padx 3 4445 4472 set cexpand [expr {$flags eq "*"}] 4446 4473 } elseif {$flags eq ".." || $flags eq "*."} { 4447 4474 set cframe $top.fr$cnt 4448 4475 incr cnt 4449 - ${NS}::frame $cframe 4476 + ttk::frame $cframe 4450 4477 pack $cframe -in $top -fill x -pady 3 -padx [list 15 3] 4451 4478 set cexpand [expr {$flags eq "*."}] 4452 4479 } else { ··· 4454 4481 } 4455 4482 4456 4483 if {$type eq "l"} { 4457 - ${NS}::label $cframe.l_$id -text $title 4484 + ttk::label $cframe.l_$id -text $title 4458 4485 pack $cframe.l_$id -in $cframe -side left -pady [list 3 0] -anchor w 4459 4486 } elseif {$type eq "b"} { 4460 - ${NS}::checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id) 4487 + ttk::checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id) 4461 4488 pack $cframe.c_$id -in $cframe -side left \ 4462 4489 -padx [list $lxpad 0] -expand $cexpand -anchor w 4463 4490 } elseif {[regexp {^r(\d+)$} $type type sz]} { 4464 4491 regexp {^(.*_)} $id uselessvar button_id 4465 - ${NS}::radiobutton $cframe.c_$id -text $title -variable newviewopts($n,$button_id) -value $sz 4492 + ttk::radiobutton $cframe.c_$id -text $title -variable newviewopts($n,$button_id) -value $sz 4466 4493 pack $cframe.c_$id -in $cframe -side left \ 4467 4494 -padx [list $lxpad 0] -expand $cexpand -anchor w 4468 4495 } elseif {[regexp {^t(\d+)$} $type type sz]} { 4469 - ${NS}::label $cframe.l_$id -text $title 4470 - ${NS}::entry $cframe.e_$id -width $sz -background $bgcolor \ 4496 + ttk::label $cframe.l_$id -text $title 4497 + ttk::entry $cframe.e_$id -width $sz -background $bgcolor \ 4471 4498 -textvariable newviewopts($n,$id) 4472 4499 pack $cframe.l_$id -in $cframe -side left -padx [list $lxpad 0] 4473 4500 pack $cframe.e_$id -in $cframe -side left -expand 1 -fill x 4474 4501 } elseif {[regexp {^t(\d+)=$} $type type sz]} { 4475 - ${NS}::label $cframe.l_$id -text $title 4476 - ${NS}::entry $cframe.e_$id -width $sz -background $bgcolor \ 4502 + ttk::label $cframe.l_$id -text $title 4503 + ttk::entry $cframe.e_$id -width $sz -background $bgcolor \ 4477 4504 -textvariable newviewopts($n,$id) 4478 4505 pack $cframe.l_$id -in $cframe -side top -pady [list 3 0] -anchor w 4479 4506 pack $cframe.e_$id -in $cframe -side top -fill x 4480 4507 } elseif {$type eq "path"} { 4481 - ${NS}::label $top.l -text $title 4508 + ttk::label $top.l -text $title 4482 4509 pack $top.l -in $top -side top -pady [list 3 0] -anchor w -padx 3 4483 4510 text $top.t -width 40 -height 5 -background $bgcolor 4484 4511 if {[info exists viewfiles($n)]} { ··· 4493 4520 } 4494 4521 } 4495 4522 4496 - ${NS}::frame $top.buts 4497 - ${NS}::button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n] 4498 - ${NS}::button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1] 4499 - ${NS}::button $top.buts.can -text [mc "Cancel"] -command [list destroy $top] 4523 + ttk::frame $top.buts 4524 + ttk::button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n] 4525 + ttk::button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1] 4526 + ttk::button $top.buts.can -text [mc "Cancel"] -command [list destroy $top] 4500 4527 bind $top <Control-Return> [list newviewok $top $n] 4501 4528 bind $top <F5> [list newviewok $top $n 1] 4502 4529 bind $top <Escape> [list destroy $top] ··· 4964 4991 # must be "containing:", i.e. we're searching commit info 4965 4992 return 4966 4993 } 4967 - set cmd [concat | git diff-tree -r -s --stdin $gdtargs] 4968 - set filehighlight [open $cmd r+] 4994 + set cmd [concat git diff-tree -r -s --stdin $gdtargs] 4995 + set filehighlight [safe_open_command_rw $cmd] 4969 4996 fconfigure $filehighlight -blocking 0 4970 4997 filerun $filehighlight readfhighlight 4971 4998 set fhl_list {} ··· 5228 5255 # Graph layout functions 5229 5256 5230 5257 proc shortids {ids} { 5258 + global hashlength 5259 + 5231 5260 set res {} 5232 5261 foreach id $ids { 5233 5262 if {[llength $id] > 1} { 5234 5263 lappend res [shortids $id] 5235 - } elseif {[regexp {^[0-9a-f]{40}$} $id]} { 5264 + } elseif {[regexp [string map "@@ $hashlength" {^[0-9a-f]{@@}$}] $id]} { 5236 5265 lappend res [string range $id 0 7] 5237 5266 } else { 5238 5267 lappend res $id ··· 5394 5423 global viewmainheadid vfilelimit viewinstances mainheadid 5395 5424 5396 5425 catch { 5397 - set rfd [open [concat | git rev-list -1 $mainheadid \ 5398 - -- $vfilelimit($view)] r] 5426 + set rfd [safe_open_command [concat git rev-list -1 $mainheadid \ 5427 + -- $vfilelimit($view)]] 5399 5428 set j [reg_instance $rfd] 5400 5429 lappend viewinstances($view) $j 5401 5430 fconfigure $rfd -blocking 0 ··· 5407 5436 # git rev-list should give us just 1 line to use as viewmainheadid($view) 5408 5437 proc getviewhead {fd inst view} { 5409 5438 global viewmainheadid commfd curview viewinstances showlocalchanges 5439 + global hashlength 5410 5440 5411 5441 set id {} 5412 5442 if {[gets $fd line] < 0} { 5413 5443 if {![eof $fd]} { 5414 5444 return 1 5415 5445 } 5416 - } elseif {[string length $line] == 40 && [string is xdigit $line]} { 5446 + } elseif {[string length $line] == $hashlength && [string is xdigit $line]} { 5417 5447 set id $line 5418 5448 } 5419 5449 set viewmainheadid($view) $id ··· 5455 5485 # spawn off a process to do git diff-index --cached HEAD 5456 5486 proc dodiffindex {} { 5457 5487 global lserial showlocalchanges vfilelimit curview 5458 - global hasworktree git_version 5488 + global hasworktree 5459 5489 5460 5490 if {!$showlocalchanges || !$hasworktree} return 5461 5491 incr lserial 5462 - if {[package vcompare $git_version "1.7.2"] >= 0} { 5463 - set cmd "|git diff-index --cached --ignore-submodules=dirty HEAD" 5464 - } else { 5465 - set cmd "|git diff-index --cached HEAD" 5466 - } 5492 + set cmd "git diff-index --cached --ignore-submodules=dirty HEAD" 5467 5493 if {$vfilelimit($curview) ne {}} { 5468 5494 set cmd [concat $cmd -- $vfilelimit($curview)] 5469 5495 } 5470 - set fd [open $cmd r] 5496 + set fd [safe_open_command $cmd] 5471 5497 fconfigure $fd -blocking 0 5472 5498 set i [reg_instance $fd] 5473 5499 filerun $fd [list readdiffindex $fd $lserial $i] ··· 5492 5518 } 5493 5519 5494 5520 # now see if there are any local changes not checked in to the index 5495 - set cmd "|git diff-files" 5521 + set cmd "git diff-files" 5496 5522 if {$vfilelimit($curview) ne {}} { 5497 5523 set cmd [concat $cmd -- $vfilelimit($curview)] 5498 5524 } 5499 - set fd [open $cmd r] 5525 + set fd [safe_open_command $cmd] 5500 5526 fconfigure $fd -blocking 0 5501 5527 set i [reg_instance $fd] 5502 5528 filerun $fd [list readdifffiles $fd $serial $i] ··· 6691 6717 } 6692 6718 6693 6719 proc graph_pane_width {} { 6694 - global use_ttk 6695 - 6696 - if {$use_ttk} { 6697 - set g [.tf.histframe.pwclist sashpos 0] 6698 - } else { 6699 - set g [.tf.histframe.pwclist sash coord 0] 6700 - } 6720 + set g [.tf.histframe.pwclist sashpos 0] 6701 6721 return [lindex $g 0] 6702 6722 } 6703 6723 ··· 7110 7130 7111 7131 # mark the bits of a headline or author that match a find string 7112 7132 proc markmatches {canv l str tag matches font row} { 7113 - global selectedline 7133 + global selectedline foundbgcolor 7114 7134 7115 7135 set bbox [$canv bbox $tag] 7116 7136 set x0 [lindex $bbox 0] ··· 7124 7144 set xlen [font measure $font [string range $str 0 [expr {$end}]]] 7125 7145 set t [$canv create rect [expr {$x0+$xoff}] $y0 \ 7126 7146 [expr {$x0+$xlen+2}] $y1 \ 7127 - -outline {} -tags [list match$l matches] -fill yellow] 7147 + -outline {} -tags [list match$l matches] -fill $foundbgcolor] 7128 7148 $canv lower $t 7129 7149 if {$row == $selectedline} { 7130 7150 $canv raise $t secsel ··· 7177 7197 # Also look for URLs of the form "http[s]://..." and make them web links. 7178 7198 proc appendwithlinks {text tags} { 7179 7199 global ctext linknum curview 7200 + global hashlength 7180 7201 7181 7202 set start [$ctext index "end - 1c"] 7182 7203 $ctext insert end $text $tags 7183 - set links [regexp -indices -all -inline {(?:\m|-g)[0-9a-f]{6,40}\M} $text] 7204 + set links [regexp -indices -all -inline [string map "@@ $hashlength" {(?:\m|-g)[0-9a-f]{6,@@}\M}] $text] 7184 7205 foreach l $links { 7185 7206 set s [lindex $l 0] 7186 7207 set e [lindex $l 1] ··· 7208 7229 proc setlink {id lk} { 7209 7230 global curview ctext pendinglinks 7210 7231 global linkfgcolor 7232 + global hashlength 7211 7233 7212 7234 if {[string range $id 0 1] eq "-g"} { 7213 7235 set id [string range $id 2 end] 7214 7236 } 7215 7237 7216 7238 set known 0 7217 - if {[string length $id] < 40} { 7239 + if {[string length $id] < $hashlength} { 7218 7240 set matches [longid $id] 7219 7241 if {[llength $matches] > 0} { 7220 7242 if {[llength $matches] > 1} return ··· 7285 7307 global web_browser 7286 7308 7287 7309 if {$web_browser eq {}} return 7288 - # Use eval here in case $web_browser is a command plus some arguments 7289 - if {[catch {eval exec $web_browser [list $url] &} err]} { 7310 + # Use concat here in case $web_browser is a command plus some arguments 7311 + if {[catch {safe_exec_redirect [concat $web_browser [list $url]] [list &]} err]} { 7290 7312 error_popup "[mc "Error starting web browser:"] $err" 7291 7313 } 7292 7314 } ··· 7792 7814 if {![info exists treefilelist($id)]} { 7793 7815 if {![info exists treepending]} { 7794 7816 if {$id eq $nullid} { 7795 - set cmd [list | git ls-files] 7817 + set cmd [list git ls-files] 7796 7818 } elseif {$id eq $nullid2} { 7797 - set cmd [list | git ls-files --stage -t] 7819 + set cmd [list git ls-files --stage -t] 7798 7820 } else { 7799 - set cmd [list | git ls-tree -r $id] 7821 + set cmd [list git ls-tree -r $id] 7800 7822 } 7801 - if {[catch {set gtf [open $cmd r]}]} { 7823 + if {[catch {set gtf [safe_open_command $cmd]}]} { 7802 7824 return 7803 7825 } 7804 7826 set treepending $id 7805 7827 set treefilelist($id) {} 7806 7828 set treeidlist($id) {} 7807 - fconfigure $gtf -blocking 0 -encoding binary 7829 + fconfigure $gtf -blocking 0 -translation binary 7808 7830 filerun $gtf [list gettreeline $gtf $id] 7809 7831 } 7810 7832 } else { ··· 7831 7853 if {[string index $fname 0] eq "\""} { 7832 7854 set fname [lindex $fname 0] 7833 7855 } 7834 - set fname [encoding convertfrom utf-8 $fname] 7856 + set fname [convertfrom utf-8 $fname] 7835 7857 lappend treefilelist($id) $fname 7836 7858 } 7837 7859 if {![eof $gtf]} { ··· 7862 7884 return 7863 7885 } 7864 7886 if {$diffids eq $nullid} { 7865 - if {[catch {set bf [open $f r]} err]} { 7887 + if {[catch {set bf [safe_open_file $f r]} err]} { 7866 7888 puts "oops, can't read $f: $err" 7867 7889 return 7868 7890 } 7869 7891 } else { 7870 7892 set blob [lindex $treeidlist($diffids) $i] 7871 - if {[catch {set bf [open [concat | git cat-file blob $blob] r]} err]} { 7893 + if {[catch {set bf [safe_open_command [concat git cat-file blob $blob]]} err]} { 7872 7894 puts "oops, error reading blob $blob: $err" 7873 7895 return 7874 7896 } ··· 8011 8033 } 8012 8034 8013 8035 proc diffcmd {ids flags} { 8014 - global log_showroot nullid nullid2 git_version 8036 + global log_showroot nullid nullid2 8015 8037 8016 8038 set i [lsearch -exact $ids $nullid] 8017 8039 set j [lsearch -exact $ids $nullid2] 8018 8040 if {$i >= 0} { 8019 8041 if {[llength $ids] > 1 && $j < 0} { 8020 8042 # comparing working directory with some specific revision 8021 - set cmd [concat | git diff-index $flags] 8043 + set cmd [concat git diff-index $flags] 8022 8044 if {$i == 0} { 8023 8045 lappend cmd -R [lindex $ids 1] 8024 8046 } else { ··· 8026 8048 } 8027 8049 } else { 8028 8050 # comparing working directory with index 8029 - set cmd [concat | git diff-files $flags] 8051 + set cmd [concat git diff-files $flags] 8030 8052 if {$j == 1} { 8031 8053 lappend cmd -R 8032 8054 } 8033 8055 } 8034 8056 } elseif {$j >= 0} { 8035 - if {[package vcompare $git_version "1.7.2"] >= 0} { 8036 - set flags "$flags --ignore-submodules=dirty" 8037 - } 8038 - set cmd [concat | git diff-index --cached $flags] 8057 + set flags "$flags --ignore-submodules=dirty" 8058 + set cmd [concat git diff-index --cached $flags] 8039 8059 if {[llength $ids] > 1} { 8040 8060 # comparing index with specific revision 8041 8061 if {$j == 0} { ··· 8051 8071 if {$log_showroot} { 8052 8072 lappend flags --root 8053 8073 } 8054 - set cmd [concat | git diff-tree -r $flags $ids] 8074 + set cmd [concat git diff-tree -r $flags $ids] 8055 8075 } 8056 8076 return $cmd 8057 8077 } ··· 8063 8083 if {$limitdiffs && $vfilelimit($curview) ne {}} { 8064 8084 set cmd [concat $cmd -- $vfilelimit($curview)] 8065 8085 } 8066 - if {[catch {set gdtf [open $cmd r]}]} return 8086 + if {[catch {set gdtf [safe_open_command $cmd]}]} return 8067 8087 8068 8088 set treepending $ids 8069 8089 set treediff {} 8070 - fconfigure $gdtf -blocking 0 -encoding binary 8090 + fconfigure $gdtf -blocking 0 -translation binary 8071 8091 filerun $gdtf [list gettreediffline $gdtf $ids] 8072 8092 } 8073 8093 ··· 8093 8113 if {[string index $file 0] eq "\""} { 8094 8114 set file [lindex $file 0] 8095 8115 } 8096 - set file [encoding convertfrom utf-8 $file] 8116 + set file [convertfrom utf-8 $file] 8097 8117 if {$file ne [lindex $treediff end]} { 8098 8118 lappend treediff $file 8099 8119 lappend sublist $file ··· 8163 8183 global ignorespace 8164 8184 global worddiff 8165 8185 global limitdiffs vfilelimit curview 8166 - global git_version 8167 8186 8168 - set textconv {} 8169 - if {[package vcompare $git_version "1.6.1"] >= 0} { 8170 - set textconv "--textconv" 8171 - } 8172 - set submodule {} 8173 - if {[package vcompare $git_version "1.6.6"] >= 0} { 8174 - set submodule "--submodule" 8175 - } 8176 - set cmd [diffcmd $ids "-p $textconv $submodule -C --cc --no-commit-id -U$diffcontext"] 8187 + set cmd [diffcmd $ids "-p --textconv --submodule -C --cc --no-commit-id -U$diffcontext"] 8177 8188 if {$ignorespace} { 8178 8189 append cmd " -w" 8179 8190 } ··· 8183 8194 if {$limitdiffs && $vfilelimit($curview) ne {}} { 8184 8195 set cmd [concat $cmd -- $vfilelimit($curview)] 8185 8196 } 8186 - if {[catch {set bdf [open $cmd r]} err]} { 8197 + if {[catch {set bdf [safe_open_command $cmd]} err]} { 8187 8198 error_popup [mc "Error getting diffs: %s" $err] 8188 8199 return 8189 8200 } 8190 - fconfigure $bdf -blocking 0 -encoding binary -eofchar {} 8201 + fconfigure $bdf -blocking 0 -translation binary 8191 8202 set blobdifffd($ids) $bdf 8192 8203 initblobdiffvars 8193 8204 filerun $bdf [list getblobdiffline $bdf $diffids] ··· 8238 8249 global ctext curdiffstart treediffs diffencoding 8239 8250 global ctext_file_names jump_to_here targetline diffline 8240 8251 8241 - set fname [encoding convertfrom utf-8 $fname] 8252 + set fname [convertfrom utf-8 $fname] 8242 8253 set diffencoding [get_path_encoding $fname] 8243 8254 set i [lsearch -exact $treediffs($ids) $fname] 8244 8255 if {$i >= 0} { ··· 8300 8311 8301 8312 if {![string compare -length 5 "diff " $line]} { 8302 8313 if {![regexp {^diff (--cc|--git) } $line m type]} { 8303 - set line [encoding convertfrom utf-8 $line] 8314 + set line [convertfrom utf-8 $line] 8304 8315 $ctext insert end "$line\n" hunksep 8305 8316 continue 8306 8317 } ··· 8349 8360 makediffhdr $fname $ids 8350 8361 8351 8362 } elseif {![string compare -length 16 "* Unmerged path " $line]} { 8352 - set fname [encoding convertfrom utf-8 [string range $line 16 end]] 8363 + set fname [convertfrom utf-8 [string range $line 16 end]] 8353 8364 $ctext insert end "\n" 8354 8365 set curdiffstart [$ctext index "end - 1c"] 8355 8366 lappend ctext_file_names $fname ··· 8362 8373 8363 8374 } elseif {![string compare -length 2 "@@" $line]} { 8364 8375 regexp {^@@+} $line ats 8365 - set line [encoding convertfrom $diffencoding $line] 8376 + set line [convertfrom $diffencoding $line] 8366 8377 $ctext insert end "$line\n" hunksep 8367 8378 if {[regexp { \+(\d+),\d+ @@} $line m nl]} { 8368 8379 set diffline $nl ··· 8391 8402 $ctext insert end "$line\n" filesep 8392 8403 } 8393 8404 } elseif {$currdiffsubmod != "" && ![string compare -length 3 " >" $line]} { 8394 - set line [encoding convertfrom $diffencoding $line] 8405 + set line [convertfrom $diffencoding $line] 8395 8406 $ctext insert end "$line\n" dresult 8396 8407 } elseif {$currdiffsubmod != "" && ![string compare -length 3 " <" $line]} { 8397 - set line [encoding convertfrom $diffencoding $line] 8408 + set line [convertfrom $diffencoding $line] 8398 8409 $ctext insert end "$line\n" d0 8399 8410 } elseif {$diffinhdr} { 8400 8411 if {![string compare -length 12 "rename from " $line]} { ··· 8402 8413 if {[string index $fname 0] eq "\""} { 8403 8414 set fname [lindex $fname 0] 8404 8415 } 8405 - set fname [encoding convertfrom utf-8 $fname] 8416 + set fname [convertfrom utf-8 $fname] 8406 8417 set i [lsearch -exact $treediffs($ids) $fname] 8407 8418 if {$i >= 0} { 8408 8419 setinlist difffilestart $i $curdiffstart ··· 8421 8432 set diffinhdr 0 8422 8433 return 8423 8434 } 8424 - set line [encoding convertfrom utf-8 $line] 8435 + set line [convertfrom utf-8 $line] 8425 8436 $ctext insert end "$line\n" filesep 8426 8437 8427 8438 } else { 8428 8439 set line [string map {\x1A ^Z} \ 8429 - [encoding convertfrom $diffencoding $line]] 8440 + [convertfrom $diffencoding $line]] 8430 8441 # parse the prefix - one ' ', '-' or '+' for each parent 8431 8442 set prefix [string range $line 0 [expr {$diffnparents - 1}]] 8432 8443 set tag [expr {$diffnparents > 1? "m": "d"}] ··· 8578 8589 } 8579 8590 8580 8591 proc settabs {{firstab {}}} { 8581 - global firsttabstop tabstop ctext have_tk85 8592 + global firsttabstop tabstop ctext 8582 8593 8583 - if {$firstab ne {} && $have_tk85} { 8594 + if {$firstab ne {}} { 8584 8595 set firsttabstop $firstab 8585 8596 } 8586 8597 set w [font measure textfont "0"] 8587 8598 if {$firsttabstop != 0} { 8588 8599 $ctext conf -tabs [list [expr {($firsttabstop + $tabstop) * $w}] \ 8589 8600 [expr {($firsttabstop + 2 * $tabstop) * $w}]] 8590 - } elseif {$have_tk85 || $tabstop != 8} { 8591 - $ctext conf -tabs [expr {$tabstop * $w}] 8592 8601 } else { 8593 - $ctext conf -tabs {} 8602 + $ctext conf -tabs [expr {$tabstop * $w}] 8594 8603 } 8595 8604 } 8596 8605 ··· 8859 8868 8860 8869 proc clearsha1 {} { 8861 8870 global sha1entry sha1string 8862 - if {[string length $sha1string] == 40} { 8871 + global hashlength 8872 + 8873 + if {[string length $sha1string] == $hashlength} { 8863 8874 $sha1entry delete 0 end 8864 8875 } 8865 8876 } 8866 8877 8867 8878 proc sha1change {n1 n2 op} { 8868 8879 global sha1string currentid sha1but 8880 + 8869 8881 if {$sha1string == {} 8870 8882 || ([info exists currentid] && $sha1string == $currentid)} { 8871 8883 set state disabled ··· 8882 8894 8883 8895 proc gotocommit {} { 8884 8896 global sha1string tagids headids curview varcid 8897 + global hashlength 8885 8898 8886 8899 if {$sha1string == {} 8887 8900 || ([info exists currentid] && $sha1string == $currentid)} return ··· 8891 8904 set id $headids($sha1string) 8892 8905 } else { 8893 8906 set id [string tolower $sha1string] 8894 - if {[regexp {^[0-9a-f]{4,39}$} $id]} { 8907 + if {[regexp {^[0-9a-f]{4,63}$} $id]} { 8895 8908 set matches [longid $id] 8896 8909 if {$matches ne {}} { 8897 8910 if {[llength $matches] > 1} { ··· 8901 8914 set id [lindex $matches 0] 8902 8915 } 8903 8916 } else { 8904 - if {[catch {set id [exec git rev-parse --verify $sha1string]}]} { 8917 + if {[catch {set id [safe_exec [list git rev-parse --verify $sha1string]]}]} { 8905 8918 error_popup [mc "Revision %s is not known" $sha1string] 8906 8919 return 8907 8920 } ··· 9207 9220 9208 9221 if {![info exists patchids($id)]} { 9209 9222 set cmd [diffcmd [list $id] {-p --root}] 9210 - # trim off the initial "|" 9211 - set cmd [lrange $cmd 1 end] 9212 9223 if {[catch { 9213 - set x [eval exec $cmd | git patch-id] 9224 + set x [safe_exec_redirect $cmd [list | git patch-id]] 9214 9225 set patchids($id) [lindex $x 0] 9215 9226 }]} { 9216 9227 set patchids($id) "error" ··· 9306 9317 set fna [file join $tmpdir "commit-[string range $a 0 7]"] 9307 9318 set fnb [file join $tmpdir "commit-[string range $b 0 7]"] 9308 9319 if {[catch { 9309 - exec git diff-tree -p --pretty $a >$fna 9310 - exec git diff-tree -p --pretty $b >$fnb 9320 + safe_exec_redirect [list git diff-tree -p --pretty $a] [list >$fna] 9321 + safe_exec_redirect [list git diff-tree -p --pretty $b] [list >$fnb] 9311 9322 } err]} { 9312 9323 error_popup [mc "Error writing commit to file: %s" $err] 9313 9324 return 9314 9325 } 9315 9326 if {[catch { 9316 - set fd [open "| diff -U$diffcontext $fna $fnb" r] 9327 + set fd [safe_open_command "diff -U$diffcontext $fna $fnb"] 9317 9328 } err]} { 9318 9329 error_popup [mc "Error diffing commits: %s" $err] 9319 9330 return ··· 9379 9390 } 9380 9391 9381 9392 proc mkpatch {} { 9382 - global rowmenuid currentid commitinfo patchtop patchnum NS 9393 + global rowmenuid currentid commitinfo patchtop patchnum 9394 + global hashlength 9383 9395 9384 9396 if {![info exists currentid]} return 9385 9397 set oldid $currentid ··· 9391 9403 catch {destroy $top} 9392 9404 ttk_toplevel $top 9393 9405 make_transient $top . 9394 - ${NS}::label $top.title -text [mc "Generate patch"] 9406 + ttk::label $top.title -text [mc "Generate patch"] 9395 9407 grid $top.title - -pady 10 9396 - ${NS}::label $top.from -text [mc "From:"] 9397 - ${NS}::entry $top.fromsha1 -width 40 9408 + ttk::label $top.from -text [mc "From:"] 9409 + ttk::entry $top.fromsha1 -width $hashlength 9398 9410 $top.fromsha1 insert 0 $oldid 9399 9411 $top.fromsha1 conf -state readonly 9400 9412 grid $top.from $top.fromsha1 -sticky w 9401 - ${NS}::entry $top.fromhead -width 60 9413 + ttk::entry $top.fromhead -width 60 9402 9414 $top.fromhead insert 0 $oldhead 9403 9415 $top.fromhead conf -state readonly 9404 9416 grid x $top.fromhead -sticky w 9405 - ${NS}::label $top.to -text [mc "To:"] 9406 - ${NS}::entry $top.tosha1 -width 40 9417 + ttk::label $top.to -text [mc "To:"] 9418 + ttk::entry $top.tosha1 -width $hashlength 9407 9419 $top.tosha1 insert 0 $newid 9408 9420 $top.tosha1 conf -state readonly 9409 9421 grid $top.to $top.tosha1 -sticky w 9410 - ${NS}::entry $top.tohead -width 60 9422 + ttk::entry $top.tohead -width 60 9411 9423 $top.tohead insert 0 $newhead 9412 9424 $top.tohead conf -state readonly 9413 9425 grid x $top.tohead -sticky w 9414 - ${NS}::button $top.rev -text [mc "Reverse"] -command mkpatchrev 9426 + ttk::button $top.rev -text [mc "Reverse"] -command mkpatchrev 9415 9427 grid $top.rev x -pady 10 -padx 5 9416 - ${NS}::label $top.flab -text [mc "Output file:"] 9417 - ${NS}::entry $top.fname -width 60 9428 + ttk::label $top.flab -text [mc "Output file:"] 9429 + ttk::entry $top.fname -width 60 9418 9430 $top.fname insert 0 [file normalize "patch$patchnum.patch"] 9419 9431 incr patchnum 9420 9432 grid $top.flab $top.fname -sticky w 9421 - ${NS}::frame $top.buts 9422 - ${NS}::button $top.buts.gen -text [mc "Generate"] -command mkpatchgo 9423 - ${NS}::button $top.buts.can -text [mc "Cancel"] -command mkpatchcan 9433 + ttk::frame $top.buts 9434 + ttk::button $top.buts.gen -text [mc "Generate"] -command mkpatchgo 9435 + ttk::button $top.buts.can -text [mc "Cancel"] -command mkpatchcan 9424 9436 bind $top <Key-Return> mkpatchgo 9425 9437 bind $top <Key-Escape> mkpatchcan 9426 9438 grid $top.buts.gen $top.buts.can ··· 9453 9465 set newid [$patchtop.tosha1 get] 9454 9466 set fname [$patchtop.fname get] 9455 9467 set cmd [diffcmd [list $oldid $newid] -p] 9456 - # trim off the initial "|" 9457 - set cmd [lrange $cmd 1 end] 9458 - lappend cmd >$fname & 9459 - if {[catch {eval exec $cmd} err]} { 9468 + if {[catch {safe_exec_redirect $cmd [list >$fname &]} err]} { 9460 9469 error_popup "[mc "Error creating patch:"] $err" $patchtop 9461 9470 } 9462 9471 catch {destroy $patchtop} ··· 9471 9480 } 9472 9481 9473 9482 proc mktag {} { 9474 - global rowmenuid mktagtop commitinfo NS 9483 + global rowmenuid mktagtop commitinfo 9484 + global hashlength 9475 9485 9476 9486 set top .maketag 9477 9487 set mktagtop $top 9478 9488 catch {destroy $top} 9479 9489 ttk_toplevel $top 9480 9490 make_transient $top . 9481 - ${NS}::label $top.title -text [mc "Create tag"] 9491 + ttk::label $top.title -text [mc "Create tag"] 9482 9492 grid $top.title - -pady 10 9483 - ${NS}::label $top.id -text [mc "ID:"] 9484 - ${NS}::entry $top.sha1 -width 40 9493 + ttk::label $top.id -text [mc "ID:"] 9494 + ttk::entry $top.sha1 -width $hashlength 9485 9495 $top.sha1 insert 0 $rowmenuid 9486 9496 $top.sha1 conf -state readonly 9487 9497 grid $top.id $top.sha1 -sticky w 9488 - ${NS}::entry $top.head -width 60 9498 + ttk::entry $top.head -width 60 9489 9499 $top.head insert 0 [lindex $commitinfo($rowmenuid) 0] 9490 9500 $top.head conf -state readonly 9491 9501 grid x $top.head -sticky w 9492 - ${NS}::label $top.tlab -text [mc "Tag name:"] 9493 - ${NS}::entry $top.tag -width 60 9502 + ttk::label $top.tlab -text [mc "Tag name:"] 9503 + ttk::entry $top.tag -width 60 9494 9504 grid $top.tlab $top.tag -sticky w 9495 - ${NS}::label $top.op -text [mc "Tag message is optional"] 9505 + ttk::label $top.op -text [mc "Tag message is optional"] 9496 9506 grid $top.op -columnspan 2 -sticky we 9497 - ${NS}::label $top.mlab -text [mc "Tag message:"] 9498 - ${NS}::entry $top.msg -width 60 9507 + ttk::label $top.mlab -text [mc "Tag message:"] 9508 + ttk::entry $top.msg -width 60 9499 9509 grid $top.mlab $top.msg -sticky w 9500 - ${NS}::frame $top.buts 9501 - ${NS}::button $top.buts.gen -text [mc "Create"] -command mktaggo 9502 - ${NS}::button $top.buts.can -text [mc "Cancel"] -command mktagcan 9510 + ttk::frame $top.buts 9511 + ttk::button $top.buts.gen -text [mc "Create"] -command mktaggo 9512 + ttk::button $top.buts.can -text [mc "Cancel"] -command mktagcan 9503 9513 bind $top <Key-Return> mktaggo 9504 9514 bind $top <Key-Escape> mktagcan 9505 9515 grid $top.buts.gen $top.buts.can ··· 9525 9535 } 9526 9536 if {[catch { 9527 9537 if {$msg != {}} { 9528 - exec git tag -a -m $msg $tag $id 9538 + safe_exec [list git tag -a -m $msg $tag $id] 9529 9539 } else { 9530 - exec git tag $tag $id 9540 + safe_exec [list git tag $tag $id] 9531 9541 } 9532 9542 } err]} { 9533 9543 error_popup "[mc "Error creating tag:"] $err" $mktagtop ··· 9589 9599 9590 9600 proc copyreference {} { 9591 9601 global rowmenuid autosellen 9602 + global hashlength 9592 9603 9593 9604 set format "%h (\"%s\", %ad)" 9594 9605 set cmd [list git show -s --pretty=format:$format --date=short] 9595 - if {$autosellen < 40} { 9606 + if {$autosellen < $hashlength} { 9596 9607 lappend cmd --abbrev=$autosellen 9597 9608 } 9598 - set reference [eval exec $cmd $rowmenuid] 9609 + set reference [safe_exec [concat $cmd $rowmenuid]] 9599 9610 9600 9611 clipboard clear 9601 9612 clipboard append $reference 9602 9613 } 9603 9614 9604 9615 proc writecommit {} { 9605 - global rowmenuid wrcomtop commitinfo wrcomcmd NS 9616 + global rowmenuid wrcomtop commitinfo wrcomcmd 9617 + global hashlength 9606 9618 9607 9619 set top .writecommit 9608 9620 set wrcomtop $top 9609 9621 catch {destroy $top} 9610 9622 ttk_toplevel $top 9611 9623 make_transient $top . 9612 - ${NS}::label $top.title -text [mc "Write commit to file"] 9624 + ttk::label $top.title -text [mc "Write commit to file"] 9613 9625 grid $top.title - -pady 10 9614 - ${NS}::label $top.id -text [mc "ID:"] 9615 - ${NS}::entry $top.sha1 -width 40 9626 + ttk::label $top.id -text [mc "ID:"] 9627 + ttk::entry $top.sha1 -width $hashlength 9616 9628 $top.sha1 insert 0 $rowmenuid 9617 9629 $top.sha1 conf -state readonly 9618 9630 grid $top.id $top.sha1 -sticky w 9619 - ${NS}::entry $top.head -width 60 9631 + ttk::entry $top.head -width 60 9620 9632 $top.head insert 0 [lindex $commitinfo($rowmenuid) 0] 9621 9633 $top.head conf -state readonly 9622 9634 grid x $top.head -sticky w 9623 - ${NS}::label $top.clab -text [mc "Command:"] 9624 - ${NS}::entry $top.cmd -width 60 -textvariable wrcomcmd 9635 + ttk::label $top.clab -text [mc "Command:"] 9636 + ttk::entry $top.cmd -width 60 -textvariable wrcomcmd 9625 9637 grid $top.clab $top.cmd -sticky w -pady 10 9626 - ${NS}::label $top.flab -text [mc "Output file:"] 9627 - ${NS}::entry $top.fname -width 60 9638 + ttk::label $top.flab -text [mc "Output file:"] 9639 + ttk::entry $top.fname -width 60 9628 9640 $top.fname insert 0 [file normalize "commit-[string range $rowmenuid 0 6]"] 9629 9641 grid $top.flab $top.fname -sticky w 9630 - ${NS}::frame $top.buts 9631 - ${NS}::button $top.buts.gen -text [mc "Write"] -command wrcomgo 9632 - ${NS}::button $top.buts.can -text [mc "Cancel"] -command wrcomcan 9642 + ttk::frame $top.buts 9643 + ttk::button $top.buts.gen -text [mc "Write"] -command wrcomgo 9644 + ttk::button $top.buts.can -text [mc "Cancel"] -command wrcomcan 9633 9645 bind $top <Key-Return> wrcomgo 9634 9646 bind $top <Key-Escape> wrcomcan 9635 9647 grid $top.buts.gen $top.buts.can ··· 9645 9657 set id [$wrcomtop.sha1 get] 9646 9658 set cmd "echo $id | [$wrcomtop.cmd get]" 9647 9659 set fname [$wrcomtop.fname get] 9648 - if {[catch {exec sh -c $cmd >$fname &} err]} { 9660 + if {[catch {safe_exec_redirect [list sh -c $cmd] [list >$fname &]} err]} { 9649 9661 error_popup "[mc "Error writing commit:"] $err" $wrcomtop 9650 9662 } 9651 9663 catch {destroy $wrcomtop} ··· 9660 9672 } 9661 9673 9662 9674 proc mkbranch {} { 9663 - global NS rowmenuid 9675 + global rowmenuid 9664 9676 9665 9677 set top .branchdialog 9666 9678 ··· 9675 9687 } 9676 9688 9677 9689 proc mvbranch {} { 9678 - global NS 9679 9690 global headmenuid headmenuhead 9680 9691 9681 9692 set top .branchdialog ··· 9691 9702 } 9692 9703 9693 9704 proc branchdia {top valvar uivar} { 9694 - global NS commitinfo 9705 + global commitinfo 9706 + global hashlength 9695 9707 upvar $valvar val $uivar ui 9696 9708 9697 9709 catch {destroy $top} 9698 9710 ttk_toplevel $top 9699 9711 make_transient $top . 9700 - ${NS}::label $top.title -text $ui(title) 9712 + ttk::label $top.title -text $ui(title) 9701 9713 grid $top.title - -pady 10 9702 - ${NS}::label $top.id -text [mc "ID:"] 9703 - ${NS}::entry $top.sha1 -width 40 9714 + ttk::label $top.id -text [mc "ID:"] 9715 + ttk::entry $top.sha1 -width $hashlength 9704 9716 $top.sha1 insert 0 $val(id) 9705 9717 $top.sha1 conf -state readonly 9706 9718 grid $top.id $top.sha1 -sticky w 9707 - ${NS}::entry $top.head -width 60 9719 + ttk::entry $top.head -width 60 9708 9720 $top.head insert 0 [lindex $commitinfo($val(id)) 0] 9709 9721 $top.head conf -state readonly 9710 9722 grid x $top.head -sticky ew 9711 9723 grid columnconfigure $top 1 -weight 1 9712 - ${NS}::label $top.nlab -text [mc "Name:"] 9713 - ${NS}::entry $top.name -width 40 9724 + ttk::label $top.nlab -text [mc "Name:"] 9725 + ttk::entry $top.name -width $hashlength 9714 9726 $top.name insert 0 $val(name) 9715 9727 grid $top.nlab $top.name -sticky w 9716 - ${NS}::frame $top.buts 9717 - ${NS}::button $top.buts.go -text $ui(accept) -command $val(command) 9718 - ${NS}::button $top.buts.can -text [mc "Cancel"] -command "catch {destroy $top}" 9728 + ttk::frame $top.buts 9729 + ttk::button $top.buts.go -text $ui(accept) -command $val(command) 9730 + ttk::button $top.buts.can -text [mc "Cancel"] -command "catch {destroy $top}" 9719 9731 bind $top <Key-Return> $val(command) 9720 9732 bind $top <Key-Escape> "catch {destroy $top}" 9721 9733 grid $top.buts.go $top.buts.can ··· 9749 9761 nowbusy newbranch 9750 9762 update 9751 9763 if {[catch { 9752 - eval exec git branch $cmdargs 9764 + safe_exec [concat git branch $cmdargs] 9753 9765 } err]} { 9754 9766 notbusy newbranch 9755 9767 error_popup $err ··· 9790 9802 nowbusy renamebranch 9791 9803 update 9792 9804 if {[catch { 9793 - eval exec git branch $cmdargs 9805 + safe_exec [concat git branch $cmdargs] 9794 9806 } err]} { 9795 9807 notbusy renamebranch 9796 9808 error_popup $err ··· 9831 9843 } 9832 9844 } 9833 9845 9834 - eval exec git citool $tool_args & 9846 + safe_exec_redirect [concat git citool $tool_args] [list &] 9835 9847 9836 9848 array unset env GIT_AUTHOR_* 9837 9849 array set env $save_env ··· 9854 9866 update 9855 9867 # Unfortunately git-cherry-pick writes stuff to stderr even when 9856 9868 # no error occurs, and exec takes that as an indication of error... 9857 - if {[catch {exec sh -c "git cherry-pick -r $rowmenuid 2>&1"} err]} { 9869 + if {[catch {safe_exec [list sh -c "git cherry-pick -r $rowmenuid 2>&1"]} err]} { 9858 9870 notbusy cherrypick 9859 9871 if {[regexp -line \ 9860 9872 {Entry '(.*)' (would be overwritten by merge|not uptodate)} \ ··· 9916 9928 nowbusy revert [mc "Reverting"] 9917 9929 update 9918 9930 9919 - if [catch {exec git revert --no-edit $rowmenuid} err] { 9931 + if [catch {safe_exec [list git revert --no-edit $rowmenuid]} err] { 9920 9932 notbusy revert 9921 9933 if [regexp {files would be overwritten by merge:(\n(( |\t)+[^\n]+\n)+)}\ 9922 9934 $err match files] { ··· 9962 9974 } 9963 9975 9964 9976 proc resethead {} { 9965 - global mainhead rowmenuid confirm_ok resettype NS 9977 + global mainhead rowmenuid confirm_ok resettype 9966 9978 9967 9979 set confirm_ok 0 9968 9980 set w ".confirmreset" 9969 9981 ttk_toplevel $w 9970 9982 make_transient $w . 9971 9983 wm title $w [mc "Confirm reset"] 9972 - ${NS}::label $w.m -text \ 9984 + ttk::label $w.m -text \ 9973 9985 [mc "Reset branch %s to %s?" $mainhead [string range $rowmenuid 0 7]] 9974 9986 pack $w.m -side top -fill x -padx 20 -pady 20 9975 - ${NS}::labelframe $w.f -text [mc "Reset type:"] 9987 + ttk::labelframe $w.f -text [mc "Reset type:"] 9976 9988 set resettype mixed 9977 - ${NS}::radiobutton $w.f.soft -value soft -variable resettype \ 9989 + ttk::radiobutton $w.f.soft -value soft -variable resettype \ 9978 9990 -text [mc "Soft: Leave working tree and index untouched"] 9979 9991 grid $w.f.soft -sticky w 9980 - ${NS}::radiobutton $w.f.mixed -value mixed -variable resettype \ 9992 + ttk::radiobutton $w.f.mixed -value mixed -variable resettype \ 9981 9993 -text [mc "Mixed: Leave working tree untouched, reset index"] 9982 9994 grid $w.f.mixed -sticky w 9983 - ${NS}::radiobutton $w.f.hard -value hard -variable resettype \ 9995 + ttk::radiobutton $w.f.hard -value hard -variable resettype \ 9984 9996 -text [mc "Hard: Reset working tree and index\n(discard ALL local changes)"] 9985 9997 grid $w.f.hard -sticky w 9986 9998 pack $w.f -side top -fill x -padx 4 9987 - ${NS}::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w" 9999 + ttk::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w" 9988 10000 pack $w.ok -side left -fill x -padx 20 -pady 20 9989 - ${NS}::button $w.cancel -text [mc Cancel] -command "destroy $w" 10001 + ttk::button $w.cancel -text [mc Cancel] -command "destroy $w" 9990 10002 bind $w <Key-Escape> [list destroy $w] 9991 10003 pack $w.cancel -side right -fill x -padx 20 -pady 20 9992 10004 bind $w <Visibility> "grab $w; focus $w" 9993 10005 tkwait window $w 9994 10006 if {!$confirm_ok} return 9995 - if {[catch {set fd [open \ 9996 - [list | git reset --$resettype $rowmenuid 2>@1] r]} err]} { 10007 + if {[catch {set fd [safe_open_command_redirect \ 10008 + [list git reset --$resettype $rowmenuid] [list 2>@1]]} err]} { 9997 10009 error_popup $err 9998 10010 } else { 9999 10011 dohidelocalchanges ··· 10064 10076 10065 10077 # check the tree is clean first?? 10066 10078 set newhead $headmenuhead 10067 - set command [list | git checkout] 10079 + set command [list git checkout] 10068 10080 if {[string match "remotes/*" $newhead]} { 10069 10081 set remote $newhead 10070 10082 set newhead [string range $newhead [expr [string last / $newhead] + 1] end] ··· 10078 10090 } else { 10079 10091 lappend command $newhead 10080 10092 } 10081 - lappend command 2>@1 10082 10093 nowbusy checkout [mc "Checking out"] 10083 10094 update 10084 10095 dohidelocalchanges 10085 10096 if {[catch { 10086 - set fd [open $command r] 10097 + set fd [safe_open_command_redirect $command [list 2>@1]] 10087 10098 } err]} { 10088 10099 notbusy checkout 10089 10100 error_popup $err ··· 10149 10160 } 10150 10161 nowbusy rmbranch 10151 10162 update 10152 - if {[catch {exec git branch -D $head} err]} { 10163 + if {[catch {safe_exec [list git branch -D $head]} err]} { 10153 10164 notbusy rmbranch 10154 10165 error_popup $err 10155 10166 return ··· 10164 10175 10165 10176 # Display a list of tags and heads 10166 10177 proc showrefs {} { 10167 - global showrefstop bgcolor fgcolor selectbgcolor NS 10178 + global showrefstop bgcolor fgcolor selectbgcolor 10168 10179 global bglist fglist reflistfilter reflist maincursor 10169 10180 10170 10181 set top .showrefs ··· 10187 10198 lappend bglist $top.list 10188 10199 lappend fglist $top.list 10189 10200 } 10190 - ${NS}::scrollbar $top.ysb -command "$top.list yview" -orient vertical 10191 - ${NS}::scrollbar $top.xsb -command "$top.list xview" -orient horizontal 10201 + ttk::scrollbar $top.ysb -command "$top.list yview" -orient vertical 10202 + ttk::scrollbar $top.xsb -command "$top.list xview" -orient horizontal 10192 10203 grid $top.list $top.ysb -sticky nsew 10193 10204 grid $top.xsb x -sticky ew 10194 - ${NS}::frame $top.f 10195 - ${NS}::label $top.f.l -text "[mc "Filter"]: " 10196 - ${NS}::entry $top.f.e -width 20 -textvariable reflistfilter 10205 + ttk::frame $top.f 10206 + ttk::label $top.f.l -text "[mc "Filter"]: " 10207 + ttk::entry $top.f.e -width 20 -textvariable reflistfilter 10197 10208 set reflistfilter "*" 10198 10209 trace add variable reflistfilter write reflistfilter_change 10199 10210 pack $top.f.e -side right -fill x -expand 1 10200 10211 pack $top.f.l -side left 10201 10212 grid $top.f - -sticky ew -pady 2 10202 - ${NS}::button $top.close -command [list destroy $top] -text [mc "Close"] 10213 + ttk::checkbutton $top.sort -text [mc "Sort refs by type"] \ 10214 + -variable sortrefsbytype -command {refill_reflist} 10215 + grid $top.sort - -sticky w -pady 2 10216 + ttk::button $top.close -command [list destroy $top] -text [mc "Close"] 10203 10217 bind $top <Key-Escape> [list destroy $top] 10204 10218 grid $top.close - 10205 10219 grid columnconfigure $top 0 -weight 1 ··· 10242 10256 } 10243 10257 10244 10258 proc refill_reflist {} { 10245 - global reflist reflistfilter showrefstop headids tagids otherrefids 10246 - global curview 10259 + global reflist reflistfilter showrefstop headids tagids otherrefids sortrefsbytype 10260 + global curview upstreamofref 10247 10261 10248 10262 if {![info exists showrefstop] || ![winfo exists $showrefstop]} return 10249 - set refs {} 10263 + set localrefs {} 10264 + set remoterefs {} 10265 + set trackedremoterefs {} 10266 + set tagrefs {} 10267 + set otherrefs {} 10268 + 10250 10269 foreach n [array names headids] { 10251 - if {[string match $reflistfilter $n]} { 10270 + if {![string match "remotes/*" $n] && [string match $reflistfilter $n]} { 10252 10271 if {[commitinview $headids($n) $curview]} { 10253 - if {[string match "remotes/*" $n]} { 10254 - lappend refs [list $n R] 10255 - } else { 10256 - lappend refs [list $n H] 10272 + lappend localrefs [list $n H] 10273 + if {[info exists upstreamofref($n)] && [commitinview $headids($upstreamofref($n)) $curview]} { 10274 + lappend trackedremoterefs [list $upstreamofref($n) R] 10275 + } 10276 + } else { 10277 + interestedin $headids($n) {run refill_reflist} 10278 + } 10279 + } 10280 + } 10281 + set trackedremoterefs [lsort -index 0 -unique $trackedremoterefs] 10282 + set localrefs [lsort -index 0 $localrefs] 10283 + 10284 + foreach n [array names headids] { 10285 + if {[string match "remotes/*" $n] && [string match $reflistfilter $n]} { 10286 + if {[commitinview $headids($n) $curview]} { 10287 + if {[lsearch -exact $trackedremoterefs [list $n R]] < 0} { 10288 + lappend remoterefs [list $n R] 10257 10289 } 10258 10290 } else { 10259 10291 interestedin $headids($n) {run refill_reflist} 10260 10292 } 10261 10293 } 10262 10294 } 10295 + set remoterefs [lsort -index 0 $remoterefs] 10296 + 10263 10297 foreach n [array names tagids] { 10264 10298 if {[string match $reflistfilter $n]} { 10265 10299 if {[commitinview $tagids($n) $curview]} { 10266 - lappend refs [list $n T] 10300 + lappend tagrefs [list $n T] 10267 10301 } else { 10268 10302 interestedin $tagids($n) {run refill_reflist} 10269 10303 } 10270 10304 } 10271 10305 } 10306 + set tagrefs [lsort -index 0 $tagrefs] 10307 + 10272 10308 foreach n [array names otherrefids] { 10273 10309 if {[string match $reflistfilter $n]} { 10274 10310 if {[commitinview $otherrefids($n) $curview]} { 10275 - lappend refs [list $n o] 10311 + lappend otherrefs [list "$n" o] 10276 10312 } else { 10277 10313 interestedin $otherrefids($n) {run refill_reflist} 10278 10314 } 10279 10315 } 10280 10316 } 10281 - set refs [lsort -index 0 $refs] 10317 + set otherrefs [lsort -index 0 $otherrefs] 10318 + 10319 + set refs [concat $localrefs $trackedremoterefs $remoterefs $tagrefs $otherrefs] 10320 + if {!$sortrefsbytype} { 10321 + set refs [lsort -index 0 $refs] 10322 + } 10323 + 10282 10324 if {$refs eq $reflist} return 10283 10325 10284 10326 # Update the contents of $showrefstop.list according to the ··· 10340 10382 set cachedarcs 0 10341 10383 set allccache [file join $gitdir "gitk.cache"] 10342 10384 if {![catch { 10343 - set f [open $allccache r] 10385 + set f [safe_open_file $allccache r] 10344 10386 set allcwait 1 10345 10387 getcache $f 10346 10388 }]} return ··· 10349 10391 if {$allcwait} { 10350 10392 return 10351 10393 } 10352 - set cmd [list | git rev-list --parents] 10394 + set cmd [list git rev-list --parents] 10353 10395 set allcupdate [expr {$seeds ne {}}] 10354 10396 if {!$allcupdate} { 10355 10397 set ids "--all" ··· 10377 10419 if {$ids ne {}} { 10378 10420 if {$ids eq "--all"} { 10379 10421 set cmd [concat $cmd "--all"] 10422 + set fd [safe_open_command $cmd] 10380 10423 } else { 10381 - set cmd [concat $cmd --stdin "<<[join $ids "\\n"]"] 10424 + set cmd [concat $cmd --stdin] 10425 + set fd [safe_open_command_redirect $cmd [list "<<[join $ids "\n"]"]] 10382 10426 } 10383 - set fd [open $cmd r] 10384 10427 fconfigure $fd -blocking 0 10385 10428 incr allcommits 10386 10429 nowbusy allcommits ··· 10770 10813 set cachearc 0 10771 10814 set cachedarcs $nextarc 10772 10815 catch { 10773 - set f [open $allccache w] 10816 + set f [safe_open_file $allccache w] 10774 10817 puts $f [list 1 $cachedarcs] 10775 10818 run writecache $f 10776 10819 } ··· 11473 11516 11474 11517 if {![info exists cached_tagcontent($tag)]} { 11475 11518 catch { 11476 - set cached_tagcontent($tag) [exec git cat-file -p $tag] 11519 + set cached_tagcontent($tag) [safe_exec [list git cat-file -p $tag]] 11477 11520 } 11478 11521 } 11479 11522 $ctext insert end "[mc "Tag"]: $tag\n" bold ··· 11536 11579 } 11537 11580 11538 11581 proc mkfontdisp {font top which} { 11539 - global fontattr fontpref $font NS use_ttk 11582 + global fontattr fontpref $font 11540 11583 11541 11584 set fontpref($font) [set $font] 11542 - ${NS}::button $top.${font}but -text $which \ 11585 + ttk::button $top.${font}but -text $which \ 11543 11586 -command [list choosefont $font $which] 11544 - ${NS}::label $top.$font -relief flat -font $font \ 11587 + ttk::label $top.$font -relief flat -font $font \ 11545 11588 -text $fontattr($font,family) -justify left 11546 11589 grid x $top.${font}but $top.$font -sticky w 11547 11590 } 11548 11591 11549 - proc choosefont {font which} { 11550 - global fontparam fontlist fonttop fontattr 11551 - global prefstop NS 11552 - 11553 - set fontparam(which) $which 11554 - set fontparam(font) $font 11555 - set fontparam(family) [font actual $font -family] 11556 - set fontparam(size) $fontattr($font,size) 11557 - set fontparam(weight) $fontattr($font,weight) 11558 - set fontparam(slant) $fontattr($font,slant) 11559 - set top .gitkfont 11560 - set fonttop $top 11561 - if {![winfo exists $top]} { 11562 - font create sample 11563 - eval font config sample [font actual $font] 11564 - ttk_toplevel $top 11565 - make_transient $top $prefstop 11566 - wm title $top [mc "Gitk font chooser"] 11567 - ${NS}::label $top.l -textvariable fontparam(which) 11568 - pack $top.l -side top 11569 - set fontlist [lsort [font families]] 11570 - ${NS}::frame $top.f 11571 - listbox $top.f.fam -listvariable fontlist \ 11572 - -yscrollcommand [list $top.f.sb set] 11573 - bind $top.f.fam <<ListboxSelect>> selfontfam 11574 - ${NS}::scrollbar $top.f.sb -command [list $top.f.fam yview] 11575 - pack $top.f.sb -side right -fill y 11576 - pack $top.f.fam -side left -fill both -expand 1 11577 - pack $top.f -side top -fill both -expand 1 11578 - ${NS}::frame $top.g 11579 - spinbox $top.g.size -from 4 -to 40 -width 4 \ 11580 - -textvariable fontparam(size) \ 11581 - -validatecommand {string is integer -strict %s} 11582 - checkbutton $top.g.bold -padx 5 \ 11583 - -font {{Times New Roman} 12 bold} -text [mc "B"] -indicatoron 0 \ 11584 - -variable fontparam(weight) -onvalue bold -offvalue normal 11585 - checkbutton $top.g.ital -padx 5 \ 11586 - -font {{Times New Roman} 12 italic} -text [mc "I"] -indicatoron 0 \ 11587 - -variable fontparam(slant) -onvalue italic -offvalue roman 11588 - pack $top.g.size $top.g.bold $top.g.ital -side left 11589 - pack $top.g -side top 11590 - canvas $top.c -width 150 -height 50 -border 2 -relief sunk \ 11591 - -background white 11592 - $top.c create text 100 25 -anchor center -text $which -font sample \ 11593 - -fill black -tags text 11594 - bind $top.c <Configure> [list centertext $top.c] 11595 - pack $top.c -side top -fill x 11596 - ${NS}::frame $top.buts 11597 - ${NS}::button $top.buts.ok -text [mc "OK"] -command fontok -default active 11598 - ${NS}::button $top.buts.can -text [mc "Cancel"] -command fontcan -default normal 11599 - bind $top <Key-Return> fontok 11600 - bind $top <Key-Escape> fontcan 11601 - grid $top.buts.ok $top.buts.can 11602 - grid columnconfigure $top.buts 0 -weight 1 -uniform a 11603 - grid columnconfigure $top.buts 1 -weight 1 -uniform a 11604 - pack $top.buts -side bottom -fill x 11605 - trace add variable fontparam write chg_fontparam 11606 - } else { 11607 - raise $top 11608 - $top.c itemconf text -text $which 11609 - } 11610 - set i [lsearch -exact $fontlist $fontparam(family)] 11611 - if {$i >= 0} { 11612 - $top.f.fam selection set $i 11613 - $top.f.fam see $i 11614 - } 11615 - } 11616 - 11617 11592 proc centertext {w} { 11618 11593 $w coords text [expr {[winfo width $w] / 2}] [expr {[winfo height $w] / 2}] 11619 11594 } ··· 11646 11621 } 11647 11622 } 11648 11623 11649 - if {[package vsatisfies [package provide Tk] 8.6]} { 11650 - # In Tk 8.6 we have a native font chooser dialog. Overwrite the above 11651 - # function to make use of it. 11652 - proc choosefont {font which} { 11653 - tk fontchooser configure -title $which -font $font \ 11654 - -command [list on_choosefont $font $which] 11655 - tk fontchooser show 11656 - } 11657 - proc on_choosefont {font which newfont} { 11658 - global fontparam 11659 - puts stderr "$font $newfont" 11660 - array set f [font actual $newfont] 11661 - set fontparam(which) $which 11662 - set fontparam(font) $font 11663 - set fontparam(family) $f(-family) 11664 - set fontparam(size) $f(-size) 11665 - set fontparam(weight) $f(-weight) 11666 - set fontparam(slant) $f(-slant) 11667 - fontok 11668 - } 11624 + proc choosefont {font which} { 11625 + tk fontchooser configure -title $which -font $font \ 11626 + -command [list on_choosefont $font $which] 11627 + tk fontchooser show 11628 + } 11629 + proc on_choosefont {font which newfont} { 11630 + global fontparam 11631 + array set f [font actual $newfont] 11632 + set fontparam(which) $which 11633 + set fontparam(font) $font 11634 + set fontparam(family) $f(-family) 11635 + set fontparam(size) $f(-size) 11636 + set fontparam(weight) $f(-weight) 11637 + set fontparam(slant) $f(-slant) 11638 + fontok 11669 11639 } 11670 11640 11671 11641 proc selfontfam {} { ··· 11685 11655 11686 11656 # Create a property sheet tab page 11687 11657 proc create_prefs_page {w} { 11688 - global NS 11689 - set parent [join [lrange [split $w .] 0 end-1] .] 11690 - if {[winfo class $parent] eq "TNotebook"} { 11691 - ${NS}::frame $w 11692 - } else { 11693 - ${NS}::labelframe $w 11694 - } 11658 + ttk::frame $w 11695 11659 } 11696 11660 11697 11661 proc prefspage_general {notebook} { 11698 - global NS maxwidth maxgraphpct showneartags showlocalchanges 11699 - global tabstop wrapcomment wrapdefault limitdiffs 11700 - global autocopy autoselect autosellen extdifftool perfile_attrs 11701 - global hideremotes refstohide want_ttk have_ttk maxrefs web_browser 11662 + global {*}$::config_variables 11663 + global hashlength 11702 11664 11703 11665 set page [create_prefs_page $notebook.general] 11704 11666 11705 - ${NS}::label $page.ldisp -text [mc "Commit list display options"] -font mainfontbold 11667 + ttk::label $page.ldisp -text [mc "Commit list display options"] -font mainfontbold 11706 11668 grid $page.ldisp - -sticky w -pady 10 11707 - ${NS}::label $page.spacer -text " " 11708 - ${NS}::label $page.maxwidthl -text [mc "Maximum graph width (lines)"] 11669 + ttk::label $page.spacer -text " " 11670 + ttk::label $page.maxwidthl -text [mc "Maximum graph width (lines)"] 11709 11671 spinbox $page.maxwidth -from 0 -to 100 -width 4 -textvariable maxwidth 11710 11672 grid $page.spacer $page.maxwidthl $page.maxwidth -sticky w 11711 11673 #xgettext:no-tcl-format 11712 - ${NS}::label $page.maxpctl -text [mc "Maximum graph width (% of pane)"] 11674 + ttk::label $page.maxpctl -text [mc "Maximum graph width (% of pane)"] 11713 11675 spinbox $page.maxpct -from 1 -to 100 -width 4 -textvariable maxgraphpct 11714 11676 grid x $page.maxpctl $page.maxpct -sticky w 11715 - ${NS}::checkbutton $page.showlocal -text [mc "Show local changes"] \ 11677 + ttk::checkbutton $page.showlocal -text [mc "Show local changes"] \ 11716 11678 -variable showlocalchanges 11717 11679 grid x $page.showlocal -sticky w 11718 - ${NS}::checkbutton $page.hideremotes -text [mc "Hide remote refs"] \ 11680 + ttk::checkbutton $page.hideremotes -text [mc "Hide remote refs"] \ 11719 11681 -variable hideremotes 11720 11682 grid x $page.hideremotes -sticky w 11721 11683 11722 - ${NS}::entry $page.refstohide -textvariable refstohide 11723 - ${NS}::frame $page.refstohidef 11724 - ${NS}::label $page.refstohidef.l -text [mc "Refs to hide (space-separated)" ] 11684 + ttk::entry $page.refstohide -textvariable refstohide 11685 + ttk::frame $page.refstohidef 11686 + ttk::label $page.refstohidef.l -text [mc "Refs to hide (space-separated)" ] 11725 11687 pack $page.refstohidef.l -side left 11726 11688 pack configure $page.refstohidef.l -padx 10 11727 11689 grid x $page.refstohidef $page.refstohide -sticky ew 11728 11690 11729 - ${NS}::checkbutton $page.autocopy -text [mc "Copy commit ID to clipboard"] \ 11691 + ttk::checkbutton $page.autocopy -text [mc "Copy commit ID to clipboard"] \ 11730 11692 -variable autocopy 11731 11693 grid x $page.autocopy -sticky w 11732 11694 if {[haveselectionclipboard]} { 11733 - ${NS}::checkbutton $page.autoselect -text [mc "Copy commit ID to X11 selection"] \ 11695 + ttk::checkbutton $page.autoselect -text [mc "Copy commit ID to X11 selection"] \ 11734 11696 -variable autoselect 11735 11697 grid x $page.autoselect -sticky w 11736 11698 } 11737 - spinbox $page.autosellen -from 1 -to 40 -width 4 -textvariable autosellen 11738 - ${NS}::label $page.autosellenl -text [mc "Length of commit ID to copy"] 11699 + 11700 + spinbox $page.autosellen -from 1 -to $hashlength -width 4 -textvariable autosellen 11701 + ttk::label $page.autosellenl -text [mc "Length of commit ID to copy"] 11739 11702 grid x $page.autosellenl $page.autosellen -sticky w 11703 + ttk::label $page.kscroll1 -text [mc "Wheel scrolling multiplier"] 11704 + spinbox $page.kscroll -from 1 -to 20 -width 4 -textvariable kscroll 11705 + grid x $page.kscroll1 $page.kscroll -sticky w 11740 11706 11741 - ${NS}::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold 11707 + ttk::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold 11742 11708 grid $page.ddisp - -sticky w -pady 10 11743 - ${NS}::label $page.tabstopl -text [mc "Tab spacing"] 11709 + ttk::label $page.tabstopl -text [mc "Tab spacing"] 11744 11710 spinbox $page.tabstop -from 1 -to 20 -width 4 -textvariable tabstop 11745 11711 grid x $page.tabstopl $page.tabstop -sticky w 11746 11712 11747 - ${NS}::label $page.wrapcommentl -text [mc "Wrap comment text"] 11748 - ${NS}::combobox $page.wrapcomment -values {none char word} -state readonly \ 11749 - -textvariable wrapcomment 11713 + ttk::label $page.wrapcommentl -text [mc "Wrap comment text"] 11714 + makedroplist $page.wrapcomment wrapcomment none char word 11750 11715 grid x $page.wrapcommentl $page.wrapcomment -sticky w 11751 11716 11752 - ${NS}::label $page.wrapdefaultl -text [mc "Wrap other text"] 11753 - ${NS}::combobox $page.wrapdefault -values {none char word} -state readonly \ 11754 - -textvariable wrapdefault 11717 + ttk::label $page.wrapdefaultl -text [mc "Wrap other text"] 11718 + makedroplist $page.wrapdefault wrapdefault none char word 11755 11719 grid x $page.wrapdefaultl $page.wrapdefault -sticky w 11756 11720 11757 - ${NS}::checkbutton $page.ntag -text [mc "Display nearby tags/heads"] \ 11721 + ttk::checkbutton $page.ntag -text [mc "Display nearby tags/heads"] \ 11758 11722 -variable showneartags 11759 11723 grid x $page.ntag -sticky w 11760 - ${NS}::label $page.maxrefsl -text [mc "Maximum # tags/heads to show"] 11724 + ttk::label $page.maxrefsl -text [mc "Maximum # tags/heads to show"] 11761 11725 spinbox $page.maxrefs -from 1 -to 1000 -width 4 -textvariable maxrefs 11762 11726 grid x $page.maxrefsl $page.maxrefs -sticky w 11763 - ${NS}::checkbutton $page.ldiff -text [mc "Limit diffs to listed paths"] \ 11727 + ttk::checkbutton $page.ldiff -text [mc "Limit diffs to listed paths"] \ 11764 11728 -variable limitdiffs 11765 11729 grid x $page.ldiff -sticky w 11766 - ${NS}::checkbutton $page.lattr -text [mc "Support per-file encodings"] \ 11730 + ttk::checkbutton $page.lattr -text [mc "Support per-file encodings"] \ 11767 11731 -variable perfile_attrs 11768 11732 grid x $page.lattr -sticky w 11769 11733 11770 - ${NS}::entry $page.extdifft -textvariable extdifftool 11771 - ${NS}::frame $page.extdifff 11772 - ${NS}::label $page.extdifff.l -text [mc "External diff tool" ] 11773 - ${NS}::button $page.extdifff.b -text [mc "Choose..."] -command choose_extdiff 11734 + ttk::entry $page.extdifft -textvariable extdifftool 11735 + ttk::frame $page.extdifff 11736 + ttk::label $page.extdifff.l -text [mc "External diff tool" ] 11737 + ttk::button $page.extdifff.b -text [mc "Choose..."] -command choose_extdiff 11774 11738 pack $page.extdifff.l $page.extdifff.b -side left 11775 11739 pack configure $page.extdifff.l -padx 10 11776 11740 grid x $page.extdifff $page.extdifft -sticky ew 11777 11741 11778 - ${NS}::entry $page.webbrowser -textvariable web_browser 11779 - ${NS}::frame $page.webbrowserf 11780 - ${NS}::label $page.webbrowserf.l -text [mc "Web browser" ] 11742 + ttk::entry $page.webbrowser -textvariable web_browser 11743 + ttk::frame $page.webbrowserf 11744 + ttk::label $page.webbrowserf.l -text [mc "Web browser" ] 11781 11745 pack $page.webbrowserf.l -side left 11782 11746 pack configure $page.webbrowserf.l -padx 10 11783 11747 grid x $page.webbrowserf $page.webbrowser -sticky ew 11784 11748 11785 - ${NS}::label $page.lgen -text [mc "General options"] -font mainfontbold 11786 - grid $page.lgen - -sticky w -pady 10 11787 - ${NS}::checkbutton $page.want_ttk -variable want_ttk \ 11788 - -text [mc "Use themed widgets"] 11789 - if {$have_ttk} { 11790 - ${NS}::label $page.ttk_note -text [mc "(change requires restart)"] 11791 - } else { 11792 - ${NS}::label $page.ttk_note -text [mc "(currently unavailable)"] 11793 - } 11794 - grid x $page.want_ttk $page.ttk_note -sticky w 11795 11749 return $page 11796 11750 } 11797 11751 11798 11752 proc prefspage_colors {notebook} { 11799 - global NS uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor 11753 + global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor 11800 11754 global diffbgcolors 11801 11755 11802 11756 set page [create_prefs_page $notebook.colors] 11803 11757 11804 - ${NS}::label $page.cdisp -text [mc "Colors: press to choose"] -font mainfontbold 11758 + ttk::label $page.cdisp -text [mc "Colors: press to choose"] -font mainfontbold 11805 11759 grid $page.cdisp - -sticky w -pady 10 11806 11760 label $page.ui -padx 40 -relief sunk -background $uicolor 11807 - ${NS}::button $page.uibut -text [mc "Interface"] \ 11808 - -command [list choosecolor uicolor {} $page.ui [mc "interface"] setui] 11761 + ttk::button $page.uibut -text [mc "Interface"] \ 11762 + -command [list choosecolor uicolor {} $page [mc "interface"]] 11809 11763 grid x $page.uibut $page.ui -sticky w 11810 11764 label $page.bg -padx 40 -relief sunk -background $bgcolor 11811 - ${NS}::button $page.bgbut -text [mc "Background"] \ 11812 - -command [list choosecolor bgcolor {} $page.bg [mc "background"] setbg] 11765 + ttk::button $page.bgbut -text [mc "Background"] \ 11766 + -command [list choosecolor bgcolor {} $page [mc "background"]] 11813 11767 grid x $page.bgbut $page.bg -sticky w 11814 11768 label $page.fg -padx 40 -relief sunk -background $fgcolor 11815 - ${NS}::button $page.fgbut -text [mc "Foreground"] \ 11816 - -command [list choosecolor fgcolor {} $page.fg [mc "foreground"] setfg] 11769 + ttk::button $page.fgbut -text [mc "Foreground"] \ 11770 + -command [list choosecolor fgcolor {} $page [mc "foreground"]] 11817 11771 grid x $page.fgbut $page.fg -sticky w 11818 11772 label $page.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0] 11819 - ${NS}::button $page.diffoldbut -text [mc "Diff: old lines"] \ 11820 - -command [list choosecolor diffcolors 0 $page.diffold [mc "diff old lines"] \ 11821 - [list $ctext tag conf d0 -foreground]] 11773 + ttk::button $page.diffoldbut -text [mc "Diff: old lines"] \ 11774 + -command [list choosecolor diffcolors 0 $page [mc "diff old lines"]] 11822 11775 grid x $page.diffoldbut $page.diffold -sticky w 11823 11776 label $page.diffoldbg -padx 40 -relief sunk -background [lindex $diffbgcolors 0] 11824 - ${NS}::button $page.diffoldbgbut -text [mc "Diff: old lines bg"] \ 11825 - -command [list choosecolor diffbgcolors 0 $page.diffoldbg \ 11826 - [mc "diff old lines bg"] \ 11827 - [list $ctext tag conf d0 -background]] 11777 + ttk::button $page.diffoldbgbut -text [mc "Diff: old lines bg"] \ 11778 + -command [list choosecolor diffbgcolors 0 $page [mc "diff old lines bg"]] 11828 11779 grid x $page.diffoldbgbut $page.diffoldbg -sticky w 11829 11780 label $page.diffnew -padx 40 -relief sunk -background [lindex $diffcolors 1] 11830 - ${NS}::button $page.diffnewbut -text [mc "Diff: new lines"] \ 11831 - -command [list choosecolor diffcolors 1 $page.diffnew [mc "diff new lines"] \ 11832 - [list $ctext tag conf dresult -foreground]] 11781 + ttk::button $page.diffnewbut -text [mc "Diff: new lines"] \ 11782 + -command [list choosecolor diffcolors 1 $page [mc "diff new lines"]] 11833 11783 grid x $page.diffnewbut $page.diffnew -sticky w 11834 11784 label $page.diffnewbg -padx 40 -relief sunk -background [lindex $diffbgcolors 1] 11835 - ${NS}::button $page.diffnewbgbut -text [mc "Diff: new lines bg"] \ 11836 - -command [list choosecolor diffbgcolors 1 $page.diffnewbg \ 11837 - [mc "diff new lines bg"] \ 11838 - [list $ctext tag conf dresult -background]] 11785 + ttk::button $page.diffnewbgbut -text [mc "Diff: new lines bg"] \ 11786 + -command [list choosecolor diffbgcolors 1 $page [mc "diff new lines bg"]] 11839 11787 grid x $page.diffnewbgbut $page.diffnewbg -sticky w 11840 11788 label $page.hunksep -padx 40 -relief sunk -background [lindex $diffcolors 2] 11841 - ${NS}::button $page.hunksepbut -text [mc "Diff: hunk header"] \ 11842 - -command [list choosecolor diffcolors 2 $page.hunksep \ 11843 - [mc "diff hunk header"] \ 11844 - [list $ctext tag conf hunksep -foreground]] 11789 + ttk::button $page.hunksepbut -text [mc "Diff: hunk header"] \ 11790 + -command [list choosecolor diffcolors 2 $page [mc "diff hunk header"]] 11845 11791 grid x $page.hunksepbut $page.hunksep -sticky w 11846 11792 label $page.markbgsep -padx 40 -relief sunk -background $markbgcolor 11847 - ${NS}::button $page.markbgbut -text [mc "Marked line bg"] \ 11848 - -command [list choosecolor markbgcolor {} $page.markbgsep \ 11849 - [mc "marked line background"] \ 11850 - [list $ctext tag conf omark -background]] 11793 + ttk::button $page.markbgbut -text [mc "Marked line bg"] \ 11794 + -command [list choosecolor markbgcolor {} $page [mc "marked line background"]] 11851 11795 grid x $page.markbgbut $page.markbgsep -sticky w 11852 11796 label $page.selbgsep -padx 40 -relief sunk -background $selectbgcolor 11853 - ${NS}::button $page.selbgbut -text [mc "Select bg"] \ 11854 - -command [list choosecolor selectbgcolor {} $page.selbgsep [mc "background"] setselbg] 11797 + ttk::button $page.selbgbut -text [mc "Select bg"] \ 11798 + -command [list choosecolor selectbgcolor {} $page [mc "background"]] 11855 11799 grid x $page.selbgbut $page.selbgsep -sticky w 11856 11800 return $page 11801 + } 11802 + 11803 + proc prefspage_set_colorswatches {page} { 11804 + global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor 11805 + global diffbgcolors 11806 + 11807 + $page.ui configure -background $uicolor 11808 + $page.bg configure -background $bgcolor 11809 + $page.fg configure -background $fgcolor 11810 + $page.diffold configure -background [lindex $diffcolors 0] 11811 + $page.diffoldbg configure -background [lindex $diffbgcolors 0] 11812 + $page.diffnew configure -background [lindex $diffcolors 1] 11813 + $page.diffnewbg configure -background [lindex $diffbgcolors 1] 11814 + $page.hunksep configure -background [lindex $diffcolors 2] 11815 + $page.markbgsep configure -background $markbgcolor 11816 + $page.selbgsep configure -background $selectbgcolor 11857 11817 } 11858 11818 11859 11819 proc prefspage_fonts {notebook} { 11860 - global NS 11861 11820 set page [create_prefs_page $notebook.fonts] 11862 - ${NS}::label $page.cfont -text [mc "Fonts: press to choose"] -font mainfontbold 11821 + ttk::label $page.cfont -text [mc "Fonts: press to choose"] -font mainfontbold 11863 11822 grid $page.cfont - -sticky w -pady 10 11864 11823 mkfontdisp mainfont $page [mc "Main font"] 11865 11824 mkfontdisp textfont $page [mc "Diff display font"] ··· 11868 11827 } 11869 11828 11870 11829 proc doprefs {} { 11871 - global maxwidth maxgraphpct use_ttk NS 11872 - global oldprefs prefstop showneartags showlocalchanges 11873 - global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor 11874 - global tabstop limitdiffs autoselect autosellen extdifftool perfile_attrs 11875 - global hideremotes refstohide want_ttk have_ttk wrapcomment wrapdefault 11830 + global oldprefs prefstop 11831 + global {*}$::config_variables 11876 11832 11877 11833 set top .gitkprefs 11878 11834 set prefstop $top ··· 11880 11836 raise $top 11881 11837 return 11882 11838 } 11883 - foreach v {maxwidth maxgraphpct showneartags showlocalchanges \ 11884 - limitdiffs tabstop perfile_attrs hideremotes refstohide \ 11885 - want_ttk wrapcomment wrapdefault} { 11839 + foreach v $::config_variables { 11886 11840 set oldprefs($v) [set $v] 11887 11841 } 11888 11842 ttk_toplevel $top 11889 11843 wm title $top [mc "Gitk preferences"] 11890 11844 make_transient $top . 11891 11845 11892 - if {[set use_notebook [expr {$use_ttk && [info command ::ttk::notebook] ne ""}]]} { 11893 - set notebook [ttk::notebook $top.notebook] 11894 - } else { 11895 - set notebook [${NS}::frame $top.notebook -borderwidth 0 -relief flat] 11896 - } 11846 + set notebook [ttk::notebook $top.notebook] 11897 11847 11898 11848 lappend pages [prefspage_general $notebook] [mc "General"] 11899 11849 lappend pages [prefspage_colors $notebook] [mc "Colors"] 11900 11850 lappend pages [prefspage_fonts $notebook] [mc "Fonts"] 11901 11851 set col 0 11902 11852 foreach {page title} $pages { 11903 - if {$use_notebook} { 11904 - $notebook add $page -text $title 11905 - } else { 11906 - set btn [${NS}::button $notebook.b_[string map {. X} $page] \ 11907 - -text $title -command [list raise $page]] 11908 - $page configure -text $title 11909 - grid $btn -row 0 -column [incr col] -sticky w 11910 - grid $page -row 1 -column 0 -sticky news -columnspan 100 11911 - } 11853 + $notebook add $page -text $title 11912 11854 } 11913 11855 11914 - if {!$use_notebook} { 11915 - grid columnconfigure $notebook 0 -weight 1 11916 - grid rowconfigure $notebook 1 -weight 1 11917 - raise [lindex $pages 0] 11918 - } 11856 + grid columnconfigure $notebook 0 -weight 1 11857 + grid rowconfigure $notebook 1 -weight 1 11858 + raise [lindex $pages 0] 11919 11859 11920 11860 grid $notebook -sticky news -padx 2 -pady 2 11921 11861 grid rowconfigure $top 0 -weight 1 11922 11862 grid columnconfigure $top 0 -weight 1 11923 11863 11924 - ${NS}::frame $top.buts 11925 - ${NS}::button $top.buts.ok -text [mc "OK"] -command prefsok -default active 11926 - ${NS}::button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal 11864 + ttk::frame $top.buts 11865 + ttk::button $top.buts.ok -text [mc "OK"] -command prefsok -default active 11866 + ttk::button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal 11927 11867 bind $top <Key-Return> prefsok 11928 11868 bind $top <Key-Escape> prefscan 11929 11869 grid $top.buts.ok $top.buts.can ··· 11943 11883 } 11944 11884 } 11945 11885 11946 - proc choosecolor {v vi w x cmd} { 11886 + proc choosecolor {v vi prefspage x} { 11947 11887 global $v 11948 11888 11949 11889 set c [tk_chooseColor -initialcolor [lindex [set $v] $vi] \ 11950 11890 -title [mc "Gitk: choose color for %s" $x]] 11951 11891 if {$c eq {}} return 11952 - $w conf -background $c 11953 11892 lset $v $vi $c 11954 - eval $cmd $c 11893 + set_gui_colors 11894 + prefspage_set_colorswatches $prefspage 11955 11895 } 11956 11896 11957 11897 proc setselbg {c} { ··· 12004 11944 $canv itemconf markid -outline $c 12005 11945 } 12006 11946 11947 + proc set_gui_colors {} { 11948 + global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor 11949 + global diffbgcolors 11950 + 11951 + setui $uicolor 11952 + setbg $bgcolor 11953 + setfg $fgcolor 11954 + $ctext tag conf d0 -foreground [lindex $diffcolors 0] 11955 + $ctext tag conf d0 -background [lindex $diffbgcolors 0] 11956 + $ctext tag conf dresult -foreground [lindex $diffcolors 1] 11957 + $ctext tag conf dresult -background [lindex $diffbgcolors 1] 11958 + $ctext tag conf hunksep -foreground [lindex $diffcolors 2] 11959 + $ctext tag conf omark -background $markbgcolor 11960 + setselbg $selectbgcolor 11961 + } 11962 + 12007 11963 proc prefscan {} { 12008 11964 global oldprefs prefstop 11965 + global {*}$::config_variables 12009 11966 12010 - foreach v {maxwidth maxgraphpct showneartags showlocalchanges \ 12011 - limitdiffs tabstop perfile_attrs hideremotes refstohide \ 12012 - want_ttk wrapcomment wrapdefault} { 12013 - global $v 11967 + foreach v $::config_variables { 12014 11968 set $v $oldprefs($v) 12015 11969 } 12016 11970 catch {destroy $prefstop} 12017 11971 unset prefstop 12018 11972 fontcan 11973 + set_gui_colors 12019 11974 } 12020 11975 12021 11976 proc prefsok {} { 12022 - global maxwidth maxgraphpct 12023 - global oldprefs prefstop showneartags showlocalchanges 12024 - global fontpref mainfont textfont uifont 12025 - global limitdiffs treediffs perfile_attrs 12026 - global hideremotes refstohide wrapcomment wrapdefault 11977 + global oldprefs prefstop fontpref treediffs 11978 + global {*}$::config_variables 12027 11979 global ctext 12028 11980 12029 11981 catch {destroy $prefstop} ··· 12395 12347 set r $path_attr_cache($attr,$path) 12396 12348 } else { 12397 12349 set r "unspecified" 12398 - if {![catch {set line [exec git check-attr $attr -- $path]}]} { 12350 + if {![catch {set line [safe_exec [list git check-attr $attr -- $path]]}]} { 12399 12351 regexp "(.*): $attr: (.*)" $line m f r 12400 12352 } 12401 12353 set path_attr_cache($attr,$path) $r ··· 12422 12374 while {$newlist ne {}} { 12423 12375 set head [lrange $newlist 0 [expr {$lim - 1}]] 12424 12376 set newlist [lrange $newlist $lim end] 12425 - if {![catch {set rlist [eval exec git check-attr $attr -- $head]}]} { 12377 + if {![catch {set rlist [safe_exec [concat git check-attr $attr -- $head]]}]} { 12426 12378 foreach row [split $rlist "\n"] { 12427 12379 if {[regexp "(.*): $attr: (.*)" $row m path value]} { 12428 12380 if {[string index $path 0] eq "\""} { 12429 - set path [encoding convertfrom utf-8 [lindex $path 0]] 12381 + set path [convertfrom utf-8 [lindex $path 0]] 12430 12382 } 12431 12383 set path_attr_cache($attr,$path) $value 12432 12384 } ··· 12482 12434 ## And eventually load the actual message catalog 12483 12435 ::msgcat::mcload $gitk_msgsdir 12484 12436 12485 - # First check that Tcl/Tk is recent enough 12486 - if {[catch {package require Tk 8.4} err]} { 12487 - show_error {} . [mc "Sorry, gitk cannot run with this version of Tcl/Tk.\n\ 12488 - Gitk requires at least Tcl/Tk 8.4."] 12489 - exit 1 12490 - } 12491 - 12492 12437 # on OSX bring the current Wish process window to front 12493 12438 if {[tk windowingsystem] eq "aqua"} { 12494 - exec osascript -e [format { 12439 + safe_exec [list osascript -e [format { 12495 12440 tell application "System Events" 12496 12441 set frontmost of processes whose unix id is %d to true 12497 12442 end tell 12498 - } [pid] ] 12443 + } [pid] ]] 12499 12444 } 12500 12445 12501 12446 # Unset GIT_TRACE var if set ··· 12534 12479 } 12535 12480 } 12536 12481 12482 + # Use object format as hash algorightm (either "sha1" or "sha256") 12483 + set hashalgorithm [exec git rev-parse --show-object-format] 12484 + if {$hashalgorithm eq "sha1"} { 12485 + set hashlength 40 12486 + } elseif {$hashalgorithm eq "sha256"} { 12487 + set hashlength 64 12488 + } else { 12489 + puts stderr "Unknown hash algorithm: $hashalgorithm" 12490 + exit 1 12491 + } 12492 + 12537 12493 set log_showroot true 12538 12494 catch { 12539 12495 set log_showroot [exec git config --bool --get log.showroot] ··· 12568 12524 set showneartags 1 12569 12525 set hideremotes 0 12570 12526 set refstohide "" 12527 + set sortrefsbytype 1 12571 12528 set maxrefs 20 12572 12529 set visiblerefs {"master"} 12573 12530 set maxlinelen 200 12574 12531 set showlocalchanges 1 12575 12532 set limitdiffs 1 12533 + set kscroll 3 12576 12534 set datetimeformat "%Y-%m-%d %H:%M:%S" 12577 12535 set autocopy 0 12578 12536 set autoselect 1 12579 - set autosellen 40 12537 + set autosellen $hashlength 12580 12538 set perfile_attrs 0 12581 - set want_ttk 1 12582 12539 12583 12540 if {[tk windowingsystem] eq "aqua"} { 12584 12541 set extdifftool "opendiff" ··· 12654 12611 set config_file_tmp [file join $env(XDG_CONFIG_HOME) git gitk-tmp] 12655 12612 } else { 12656 12613 # default XDG_CONFIG_HOME 12657 - set config_file "~/.config/git/gitk" 12658 - set config_file_tmp "~/.config/git/gitk-tmp" 12614 + set config_file "$env(HOME)/.config/git/gitk" 12615 + set config_file_tmp "$env(HOME)/.config/git/gitk-tmp" 12659 12616 } 12660 12617 if {![file exists $config_file]} { 12661 12618 # for backward compatibility use the old config file if it exists 12662 - if {[file exists "~/.gitk"]} { 12663 - set config_file "~/.gitk" 12664 - set config_file_tmp "~/.gitk-tmp" 12619 + if {[file exists "$env(HOME)/.gitk"]} { 12620 + set config_file "$env(HOME)/.gitk" 12621 + set config_file_tmp "$env(HOME)/.gitk-tmp" 12665 12622 } elseif {![file exists [file dirname $config_file]]} { 12666 12623 file mkdir [file dirname $config_file] 12667 12624 } ··· 12671 12628 config_check_tmp_exists 50 12672 12629 12673 12630 set config_variables { 12674 - mainfont textfont uifont tabstop findmergefiles maxgraphpct maxwidth 12675 - cmitmode wrapcomment wrapdefault autocopy autoselect autosellen 12676 - showneartags maxrefs visiblerefs 12677 - hideremotes refstohide showlocalchanges datetimeformat limitdiffs uicolor want_ttk 12678 - bgcolor fgcolor uifgcolor uifgdisabledcolor colors diffcolors mergecolors 12679 - markbgcolor diffcontext selectbgcolor foundbgcolor currentsearchhitbgcolor 12680 - extdifftool perfile_attrs headbgcolor headfgcolor headoutlinecolor 12681 - remotebgcolor tagbgcolor tagfgcolor tagoutlinecolor reflinecolor 12682 - filesepbgcolor filesepfgcolor linehoverbgcolor linehoverfgcolor 12683 - linehoveroutlinecolor mainheadcirclecolor workingfilescirclecolor 12684 - indexcirclecolor circlecolors linkfgcolor circleoutlinecolor diffbgcolors 12631 + autocopy 12632 + autoselect 12633 + autosellen 12634 + bgcolor 12635 + circlecolors 12636 + circleoutlinecolor 12637 + cmitmode 12638 + colors 12639 + currentsearchhitbgcolor 12640 + datetimeformat 12641 + diffbgcolors 12642 + diffcolors 12643 + diffcontext 12644 + extdifftool 12645 + fgcolor 12646 + filesepbgcolor 12647 + filesepfgcolor 12648 + findmergefiles 12649 + foundbgcolor 12650 + headbgcolor 12651 + headfgcolor 12652 + headoutlinecolor 12653 + hideremotes 12654 + indexcirclecolor 12655 + kscroll 12656 + limitdiffs 12657 + linehoverbgcolor 12658 + linehoverfgcolor 12659 + linehoveroutlinecolor 12660 + linkfgcolor 12661 + mainfont 12662 + mainheadcirclecolor 12663 + markbgcolor 12664 + maxgraphpct 12665 + maxrefs 12666 + maxwidth 12667 + mergecolors 12668 + perfile_attrs 12669 + reflinecolor 12670 + refstohide 12671 + remotebgcolor 12672 + selectbgcolor 12673 + showlocalchanges 12674 + showneartags 12675 + sortrefsbytype 12676 + tabstop 12677 + tagbgcolor 12678 + tagfgcolor 12679 + tagoutlinecolor 12680 + textfont 12681 + uicolor 12682 + uifgcolor 12683 + uifgdisabledcolor 12684 + uifont 12685 + visiblerefs 12685 12686 web_browser 12687 + workingfilescirclecolor 12688 + wrapcomment 12689 + wrapdefault 12686 12690 } 12691 + 12687 12692 foreach var $config_variables { 12688 12693 config_init_trace $var 12689 12694 trace add variable $var write config_variable_change_cb ··· 12699 12704 12700 12705 parsefont uifont $uifont 12701 12706 eval font create uifont [fontflags uifont] 12702 - 12703 - setui $uicolor 12704 12707 12705 12708 setoptions 12706 12709 ··· 12744 12747 if {$i >= [llength $argv] && $revtreeargs ne {}} { 12745 12748 # no -- on command line, but some arguments (other than --argscmd) 12746 12749 if {[catch { 12747 - set f [eval exec git rev-parse --no-revs --no-flags $revtreeargs] 12750 + set f [safe_exec [concat git rev-parse --no-revs --no-flags $revtreeargs]] 12748 12751 set cmdline_files [split $f "\n"] 12749 12752 set n [llength $cmdline_files] 12750 12753 set revtreeargs [lrange $revtreeargs 0 end-$n] ··· 12774 12777 set nullid2 "0000000000000000000000000000000000000001" 12775 12778 set nullfile "/dev/null" 12776 12779 12777 - set have_tk85 [expr {[package vcompare $tk_version "8.5"] >= 0}] 12778 - set have_tk86 [expr {[package vcompare $tk_version "8.6"] >= 0}] 12779 - if {![info exists have_ttk]} { 12780 - set have_ttk [llength [info commands ::ttk::style]] 12781 - } 12782 - set use_ttk [expr {$have_ttk && $want_ttk}] 12783 - set NS [expr {$use_ttk ? "ttk" : ""}] 12784 - 12785 - if {$use_ttk} { 12786 - setttkstyle 12787 - } 12788 - 12789 - regexp {^git version ([\d.]*\d)} [exec git version] _ git_version 12790 - 12791 - set show_notes {} 12792 - if {[package vcompare $git_version "1.6.6.2"] >= 0} { 12793 - set show_notes "--show-notes" 12794 - } 12795 - 12780 + setttkstyle 12796 12781 set appname "gitk" 12797 12782 12798 12783 set runq {} ··· 12907 12892 if {[tk windowingsystem] eq "win32"} { 12908 12893 focus -force . 12909 12894 } 12895 + 12896 + set_gui_colors 12910 12897 12911 12898 getcommits {} 12912 12899
+13 -362
po/bg.po
··· 1 1 # Bulgarian translation of gitk po-file. 2 - # Copyright (C) 2014, 2015, 2019, 2020, 2024 Alexander Shopov <ash@kambanaria.org>. 2 + # Copyright (C) 2014, 2015, 2019, 2020, 2024, 2025 Alexander Shopov <ash@kambanaria.org>. 3 3 # This file is distributed under the same license as the git package. 4 - # Alexander Shopov <ash@kambanaria.org>, 2014, 2015, 2019, 2020, 2024. 4 + # Alexander Shopov <ash@kambanaria.org>, 2014, 2015, 2019, 2020, 2024, 2025. 5 5 # 6 6 # 7 7 msgid "" 8 8 msgstr "" 9 9 "Project-Id-Version: gitk master\n" 10 10 "Report-Msgid-Bugs-To: \n" 11 - "POT-Creation-Date: 2024-12-24 11:01+0100\n" 12 - "PO-Revision-Date: 2024-12-24 11:05+0100\n" 11 + "POT-Creation-Date: 2025-07-22 18:34+0200\n" 12 + "PO-Revision-Date: 2025-07-28 13:38+0200\n" 13 13 "Last-Translator: Alexander Shopov <ash@kambanaria.org>\n" 14 14 "Language-Team: Bulgarian <dict@fsa-bg.org>\n" 15 15 "Language: bg\n" ··· 18 18 "Content-Transfer-Encoding: 8bit\n" 19 19 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 20 20 21 - #: gitk:139 22 21 msgid "Couldn't get list of unmerged files:" 23 22 msgstr "Списъкът с неслети файлове не може да се получи:" 24 23 25 - #: gitk:211 gitk:2430 26 24 msgid "Color words" 27 25 msgstr "Оцветяване на думите" 28 26 29 - #: gitk:216 gitk:2430 gitk:8335 gitk:8368 30 27 msgid "Markup words" 31 28 msgstr "Отбелязване на думите" 32 29 33 - #: gitk:323 34 30 msgid "Error parsing revisions:" 35 31 msgstr "Грешка при анализ на версиите:" 36 32 37 - #: gitk:389 38 33 msgid "Error executing --argscmd command:" 39 34 msgstr "Грешка при изпълнение на командата с „--argscmd“." 40 35 41 - #: gitk:402 42 36 msgid "No files selected: --merge specified but no files are unmerged." 43 37 msgstr "" 44 38 "Не са избрани файлове — указана е опцията „--merge“, но няма неслети файлове." 45 39 46 - #: gitk:405 47 40 msgid "" 48 41 "No files selected: --merge specified but no unmerged files are within file " 49 42 "limit." ··· 51 44 "Не са избрани файлове — указана е опцията „--merge“, но няма неслети файлове " 52 45 "в ограниченията." 53 46 54 - #: gitk:430 gitk:585 55 47 msgid "Error executing git log:" 56 48 msgstr "Грешка при изпълнение на „git log“:" 57 49 58 - #: gitk:448 gitk:601 59 50 msgid "Reading" 60 51 msgstr "Прочитане" 61 52 62 - #: gitk:508 gitk:4596 63 53 msgid "Reading commits..." 64 54 msgstr "Прочитане на подаванията…" 65 55 66 - #: gitk:511 gitk:1660 gitk:4599 67 56 msgid "No commits selected" 68 57 msgstr "Не са избрани подавания" 69 58 70 - #: gitk:1468 gitk:4116 gitk:12738 71 59 msgid "Command line" 72 60 msgstr "Команден ред" 73 61 74 - #: gitk:1534 75 62 msgid "Can't parse git log output:" 76 63 msgstr "Изходът от „git log“ не може да се анализира:" 77 64 78 - #: gitk:1763 79 65 msgid "No commit information available" 80 66 msgstr "Липсва информация за подавания" 81 67 82 - #: gitk:1930 gitk:1959 gitk:4386 gitk:9875 gitk:11485 gitk:11805 83 68 msgid "OK" 84 69 msgstr "Добре" 85 70 86 - #: gitk:1961 gitk:4388 gitk:9311 gitk:9390 gitk:9520 gitk:9606 gitk:9877 87 - #: gitk:11486 gitk:11806 88 71 msgid "Cancel" 89 72 msgstr "Отказ" 90 73 91 - #: gitk:2114 92 74 msgid "&Update" 93 75 msgstr "&Обновяване" 94 76 95 - #: gitk:2115 96 77 msgid "&Reload" 97 78 msgstr "&Презареждане" 98 79 99 - #: gitk:2116 100 80 msgid "Reread re&ferences" 101 81 msgstr "Прочитане &наново" 102 82 103 - #: gitk:2117 104 83 msgid "&List references" 105 84 msgstr "&Изброяване на указателите" 106 85 107 - #: gitk:2119 108 86 msgid "Start git &gui" 109 87 msgstr "&Стартиране на „git gui“" 110 88 111 - #: gitk:2121 112 89 msgid "&Quit" 113 90 msgstr "&Спиране на програмата" 114 91 115 - #: gitk:2113 116 92 msgid "&File" 117 93 msgstr "&Файл" 118 94 119 - #: gitk:2125 120 95 msgid "&Preferences" 121 96 msgstr "&Настройки" 122 97 123 - #: gitk:2124 124 98 msgid "&Edit" 125 99 msgstr "&Редактиране" 126 100 127 - #: gitk:2129 128 101 msgid "&New view..." 129 102 msgstr "&Нов изглед…" 130 103 131 - #: gitk:2130 132 104 msgid "&Edit view..." 133 105 msgstr "&Редактиране на изгледа…" 134 106 135 - #: gitk:2131 136 107 msgid "&Delete view" 137 108 msgstr "&Изтриване на изгледа" 138 109 139 - #: gitk:2133 140 110 msgid "&All files" 141 111 msgstr "&Всички файлове" 142 112 143 - #: gitk:2128 144 113 msgid "&View" 145 114 msgstr "&Изглед" 146 115 147 - #: gitk:2138 gitk:2148 148 116 msgid "&About gitk" 149 117 msgstr "&Относно gitk" 150 118 151 - #: gitk:2139 gitk:2153 152 119 msgid "&Key bindings" 153 120 msgstr "&Клавишни комбинации" 154 121 155 - #: gitk:2137 gitk:2152 156 122 msgid "&Help" 157 123 msgstr "Помо&щ" 158 124 159 - #: gitk:2230 gitk:8767 160 125 msgid "Commit ID:" 161 126 msgstr "Подаване:" 162 127 163 - #: gitk:2274 164 128 msgid "Row" 165 129 msgstr "Ред" 166 130 167 - #: gitk:2312 168 131 msgid "Find" 169 132 msgstr "Търсене" 170 133 171 - #: gitk:2340 172 134 msgid "commit" 173 135 msgstr "подаване" 174 136 175 - #: gitk:2344 gitk:2346 gitk:4758 gitk:4781 gitk:4805 gitk:6826 gitk:6898 176 - #: gitk:6983 177 137 msgid "containing:" 178 138 msgstr "съдържащо:" 179 139 180 - #: gitk:2347 gitk:3597 gitk:3602 gitk:4834 181 140 msgid "touching paths:" 182 141 msgstr "в пътищата:" 183 142 184 - #: gitk:2348 gitk:4848 185 143 msgid "adding/removing string:" 186 144 msgstr "добавящо/премахващо низ" 187 145 188 - #: gitk:2349 gitk:4850 189 146 msgid "changing lines matching:" 190 147 msgstr "променящо редове напасващи:" 191 148 192 - #: gitk:2358 gitk:2360 gitk:4837 193 149 msgid "Exact" 194 150 msgstr "Точно" 195 151 196 - #: gitk:2360 gitk:4925 gitk:6794 197 152 msgid "IgnCase" 198 153 msgstr "Без регистър" 199 154 200 - #: gitk:2360 gitk:4807 gitk:4923 gitk:6790 201 155 msgid "Regexp" 202 156 msgstr "Рег. израз" 203 157 204 - #: gitk:2362 gitk:2363 gitk:4945 gitk:4975 gitk:4982 gitk:6919 gitk:6987 205 158 msgid "All fields" 206 159 msgstr "Всички полета" 207 160 208 - #: gitk:2363 gitk:4942 gitk:4975 gitk:6857 209 161 msgid "Headline" 210 162 msgstr "Първи ред" 211 163 212 - #: gitk:2364 gitk:4942 gitk:6857 gitk:6987 gitk:7499 213 164 msgid "Comments" 214 165 msgstr "Коментари" 215 166 216 - #: gitk:2364 gitk:4942 gitk:4947 gitk:4982 gitk:6857 gitk:7434 gitk:8945 217 - #: gitk:8960 218 167 msgid "Author" 219 168 msgstr "Автор" 220 169 221 - #: gitk:2364 gitk:4942 gitk:6857 gitk:7436 222 170 msgid "Committer" 223 171 msgstr "Подаващ" 224 172 225 - #: gitk:2398 226 173 msgid "Search" 227 174 msgstr "Търсене" 228 175 229 - #: gitk:2406 230 176 msgid "Diff" 231 177 msgstr "Разлики" 232 178 233 - #: gitk:2408 234 179 msgid "Old version" 235 180 msgstr "Стара версия" 236 181 237 - #: gitk:2410 238 182 msgid "New version" 239 183 msgstr "Нова версия" 240 184 241 - #: gitk:2413 242 185 msgid "Lines of context" 243 186 msgstr "Контекст в редове" 244 187 245 - #: gitk:2423 246 188 msgid "Ignore space change" 247 189 msgstr "Празните знаци без значение" 248 190 249 - #: gitk:2427 gitk:2429 gitk:8069 gitk:8321 250 191 msgid "Line diff" 251 192 msgstr "Поредови разлики" 252 193 253 - #: gitk:2502 254 194 msgid "Patch" 255 195 msgstr "Кръпка" 256 196 257 - #: gitk:2504 258 197 msgid "Tree" 259 198 msgstr "Дърво" 260 199 261 - #: gitk:2674 gitk:2695 200 + msgid "Unknown windowing system, cannot bind mouse" 201 + msgstr "Непозната графична система, не може да се установи връзка с мишка" 202 + 262 203 msgid "Diff this -> selected" 263 204 msgstr "Разлики между това и избраното" 264 205 265 - #: gitk:2675 gitk:2696 266 206 msgid "Diff selected -> this" 267 207 msgstr "Разлики между избраното и това" 268 208 269 - #: gitk:2676 gitk:2697 270 209 msgid "Make patch" 271 210 msgstr "Създаване на кръпка" 272 211 273 - #: gitk:2677 gitk:9369 274 212 msgid "Create tag" 275 213 msgstr "Създаване на етикет" 276 214 277 - #: gitk:2678 278 215 msgid "Copy commit reference" 279 216 msgstr "Копиране на указателя на подаване" 280 217 281 - #: gitk:2679 gitk:9500 282 218 msgid "Write commit to file" 283 219 msgstr "Запазване на подаването във файл" 284 220 285 - #: gitk:2680 286 221 msgid "Create new branch" 287 222 msgstr "Създаване на нов клон" 288 223 289 - #: gitk:2681 290 224 msgid "Cherry-pick this commit" 291 225 msgstr "Отбиране на това подаване" 292 226 293 - #: gitk:2682 294 227 msgid "Reset HEAD branch to here" 295 228 msgstr "Привеждане на върха на клона към текущото подаване" 296 229 297 - #: gitk:2683 298 230 msgid "Mark this commit" 299 231 msgstr "Отбелязване на това подаване" 300 232 301 - #: gitk:2684 302 233 msgid "Return to mark" 303 234 msgstr "Връщане към отбелязаното подаване" 304 235 305 - #: gitk:2685 306 236 msgid "Find descendant of this and mark" 307 237 msgstr "Откриване и отбелязване на наследниците" 308 238 309 - #: gitk:2686 310 239 msgid "Compare with marked commit" 311 240 msgstr "Сравнение с отбелязаното подаване" 312 241 313 - #: gitk:2687 gitk:2698 314 242 msgid "Diff this -> marked commit" 315 243 msgstr "Разлики между това и отбелязаното" 316 244 317 - #: gitk:2688 gitk:2699 318 245 msgid "Diff marked commit -> this" 319 246 msgstr "Разлики между отбелязаното и това" 320 247 321 - #: gitk:2689 322 248 msgid "Revert this commit" 323 249 msgstr "Отмяна на това подаване" 324 250 325 - #: gitk:2705 326 251 msgid "Check out this branch" 327 252 msgstr "Изтегляне на този клон" 328 253 329 - #: gitk:2706 330 254 msgid "Rename this branch" 331 255 msgstr "Преименуване на този клон" 332 256 333 - #: gitk:2707 334 257 msgid "Remove this branch" 335 258 msgstr "Изтриване на този клон" 336 259 337 - #: gitk:2708 338 260 msgid "Copy branch name" 339 261 msgstr "Копиране на името на клона" 340 262 341 - #: gitk:2715 342 263 msgid "Highlight this too" 343 264 msgstr "Отбелязване и на това" 344 265 345 - #: gitk:2716 346 266 msgid "Highlight this only" 347 267 msgstr "Отбелязване само на това" 348 268 349 - #: gitk:2717 350 269 msgid "External diff" 351 270 msgstr "Външна програма за разлики" 352 271 353 - #: gitk:2718 354 272 msgid "Blame parent commit" 355 273 msgstr "Анотиране на родителското подаване" 356 274 357 - #: gitk:2719 358 275 msgid "Copy path" 359 276 msgstr "Копиране на пътя" 360 277 361 - #: gitk:2726 362 278 msgid "Show origin of this line" 363 279 msgstr "Показване на произхода на този ред" 364 280 365 - #: gitk:2727 366 281 msgid "Run git gui blame on this line" 367 282 msgstr "Изпълнение на „git gui blame“ върху този ред" 368 283 369 - #: gitk:3081 370 284 msgid "About gitk" 371 285 msgstr "Относно gitk" 372 286 373 - #: gitk:3083 374 287 msgid "" 375 288 "\n" 376 289 "Gitk - a commit viewer for git\n" ··· 386 299 "\n" 387 300 "Използвайте и разпространявайте при условията на ОПЛ на ГНУ" 388 301 389 - #: gitk:3091 gitk:3158 gitk:10090 390 302 msgid "Close" 391 303 msgstr "Затваряне" 392 304 393 - #: gitk:3112 394 305 msgid "Gitk key bindings" 395 306 msgstr "Клавишни комбинации" 396 307 397 - #: gitk:3115 398 308 msgid "Gitk key bindings:" 399 309 msgstr "Клавишни комбинации:" 400 310 401 - #: gitk:3117 402 311 #, tcl-format 403 312 msgid "<%s-Q>\t\tQuit" 404 313 msgstr "<%s-Q>\t\tСпиране на програмата" 405 314 406 - #: gitk:3118 407 315 #, tcl-format 408 316 msgid "<%s-W>\t\tClose window" 409 317 msgstr "<%s-W>\t\tЗатваряне на прозореца" 410 318 411 - #: gitk:3119 412 319 msgid "<Home>\t\tMove to first commit" 413 320 msgstr "<Home>\t\tКъм първото подаване" 414 321 415 - #: gitk:3120 416 322 msgid "<End>\t\tMove to last commit" 417 323 msgstr "<End>\t\tКъм последното подаване" 418 324 419 - #: gitk:3121 420 325 msgid "<Up>, p, k\tMove up one commit" 421 326 msgstr "<Up>, p, k\tЕдно подаване нагоре" 422 327 423 - #: gitk:3122 424 328 msgid "<Down>, n, j\tMove down one commit" 425 329 msgstr "<Down>, n, j\tЕдно подаване надолу" 426 330 427 - #: gitk:3123 428 331 msgid "<Left>, z, h\tGo back in history list" 429 332 msgstr "<Left>, z, h\tНазад в историята" 430 333 431 - #: gitk:3124 432 334 msgid "<Right>, x, l\tGo forward in history list" 433 335 msgstr "<Right>, x, l\tНапред в историята" 434 336 435 - #: gitk:3125 436 337 #, tcl-format 437 338 msgid "<%s-n>\tGo to n-th parent of current commit in history list" 438 339 msgstr "<%s-n>\tКъм n-тия родител на текущото подаване в историята" 439 340 440 - #: gitk:3126 441 341 msgid "<PageUp>\tMove up one page in commit list" 442 342 msgstr "<PageUp>\tСтраница нагоре в списъка с подаванията" 443 343 444 - #: gitk:3127 445 344 msgid "<PageDown>\tMove down one page in commit list" 446 345 msgstr "<PageDown>\tСтраница надолу в списъка с подаванията" 447 346 448 - #: gitk:3128 449 347 #, tcl-format 450 348 msgid "<%s-Home>\tScroll to top of commit list" 451 349 msgstr "<%s-Home>\tКъм началото на списъка с подаванията" 452 350 453 - #: gitk:3129 454 351 #, tcl-format 455 352 msgid "<%s-End>\tScroll to bottom of commit list" 456 353 msgstr "<%s-End>\tКъм края на списъка с подаванията" 457 354 458 - #: gitk:3130 459 355 #, tcl-format 460 356 msgid "<%s-Up>\tScroll commit list up one line" 461 357 msgstr "<%s-Up>\tРед нагоре в списъка с подавания" 462 358 463 - #: gitk:3131 464 359 #, tcl-format 465 360 msgid "<%s-Down>\tScroll commit list down one line" 466 361 msgstr "<%s-Down>\tРед надолу в списъка с подавания" 467 362 468 - #: gitk:3132 469 363 #, tcl-format 470 364 msgid "<%s-PageUp>\tScroll commit list up one page" 471 365 msgstr "<%s-PageUp>\tСтраница нагоре в списъка с подавания" 472 366 473 - #: gitk:3133 474 367 #, tcl-format 475 368 msgid "<%s-PageDown>\tScroll commit list down one page" 476 369 msgstr "<%s-PageDown>\tСтраница надолу в списъка с подавания" 477 370 478 - #: gitk:3134 479 371 msgid "<Shift-Up>\tFind backwards (upwards, later commits)" 480 372 msgstr "<Shift-Up>\tТърсене назад (визуално нагоре, исторически — последващи)" 481 373 482 - #: gitk:3135 483 374 msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)" 484 375 msgstr "" 485 376 "<Shift-Down>\tТърсене напред (визуално надолу, исторически — предхождащи)" 486 377 487 - #: gitk:3136 488 378 msgid "<Delete>, b\tScroll diff view up one page" 489 379 msgstr "<Delete>, b\tСтраница нагоре в изгледа за разлики" 490 380 491 - #: gitk:3137 492 381 msgid "<Backspace>\tScroll diff view up one page" 493 382 msgstr "<Backspace>\tСтраница надолу в изгледа за разлики" 494 383 495 - #: gitk:3138 496 384 msgid "<Space>\t\tScroll diff view down one page" 497 385 msgstr "<Space>\t\tСтраница надолу в изгледа за разлики" 498 386 499 - #: gitk:3139 500 387 msgid "u\t\tScroll diff view up 18 lines" 501 388 msgstr "u\t\t18 реда нагоре в изгледа за разлики" 502 389 503 - #: gitk:3140 504 390 msgid "d\t\tScroll diff view down 18 lines" 505 391 msgstr "d\t\t18 реда надолу в изгледа за разлики" 506 392 507 - #: gitk:3141 508 393 #, tcl-format 509 394 msgid "<%s-F>\t\tFind" 510 395 msgstr "<%s-F>\t\tТърсене" 511 396 512 - #: gitk:3142 513 397 #, tcl-format 514 398 msgid "<%s-G>\t\tMove to next find hit" 515 399 msgstr "<%s-G>\t\tКъм следващата поява" 516 400 517 - #: gitk:3143 518 401 msgid "<Return>\tMove to next find hit" 519 402 msgstr "<Return>\tКъм следващата поява" 520 403 521 - #: gitk:3144 522 404 msgid "g\t\tGo to commit" 523 405 msgstr "g\t\tКъм последното подаване" 524 406 525 - #: gitk:3145 526 407 msgid "/\t\tFocus the search box" 527 408 msgstr "/\t\tФокус върху полето за търсене" 528 409 529 - #: gitk:3146 530 410 msgid "?\t\tMove to previous find hit" 531 411 msgstr "?\t\tКъм предишната поява" 532 412 533 - #: gitk:3147 534 413 msgid "f\t\tScroll diff view to next file" 535 414 msgstr "f\t\tСледващ файл в изгледа за разлики" 536 415 537 - #: gitk:3148 538 416 #, tcl-format 539 417 msgid "<%s-S>\t\tSearch for next hit in diff view" 540 418 msgstr "<%s-S>\t\tТърсене на следващата поява в изгледа за разлики" 541 419 542 - #: gitk:3149 543 420 #, tcl-format 544 421 msgid "<%s-R>\t\tSearch for previous hit in diff view" 545 422 msgstr "<%s-R>\t\tТърсене на предишната поява в изгледа за разлики" 546 423 547 - #: gitk:3150 548 424 #, tcl-format 549 425 msgid "<%s-KP+>\tIncrease font size" 550 426 msgstr "<%s-KP+>\tПо-голям размер на шрифта" 551 427 552 - #: gitk:3151 553 428 #, tcl-format 554 429 msgid "<%s-plus>\tIncrease font size" 555 430 msgstr "<%s-plus>\tПо-голям размер на шрифта" 556 431 557 - #: gitk:3152 558 432 #, tcl-format 559 433 msgid "<%s-KP->\tDecrease font size" 560 434 msgstr "<%s-KP->\tПо-малък размер на шрифта" 561 435 562 - #: gitk:3153 563 436 #, tcl-format 564 437 msgid "<%s-minus>\tDecrease font size" 565 438 msgstr "<%s-minus>\tПо-малък размер на шрифта" 566 439 567 - #: gitk:3154 568 440 msgid "<F5>\t\tUpdate" 569 441 msgstr "<F5>\t\tОбновяване" 570 442 571 - #: gitk:3621 gitk:3630 572 443 #, tcl-format 573 444 msgid "Error creating temporary directory %s:" 574 445 msgstr "Грешка при създаването на временната директория „%s“:" 575 446 576 - #: gitk:3643 577 447 #, tcl-format 578 448 msgid "Error getting \"%s\" from %s:" 579 449 msgstr "Грешка при получаването на „%s“ от %s:" 580 450 581 - #: gitk:3706 582 451 msgid "command failed:" 583 452 msgstr "неуспешно изпълнение на команда:" 584 453 585 - #: gitk:3855 586 454 msgid "No such commit" 587 455 msgstr "Такова подаване няма" 588 456 589 - #: gitk:3869 590 457 msgid "git gui blame: command failed:" 591 458 msgstr "„git gui blame“: неуспешно изпълнение на команда:" 592 459 593 - #: gitk:3900 594 460 #, tcl-format 595 461 msgid "Couldn't read merge head: %s" 596 462 msgstr "Върхът за сливане не може да се прочете: %s" 597 463 598 - #: gitk:3908 599 464 #, tcl-format 600 465 msgid "Error reading index: %s" 601 466 msgstr "Грешка при прочитане на индекса: %s" 602 467 603 - #: gitk:3933 604 468 #, tcl-format 605 469 msgid "Couldn't start git blame: %s" 606 470 msgstr "Командата „git blame“ не може да се стартира: %s" 607 471 608 - #: gitk:3936 gitk:6825 609 472 msgid "Searching" 610 473 msgstr "Търсене" 611 474 612 - #: gitk:3968 613 475 #, tcl-format 614 476 msgid "Error running git blame: %s" 615 477 msgstr "Грешка при изпълнението на „git blame“: %s" 616 478 617 - #: gitk:3996 618 479 #, tcl-format 619 480 msgid "That line comes from commit %s, which is not in this view" 620 481 msgstr "Този ред идва от подаването %s, което не е в изгледа" 621 482 622 - #: gitk:4010 623 483 msgid "External diff viewer failed:" 624 484 msgstr "Неуспешно изпълнение на външната програма за разлики:" 625 485 626 - #: gitk:4114 627 486 msgid "All files" 628 487 msgstr "Всички файлове" 629 488 630 - #: gitk:4138 631 489 msgid "View" 632 490 msgstr "Изглед" 633 491 634 - #: gitk:4141 635 492 msgid "Gitk view definition" 636 493 msgstr "Дефиниция на изглед в Gitk" 637 494 638 - #: gitk:4145 639 495 msgid "Remember this view" 640 496 msgstr "Запазване на този изглед" 641 497 642 - #: gitk:4146 643 498 msgid "References (space separated list):" 644 499 msgstr "Указатели (списък с разделител интервал):" 645 500 646 - #: gitk:4147 647 501 msgid "Branches & tags:" 648 502 msgstr "Клони и етикети:" 649 503 650 - #: gitk:4148 651 504 msgid "All refs" 652 505 msgstr "Всички указатели" 653 506 654 - #: gitk:4149 655 507 msgid "All (local) branches" 656 508 msgstr "Всички (локални) клони" 657 509 658 - #: gitk:4150 659 510 msgid "All tags" 660 511 msgstr "Всички етикети" 661 512 662 - #: gitk:4151 663 513 msgid "All remote-tracking branches" 664 514 msgstr "Всички следящи клони" 665 515 666 - #: gitk:4152 667 516 msgid "Commit Info (regular expressions):" 668 517 msgstr "Информация за подаване (рег. изр.):" 669 518 670 - #: gitk:4153 671 519 msgid "Author:" 672 520 msgstr "Автор:" 673 521 674 - #: gitk:4154 675 522 msgid "Committer:" 676 523 msgstr "Подал:" 677 524 678 - #: gitk:4155 679 525 msgid "Commit Message:" 680 526 msgstr "Съобщение при подаване:" 681 527 682 - #: gitk:4156 683 528 msgid "Matches all Commit Info criteria" 684 529 msgstr "Съвпадение по всички характеристики на подаването" 685 530 686 - #: gitk:4157 687 531 msgid "Matches no Commit Info criteria" 688 532 msgstr "Не съвпада по никоя от характеристиките на подаването" 689 533 690 - #: gitk:4158 691 534 msgid "Changes to Files:" 692 535 msgstr "Промени по файловете:" 693 536 694 - #: gitk:4159 695 537 msgid "Fixed String" 696 538 msgstr "Дословен низ" 697 539 698 - #: gitk:4160 699 540 msgid "Regular Expression" 700 541 msgstr "Регулярен израз" 701 542 702 - #: gitk:4161 703 543 msgid "Search string:" 704 544 msgstr "Низ за търсене:" 705 545 706 - #: gitk:4162 707 546 msgid "" 708 547 "Commit Dates (\"2 weeks ago\", \"2009-03-17 15:27:38\", \"March 17, 2009 " 709 548 "15:27:38\"):" ··· 711 550 "Дата на подаване („2 weeks ago“ (преди 2 седмици), „2009-03-17 15:27:38“, " 712 551 "„March 17, 2009 15:27:38“):" 713 552 714 - #: gitk:4163 715 553 msgid "Since:" 716 554 msgstr "От:" 717 555 718 - #: gitk:4164 719 556 msgid "Until:" 720 557 msgstr "До:" 721 558 722 - #: gitk:4165 723 559 msgid "Limit and/or skip a number of revisions (positive integer):" 724 560 msgstr "" 725 561 "Ограничаване и/или прескачане на определен брой версии (неотрицателно цяло " 726 562 "число):" 727 563 728 - #: gitk:4166 729 564 msgid "Number to show:" 730 565 msgstr "Брой показани:" 731 566 732 - #: gitk:4167 733 567 msgid "Number to skip:" 734 568 msgstr "Брой прескочени:" 735 569 736 - #: gitk:4168 737 570 msgid "Miscellaneous options:" 738 571 msgstr "Разни:" 739 572 740 - #: gitk:4169 741 573 msgid "Strictly sort by date" 742 574 msgstr "Подреждане по дата" 743 575 744 - #: gitk:4170 745 576 msgid "Mark branch sides" 746 577 msgstr "Отбелязване на страните по клона" 747 578 748 - #: gitk:4171 749 579 msgid "Limit to first parent" 750 580 msgstr "Само първия родител" 751 581 752 - #: gitk:4172 753 582 msgid "Simple history" 754 583 msgstr "Опростена история" 755 584 756 - #: gitk:4173 757 585 msgid "Additional arguments to git log:" 758 586 msgstr "Допълнителни аргументи към „git log“:" 759 587 760 - #: gitk:4174 761 588 msgid "Enter files and directories to include, one per line:" 762 589 msgstr "Въведете файловете и директориите за включване, по елемент на ред" 763 590 764 - #: gitk:4175 765 591 msgid "Command to generate more commits to include:" 766 592 msgstr "" 767 593 "Команда за генерирането на допълнителни подавания, които да се включат:" 768 594 769 - #: gitk:4299 770 595 msgid "Gitk: edit view" 771 596 msgstr "Gitk: редактиране на изглед" 772 597 773 - #: gitk:4307 774 598 msgid "-- criteria for selecting revisions" 775 599 msgstr "— критерии за избор на версии" 776 600 777 - #: gitk:4312 778 601 msgid "View Name" 779 602 msgstr "Име на изглед" 780 603 781 - #: gitk:4387 782 604 msgid "Apply (F5)" 783 605 msgstr "Прилагане (F5)" 784 606 785 - #: gitk:4425 786 607 msgid "Error in commit selection arguments:" 787 608 msgstr "Грешка в аргументите за избор на подавания:" 788 609 789 - #: gitk:4480 gitk:4533 gitk:4995 gitk:5009 gitk:6279 gitk:12679 gitk:12680 790 610 msgid "None" 791 611 msgstr "Няма" 792 612 793 - #: gitk:5092 gitk:5097 794 613 msgid "Descendant" 795 614 msgstr "Наследник" 796 615 797 - #: gitk:5093 798 616 msgid "Not descendant" 799 617 msgstr "Не е наследник" 800 618 801 - #: gitk:5100 gitk:5105 802 619 msgid "Ancestor" 803 620 msgstr "Предшественик" 804 621 805 - #: gitk:5101 806 622 msgid "Not ancestor" 807 623 msgstr "Не е предшественик" 808 624 809 - #: gitk:5395 810 625 msgid "Local changes checked in to index but not committed" 811 626 msgstr "Локални промени добавени към индекса, но неподадени" 812 627 813 - #: gitk:5431 814 628 msgid "Local uncommitted changes, not checked in to index" 815 629 msgstr "Локални промени извън индекса" 816 630 817 - #: gitk:7179 818 631 msgid "Error starting web browser:" 819 632 msgstr "Грешка при стартирането на уеб браузър:" 820 633 821 - #: gitk:7240 822 634 msgid "and many more" 823 635 msgstr "и още много" 824 636 825 - #: gitk:7243 826 637 msgid "many" 827 638 msgstr "много" 828 639 829 - #: gitk:7438 830 640 msgid "Tags:" 831 641 msgstr "Етикети:" 832 642 833 - #: gitk:7455 gitk:7461 gitk:8940 834 643 msgid "Parent" 835 644 msgstr "Родител" 836 645 837 - #: gitk:7466 838 646 msgid "Child" 839 647 msgstr "Дете" 840 648 841 - #: gitk:7475 842 649 msgid "Branch" 843 650 msgstr "Клон" 844 651 845 - #: gitk:7478 846 652 msgid "Follows" 847 653 msgstr "Следва" 848 654 849 - #: gitk:7481 850 655 msgid "Precedes" 851 656 msgstr "Предшества" 852 657 853 - #: gitk:8076 854 658 #, tcl-format 855 659 msgid "Error getting diffs: %s" 856 660 msgstr "Грешка при получаването на разликите: %s" 857 661 858 - #: gitk:8765 859 662 msgid "Goto:" 860 663 msgstr "Към ред:" 861 664 862 - #: gitk:8786 863 665 #, tcl-format 864 666 msgid "Short commit ID %s is ambiguous" 865 667 msgstr "Съкратената контролна сума %s не е еднозначна" 866 668 867 - #: gitk:8793 868 669 #, tcl-format 869 670 msgid "Revision %s is not known" 870 671 msgstr "Непозната версия %s" 871 672 872 - #: gitk:8803 873 673 #, tcl-format 874 674 msgid "Commit ID %s is not known" 875 675 msgstr "Непозната контролна сума %s" 876 676 877 - #: gitk:8805 878 677 #, tcl-format 879 678 msgid "Revision %s is not in the current view" 880 679 msgstr "Версия %s не е в текущия изглед" 881 680 882 - #: gitk:8947 gitk:8962 883 681 msgid "Date" 884 682 msgstr "Дата" 885 683 886 - #: gitk:8950 887 684 msgid "Children" 888 685 msgstr "Деца" 889 686 890 - #: gitk:9013 891 687 #, tcl-format 892 688 msgid "Reset %s branch to here" 893 689 msgstr "Зануляване на клона „%s“ към текущото подаване" 894 690 895 - #: gitk:9015 896 691 msgid "Detached head: can't reset" 897 692 msgstr "Несвързан връх: невъзможно зануляване" 898 693 899 - #: gitk:9120 gitk:9126 900 694 msgid "Skipping merge commit " 901 695 msgstr "Пропускане на подаването на сливането" 902 696 903 - #: gitk:9135 gitk:9140 904 697 msgid "Error getting patch ID for " 905 698 msgstr "Грешка при получаването на идентификатора на " 906 699 907 - #: gitk:9136 gitk:9141 908 700 msgid " - stopping\n" 909 701 msgstr " — спиране\n" 910 702 911 - #: gitk:9146 gitk:9149 gitk:9157 gitk:9171 gitk:9180 912 703 msgid "Commit " 913 704 msgstr "Подаване" 914 705 915 - #: gitk:9150 916 706 msgid "" 917 707 " is the same patch as\n" 918 708 " " ··· 920 710 " е същата кръпка като\n" 921 711 " " 922 712 923 - #: gitk:9158 924 713 msgid "" 925 714 " differs from\n" 926 715 " " ··· 928 717 " се различава от\n" 929 718 " " 930 719 931 - #: gitk:9160 932 720 msgid "" 933 721 "Diff of commits:\n" 934 722 "\n" ··· 936 724 "Разлика между подаванията:\n" 937 725 "\n" 938 726 939 - #: gitk:9172 gitk:9181 940 727 #, tcl-format 941 728 msgid " has %s children - stopping\n" 942 729 msgstr " има %s деца — спиране\n" 943 730 944 - #: gitk:9200 945 731 #, tcl-format 946 732 msgid "Error writing commit to file: %s" 947 733 msgstr "Грешка при запазването на подаването във файл: %s" 948 734 949 - #: gitk:9206 950 735 #, tcl-format 951 736 msgid "Error diffing commits: %s" 952 737 msgstr "Грешка при изчисляването на разликите между подаванията: %s" 953 738 954 - #: gitk:9252 955 739 msgid "Top" 956 740 msgstr "Най-горе" 957 741 958 - #: gitk:9253 959 742 msgid "From" 960 743 msgstr "От" 961 744 962 - #: gitk:9258 963 745 msgid "To" 964 746 msgstr "До" 965 747 966 - #: gitk:9282 967 748 msgid "Generate patch" 968 749 msgstr "Генериране на кръпка" 969 750 970 - #: gitk:9284 971 751 msgid "From:" 972 752 msgstr "От:" 973 753 974 - #: gitk:9293 975 754 msgid "To:" 976 755 msgstr "До:" 977 756 978 - #: gitk:9302 979 757 msgid "Reverse" 980 758 msgstr "Обръщане" 981 759 982 - #: gitk:9304 gitk:9514 983 760 msgid "Output file:" 984 761 msgstr "Запазване във файла:" 985 762 986 - #: gitk:9310 987 763 msgid "Generate" 988 764 msgstr "Генериране" 989 765 990 - #: gitk:9348 991 766 msgid "Error creating patch:" 992 767 msgstr "Грешка при създаването на кръпка:" 993 768 994 - #: gitk:9371 gitk:9502 gitk:9590 995 769 msgid "ID:" 996 770 msgstr "Идентификатор:" 997 771 998 - #: gitk:9380 999 772 msgid "Tag name:" 1000 773 msgstr "Име на етикет:" 1001 774 1002 - #: gitk:9383 1003 775 msgid "Tag message is optional" 1004 776 msgstr "Съобщението за етикет е незадължително" 1005 777 1006 - #: gitk:9385 1007 778 msgid "Tag message:" 1008 779 msgstr "Съобщение за етикет:" 1009 780 1010 - #: gitk:9389 gitk:9560 1011 781 msgid "Create" 1012 782 msgstr "Създаване" 1013 783 1014 - #: gitk:9407 1015 784 msgid "No tag name specified" 1016 785 msgstr "Липсва име на етикет" 1017 786 1018 - #: gitk:9411 1019 787 #, tcl-format 1020 788 msgid "Tag \"%s\" already exists" 1021 789 msgstr "Етикетът „%s“ вече съществува" 1022 790 1023 - #: gitk:9421 1024 791 msgid "Error creating tag:" 1025 792 msgstr "Грешка при създаването на етикет:" 1026 793 1027 - #: gitk:9511 1028 794 msgid "Command:" 1029 795 msgstr "Команда:" 1030 796 1031 - #: gitk:9519 1032 797 msgid "Write" 1033 798 msgstr "Запазване" 1034 799 1035 - #: gitk:9537 1036 800 msgid "Error writing commit:" 1037 801 msgstr "Грешка при запазването на подаването:" 1038 802 1039 - #: gitk:9559 1040 803 msgid "Create branch" 1041 804 msgstr "Създаване на клон" 1042 805 1043 - #: gitk:9575 1044 806 #, tcl-format 1045 807 msgid "Rename branch %s" 1046 808 msgstr "Преименуване на клона „%s“" 1047 809 1048 - #: gitk:9576 1049 810 msgid "Rename" 1050 811 msgstr "Преименуване" 1051 812 1052 - #: gitk:9600 1053 813 msgid "Name:" 1054 814 msgstr "Име:" 1055 815 1056 - #: gitk:9624 1057 816 msgid "Please specify a name for the new branch" 1058 817 msgstr "Укажете име за новия клон" 1059 818 1060 - #: gitk:9629 1061 819 #, tcl-format 1062 820 msgid "Branch '%s' already exists. Overwrite?" 1063 821 msgstr "Клонът „%s“ вече съществува. Да се презапише ли?" 1064 822 1065 - #: gitk:9673 1066 823 msgid "Please specify a new name for the branch" 1067 824 msgstr "Укажете ново име за клона" 1068 825 1069 - #: gitk:9736 1070 826 #, tcl-format 1071 827 msgid "Commit %s is already included in branch %s -- really re-apply it?" 1072 828 msgstr "" 1073 829 "Подаването „%s“ вече е включено в клона „%s“ — да се приложи ли отново?" 1074 830 1075 - #: gitk:9741 1076 831 msgid "Cherry-picking" 1077 832 msgstr "Отбиране" 1078 833 1079 - #: gitk:9750 1080 834 #, tcl-format 1081 835 msgid "" 1082 836 "Cherry-pick failed because of local changes to file '%s'.\n" ··· 1085 839 "Неуспешно отбиране, защото във файла „%s“ има локални промени.\n" 1086 840 "Подайте, занулете или ги скатайте и пробвайте отново." 1087 841 1088 - #: gitk:9756 1089 842 msgid "" 1090 843 "Cherry-pick failed because of merge conflict.\n" 1091 844 "Do you wish to run git citool to resolve it?" ··· 1093 846 "Неуспешно отбиране поради конфликти при сливане.\n" 1094 847 "Искате ли да ги коригирате чрез „git citool“?" 1095 848 1096 - #: gitk:9772 gitk:9830 1097 849 msgid "No changes committed" 1098 850 msgstr "Не са подадени промени" 1099 851 1100 - #: gitk:9799 1101 852 #, tcl-format 1102 853 msgid "Commit %s is not included in branch %s -- really revert it?" 1103 854 msgstr "Подаването „%s“ не е включено в клона „%s“. Да се отменени ли?" 1104 855 1105 - #: gitk:9804 1106 856 msgid "Reverting" 1107 857 msgstr "Отмяна" 1108 858 1109 - #: gitk:9812 1110 859 #, tcl-format 1111 860 msgid "" 1112 861 "Revert failed because of local changes to the following files:%s Please " ··· 1115 864 "Неуспешна отмяна, защото във файла „%s“ има локални промени.\n" 1116 865 "Подайте, занулете или ги скатайте и пробвайте отново." 1117 866 1118 - #: gitk:9816 1119 867 msgid "" 1120 868 "Revert failed because of merge conflict.\n" 1121 869 " Do you wish to run git citool to resolve it?" ··· 1123 871 "Неуспешно отмяна поради конфликти при сливане.\n" 1124 872 "Искате ли да ги коригирате чрез „git citool“?" 1125 873 1126 - #: gitk:9859 1127 874 msgid "Confirm reset" 1128 875 msgstr "Потвърждаване на зануляването" 1129 876 1130 - #: gitk:9861 1131 877 #, tcl-format 1132 878 msgid "Reset branch %s to %s?" 1133 879 msgstr "Да се занули ли клонът „%s“ към „%s“?" 1134 880 1135 - #: gitk:9863 1136 881 msgid "Reset type:" 1137 882 msgstr "Вид зануляване:" 1138 883 1139 - #: gitk:9866 1140 884 msgid "Soft: Leave working tree and index untouched" 1141 885 msgstr "Слабо: работното дърво и индекса остават същите" 1142 886 1143 - #: gitk:9869 1144 887 msgid "Mixed: Leave working tree untouched, reset index" 1145 888 msgstr "Смесено: работното дърво остава същото, индексът се занулява" 1146 889 1147 - #: gitk:9872 1148 890 msgid "" 1149 891 "Hard: Reset working tree and index\n" 1150 892 "(discard ALL local changes)" ··· 1152 894 "Силно: зануляване и на работното дърво, и на индекса\n" 1153 895 "(ВСИЧКИ локални промени ще се загубят безвъзвратно)" 1154 896 1155 - #: gitk:9889 1156 897 msgid "Resetting" 1157 898 msgstr "Зануляване" 1158 899 1159 - #: gitk:9962 1160 900 #, tcl-format 1161 901 msgid "A local branch named %s exists already" 1162 902 msgstr "Вече съществува локален клон „%s“." 1163 903 1164 - #: gitk:9970 1165 904 msgid "Checking out" 1166 905 msgstr "Изтегляне" 1167 906 1168 - #: gitk:10029 1169 907 msgid "Cannot delete the currently checked-out branch" 1170 908 msgstr "Текущо изтегленият клон не може да се изтрие" 1171 909 1172 - #: gitk:10035 1173 910 #, tcl-format 1174 911 msgid "" 1175 912 "The commits on branch %s aren't on any other branch.\n" ··· 1178 915 "Подаванията на клона „%s“ не са на никой друг клон.\n" 1179 916 "Наистина ли искате да изтриете клона „%s“?" 1180 917 1181 - #: gitk:10066 1182 918 #, tcl-format 1183 919 msgid "Tags and heads: %s" 1184 920 msgstr "Етикети и върхове: %s" 1185 921 1186 - #: gitk:10083 1187 922 msgid "Filter" 1188 923 msgstr "Филтриране" 1189 924 1190 - #: gitk:10390 925 + msgid "Sort refs by type" 926 + msgstr "Подредба на указателите по вид" 927 + 1191 928 msgid "" 1192 929 "Error reading commit topology information; branch and preceding/following " 1193 930 "tag information will be incomplete." ··· 1195 932 "Грешка при прочитането на топологията на подаванията. Информацията за клона " 1196 933 "и предшестващите/следващите етикети ще е непълна." 1197 934 1198 - #: gitk:11367 1199 935 msgid "Tag" 1200 936 msgstr "Етикет" 1201 937 1202 - #: gitk:11371 1203 938 msgid "Id" 1204 939 msgstr "Идентификатор" 1205 940 1206 - #: gitk:11454 1207 - msgid "Gitk font chooser" 1208 - msgstr "Избор на шрифт за Gitk" 1209 - 1210 - #: gitk:11471 1211 - msgid "B" 1212 - msgstr "Ч" 1213 - 1214 - #: gitk:11474 1215 - msgid "I" 1216 - msgstr "К" 1217 - 1218 - #: gitk:11593 1219 941 msgid "Commit list display options" 1220 942 msgstr "Настройки на списъка с подавания" 1221 943 1222 - #: gitk:11596 1223 944 msgid "Maximum graph width (lines)" 1224 945 msgstr "Максимална широчина на графа (в редове)" 1225 946 1226 - #: gitk:11600 1227 947 #, no-tcl-format 1228 948 msgid "Maximum graph width (% of pane)" 1229 949 msgstr "Максимална широчина на графа (% от панела)" 1230 950 1231 - #: gitk:11603 1232 951 msgid "Show local changes" 1233 952 msgstr "Показване на локалните промени" 1234 953 1235 - #: gitk:11606 1236 954 msgid "Hide remote refs" 1237 955 msgstr "Скриване на отдалечените указатели" 1238 956 1239 - #: gitk:11610 1240 957 msgid "Copy commit ID to clipboard" 1241 958 msgstr "Копиране на контролната сума към буфера за обмен" 1242 959 1243 - #: gitk:11614 1244 960 msgid "Copy commit ID to X11 selection" 1245 961 msgstr "Копиране на контролната сума в селекцията на X11" 1246 962 1247 - #: gitk:11619 1248 963 msgid "Length of commit ID to copy" 1249 964 msgstr "Дължина на контролната сума, която се копира" 1250 965 1251 - #: gitk:11622 966 + msgid "Wheel scrolling multiplier" 967 + msgstr "Множител за колелцето на мишката" 968 + 1252 969 msgid "Diff display options" 1253 970 msgstr "Настройки на показването на разликите" 1254 971 1255 - #: gitk:11624 1256 972 msgid "Tab spacing" 1257 973 msgstr "Широчина на табулатора" 1258 974 1259 - #: gitk:11628 1260 975 msgid "Wrap comment text" 1261 976 msgstr "Пренасяне на думите в коментарите" 1262 977 1263 - #: gitk:11633 1264 978 msgid "Wrap other text" 1265 979 msgstr "Пренасяне на другия текст" 1266 980 1267 - #: gitk:11638 1268 981 msgid "Display nearby tags/heads" 1269 982 msgstr "Извеждане на близките етикети и върхове" 1270 983 1271 - #: gitk:11641 1272 984 msgid "Maximum # tags/heads to show" 1273 985 msgstr "Максимален брой етикети/върхове за показване" 1274 986 1275 - #: gitk:11644 1276 987 msgid "Limit diffs to listed paths" 1277 988 msgstr "Разлика само в избраните пътища" 1278 989 1279 - #: gitk:11647 1280 990 msgid "Support per-file encodings" 1281 991 msgstr "Поддръжка на различни кодирания за всеки файл" 1282 992 1283 - #: gitk:11653 gitk:11820 1284 993 msgid "External diff tool" 1285 994 msgstr "Външен инструмент за разлики" 1286 995 1287 - #: gitk:11654 1288 996 msgid "Choose..." 1289 997 msgstr "Избор…" 1290 998 1291 - #: gitk:11661 1292 999 msgid "Web browser" 1293 1000 msgstr "Уеб браузър" 1294 1001 1295 - #: gitk:11666 1296 - msgid "General options" 1297 - msgstr "Общи настройки" 1298 - 1299 - #: gitk:11669 1300 - msgid "Use themed widgets" 1301 - msgstr "Използване на тема за графичните обекти" 1302 - 1303 - #: gitk:11671 1304 - msgid "(change requires restart)" 1305 - msgstr "(промяната изисква рестартиране на Gitk)" 1306 - 1307 - #: gitk:11673 1308 - msgid "(currently unavailable)" 1309 - msgstr "(в момента недостъпно)" 1310 - 1311 - #: gitk:11685 1312 1002 msgid "Colors: press to choose" 1313 1003 msgstr "Цветове: избира се с натискане" 1314 1004 1315 - #: gitk:11688 1316 1005 msgid "Interface" 1317 1006 msgstr "Интерфейс" 1318 1007 1319 - #: gitk:11689 1320 1008 msgid "interface" 1321 1009 msgstr "интерфейс" 1322 1010 1323 - #: gitk:11692 1324 1011 msgid "Background" 1325 1012 msgstr "Фон" 1326 1013 1327 - #: gitk:11693 gitk:11735 1328 1014 msgid "background" 1329 1015 msgstr "фон" 1330 1016 1331 - #: gitk:11696 1332 1017 msgid "Foreground" 1333 1018 msgstr "Знаци" 1334 1019 1335 - #: gitk:11697 1336 1020 msgid "foreground" 1337 1021 msgstr "знаци" 1338 1022 1339 - #: gitk:11700 1340 1023 msgid "Diff: old lines" 1341 1024 msgstr "Разлика: стари редове" 1342 1025 1343 - #: gitk:11701 1344 1026 msgid "diff old lines" 1345 1027 msgstr "разлика, стари редове" 1346 1028 1347 - #: gitk:11705 1348 1029 msgid "Diff: old lines bg" 1349 1030 msgstr "Разлика: фон на стари редове" 1350 1031 1351 - #: gitk:11707 1352 1032 msgid "diff old lines bg" 1353 1033 msgstr "разлика, фон на стари редове" 1354 1034 1355 - #: gitk:11711 1356 1035 msgid "Diff: new lines" 1357 1036 msgstr "Разлика: нови редове" 1358 1037 1359 - #: gitk:11712 1360 1038 msgid "diff new lines" 1361 1039 msgstr "разлика, нови редове" 1362 1040 1363 - #: gitk:11716 1364 1041 msgid "Diff: new lines bg" 1365 1042 msgstr "Разлика: фон на нови редове" 1366 1043 1367 - #: gitk:11718 1368 1044 msgid "diff new lines bg" 1369 1045 msgstr "разлика, фон на нови редове" 1370 1046 1371 - #: gitk:11722 1372 1047 msgid "Diff: hunk header" 1373 1048 msgstr "Разлика: начало на парче" 1374 1049 1375 - #: gitk:11724 1376 1050 msgid "diff hunk header" 1377 1051 msgstr "разлика, начало на парче" 1378 1052 1379 - #: gitk:11728 1380 1053 msgid "Marked line bg" 1381 1054 msgstr "Фон на отбелязан ред" 1382 1055 1383 - #: gitk:11730 1384 1056 msgid "marked line background" 1385 1057 msgstr "фон на отбелязан ред" 1386 1058 1387 - #: gitk:11734 1388 1059 msgid "Select bg" 1389 1060 msgstr "Избор на фон" 1390 1061 1391 - #: gitk:11743 1392 1062 msgid "Fonts: press to choose" 1393 1063 msgstr "Шрифтове: избира се с натискане" 1394 1064 1395 - #: gitk:11745 1396 1065 msgid "Main font" 1397 1066 msgstr "Основен шрифт" 1398 1067 1399 - #: gitk:11746 1400 1068 msgid "Diff display font" 1401 1069 msgstr "Шрифт за разликите" 1402 1070 1403 - #: gitk:11747 1404 1071 msgid "User interface font" 1405 1072 msgstr "Шрифт на интерфейса" 1406 1073 1407 - #: gitk:11769 1408 1074 msgid "Gitk preferences" 1409 1075 msgstr "Настройки на Gitk" 1410 1076 1411 - #: gitk:11778 1412 1077 msgid "General" 1413 1078 msgstr "Общи" 1414 1079 1415 - #: gitk:11779 1416 1080 msgid "Colors" 1417 1081 msgstr "Цветове" 1418 1082 1419 - #: gitk:11780 1420 1083 msgid "Fonts" 1421 1084 msgstr "Шрифтове" 1422 1085 1423 - #: gitk:11830 1424 1086 #, tcl-format 1425 1087 msgid "Gitk: choose color for %s" 1426 1088 msgstr "Gitk: избор на цвят на „%s“" 1427 1089 1428 - #: gitk:12350 1429 - msgid "" 1430 - "Sorry, gitk cannot run with this version of Tcl/Tk.\n" 1431 - " Gitk requires at least Tcl/Tk 8.4." 1432 - msgstr "" 1433 - "Тази версия на Tcl/Tk не се поддържа от Gitk.\n" 1434 - " Необходима ви е поне Tcl/Tk 8.4." 1435 - 1436 - #: gitk:12571 1437 1090 msgid "Cannot find a git repository here." 1438 1091 msgstr "Тук липсва хранилище на Git." 1439 1092 1440 - #: gitk:12618 1441 1093 #, tcl-format 1442 1094 msgid "Ambiguous argument '%s': both revision and filename" 1443 1095 msgstr "Нееднозначен аргумент „%s“: има и такава версия, и такъв файл" 1444 1096 1445 - #: gitk:12630 1446 1097 msgid "Bad arguments to gitk:" 1447 1098 msgstr "Неправилни аргументи на gitk:"