1067
set enc [string tolower [string range $line 9 end]]
1068
}
1069
}
1070
- fconfigure $fd -encoding $enc
1071
- set msg [string trim [read $fd]]
1070
+ set msg [encoding convertfrom $enc [read $fd]]
1071
+ set msg [string trim $msg]
1072
close $fd
1073
} err]} {
1074
error_popup "Error loading commit data for amend:\n\n$err"
1291
if {[catch {set enc $repo_config(i18n.commitencoding)}]} {
1292
set enc utf-8
1293
}
1294
- fconfigure $msg_wt -encoding $enc -translation binary
1295
- puts -nonewline $msg_wt $msg
1294
+ fconfigure $msg_wt -encoding binary -translation binary
1295
+ puts -nonewline $msg_wt [encoding convertto $enc $msg]
1296
close $msg_wt
1297
1298
# -- Create the commit.
3663
incr i
3664
}
3665
3666
+ set author_name {}
3667
+ set author_email {}
3668
+ set author_time {}
3669
+ catch {set author_name $blame_data($w,$cmit,author)}
3670
+ catch {set author_email $blame_data($w,$cmit,author-mail)}
3671
+ catch {set author_time [clock format $blame_data($w,$cmit,author-time)]}
3672
+
3673
+ set committer_name {}
3674
+ set committer_email {}
3675
+ set committer_time {}
3676
+ catch {set committer_name $blame_data($w,$cmit,committer)}
3677
+ catch {set committer_email $blame_data($w,$cmit,committer-mail)}
3678
+ catch {set committer_time [clock format $blame_data($w,$cmit,committer-time)]}
3679
+
3680
if {[catch {set msg $blame_data($w,$cmit,message)}]} {
3681
set msg {}
3682
catch {
3690
set enc [string tolower [string range $line 9 end]]
3691
}
3692
}
3679
- fconfigure $fd -encoding $enc
3680
- set msg [string trim [read $fd]]
3693
+ set msg [encoding convertfrom $enc [read $fd]]
3694
+ set msg [string trim $msg]
3695
close $fd
3696
+
3697
+ set author_name [encoding convertfrom $enc $author_name]
3698
+ set committer_name [encoding convertfrom $enc $committer_name]
3699
+
3700
+ set blame_data($w,$cmit,author) $author_name
3701
+ set blame_data($w,$cmit,committer) $committer_name
3702
}
3703
set blame_data($w,$cmit,message) $msg
3704
}
3705
3686
- set author_name {}
3687
- set author_email {}
3688
- set author_time {}
3689
- catch {set author_name $blame_data($w,$cmit,author)}
3690
- catch {set author_email $blame_data($w,$cmit,author-mail)}
3691
- catch {set author_time [clock format $blame_data($w,$cmit,author-time)]}
3692
-
3693
- set committer_name {}
3694
- set committer_email {}
3695
- set committer_time {}
3696
- catch {set committer_name $blame_data($w,$cmit,committer)}
3697
- catch {set committer_email $blame_data($w,$cmit,committer-mail)}
3698
- catch {set committer_time [clock format $blame_data($w,$cmit,committer-time)]}
3699
-
3706
$w_cmit insert end "commit $cmit\n"
3707
$w_cmit insert end "Author: $author_name $author_email $author_time\n"
3708
$w_cmit insert end "Committer: $committer_name $committer_email $committer_time\n"