Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch ticket-e399bc Excluding Merge-Ins
This is equivalent to a diff from 22b570f4f3 to 1002e7238c
|
2012-11-29
| ||
| 13:15 | Translate decomposed-UTF8 filenames on MacOS into precomposed-UTF8. Fix for ticket [e399bc1edfe45b] check-in: ca728447a6 user: drh tags: trunk | |
| 13:12 | Translate decomposed-UTF8 filenames on MacOS into precomposed-UTF8. Fix for ticket [e399bc1edfe45b] Closed-Leaf check-in: 1002e7238c user: drh tags: ticket-e399bc | |
| 09:59 | One more thing I spotted (but cannot test!): UTF8-mac encoded values could enter fossil through environment variables as well... check-in: 42951c59ae user: jan.nijtmans tags: ticket-e399bc | |
| 07:56 | Fix a couple line length issues and modify an error message. check-in: 3527aa4474 user: mistachkin tags: trunk | |
| 03:14 | Untested changes designed to fix broken filename encodings on MacOS. Move all character-set converting routines into a new file called utf8.c. Add the fossil_filename_to_utf8() routine, which converts Unicode to utf8 on windows and decomposed utf8 into precomposed utf8 on Mac. Ticket [e399bc1edfe45b] check-in: c24e568fb0 user: drh tags: ticket-e399bc | |
| 01:45 | Give the user the option to convert file into UTF8 if they are in some other encoding when committed. The commit aborts regardless, to give the operator an opportunity to retest the changes before committing again. check-in: 22b570f4f3 user: drh tags: trunk | |
|
2012-11-28
| ||
| 23:05 | Serious bug fix: Avoid deleting the respository if the repository is in the checkout and you do a "fossil close". check-in: fcdeaa2909 user: drh tags: trunk | |
| 08:44 | merge trunk Closed-Leaf check-in: 9d67e2e2d3 user: jan.nijtmans tags: convert_before_commit_v2 | |
Changes to auto.def.
| ︙ | |||
77 78 79 80 81 82 83 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - |
}
if {[opt-bool static]} {
# XXX: This will not work on all systems.
define-append EXTRA_LDFLAGS -static
}
|
| ︙ | |||
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | + |
cc-check-function-in-lib gethostbyname nsl
if {![cc-check-function-in-lib socket {socket network}]} {
# Last resort, may be Windows
if {[string match *mingw* [get-define host]]} {
define-append LIBS -lwsock32
}
}
cc-check-function-in-lib iconv iconv
# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
if {![cc-check-functions getpassphrase]} {
# Haiku needs this
cc-check-function-in-lib getpass bsd
}
make-template Makefile.in
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
|
Changes to src/blob.c.
| ︙ | |||
1109 1110 1111 1112 1113 1114 1115 | 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 | - + - + |
}else if( starts_with_utf16le_bom(pBlob, &bomSize) ){
/* Make sure the blob contains two terminating 0-bytes */
blob_append(pBlob, "", 1);
zUtf8 = blob_str(pBlob) + bomSize;
zUtf8 = fossil_unicode_to_utf8(zUtf8);
blob_zero(pBlob);
blob_append(pBlob, zUtf8, -1);
|
Changes to src/file.c.
| ︙ | |||
73 74 75 76 77 78 79 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + |
}else{
return stat(zFilename, buf);
}
#else
int rc = 0;
wchar_t *zMbcs = fossil_utf8_to_unicode(zFilename);
rc = _wstati64(zMbcs, buf);
|
| ︙ | |||
304 305 306 307 308 309 310 | 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | - + |
/*
** Wrapper around the access() system call.
*/
int file_access(const char *zFilename, int flags){
#ifdef _WIN32
wchar_t *zMbcs = fossil_utf8_to_unicode(zFilename);
int rc = _waccess(zMbcs, flags);
|
| ︙ | |||
408 409 410 411 412 413 414 | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | - + | utimes(zFilename, tv); #else struct _utimbuf tb; wchar_t *zMbcs = fossil_utf8_to_unicode(zFilename); tb.actime = newMTime; tb.modtime = newMTime; _wutime(zMbcs, &tb); |
| ︙ | |||
442 443 444 445 446 447 448 | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | - + |
/*
** Delete a file.
*/
void file_delete(const char *zFilename){
#ifdef _WIN32
wchar_t *z = fossil_utf8_to_unicode(zFilename);
_wunlink(z);
|
| ︙ | |||
466 467 468 469 470 471 472 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - + |
file_delete(zName);
}
if( rc!=1 ){
#if defined(_WIN32)
int rc;
wchar_t *zMbcs = fossil_utf8_to_unicode(zName);
rc = _wmkdir(zMbcs);
|
| ︙ | |||
653 654 655 656 657 658 659 | 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | - + - + |
char *zPwdUtf8;
int nPwd;
int i;
wchar_t zPwd[2000];
if( _wgetcwd(zPwd, sizeof(zPwd)/sizeof(zPwd[0])-1)==0 ){
fossil_fatal("cannot find the current working directory.");
}
|
| ︙ | |||
1010 1011 1012 1013 1014 1015 1016 | 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 | - + |
const char *zDir = ".";
int cnt = 0;
#if defined(_WIN32)
wchar_t zTmpPath[MAX_PATH];
if( GetTempPathW(MAX_PATH, zTmpPath) ){
|
| ︙ | |||
1044 1045 1046 1047 1048 1049 1050 | 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 | - - + + |
for(i=0; i<15; i++, j++){
zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
}
zBuf[j] = 0;
}while( file_size(zBuf)>=0 );
#if defined(_WIN32)
|
| ︙ | |||
1089 1090 1091 1092 1093 1094 1095 | 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - + - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + | # define opendir _wopendir # define readdir _wreaddir # define closedir _wclosedir #endif /* _WIN32 */ #endif /* INTERFACE */ |
Changes to src/main.c.
| ︙ | |||
489 490 491 492 493 494 495 | 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | - + - + | #endif g.argc = argc; g.argv = argv; #if defined(_WIN32) && !defined(__MINGW32__) parse_windows_command_line(&g.argc, &g.argv); GetModuleFileNameW(NULL, buf, MAX_PATH); |
| ︙ | |||
856 857 858 859 860 861 862 | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 | - + |
WCHAR *zUnicode = fossil_utf8_to_unicode(zNewCmd);
if( g.fSystemTrace ) {
char *zOut = mprintf("SYSTEM: %s\n", zNewCmd);
fossil_puts(zOut, 1);
fossil_free(zOut);
}
rc = _wsystem(zUnicode);
|
| ︙ | |||
2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 | 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 | + + + + + - - - - - + + + + + + + + + + + + + + + + + |
zStopperFile, zNotFound, flags);
}
#endif
}
/*
** COMMAND: test-echo
**
** Usage: %fossil test-echo [--hex] ARGS...
**
** Echo all command-line arguments (enclosed in [...]) to the screen so that
** wildcard expansion behavior of the host shell can be investigated.
**
** With the --hex option, show the output as hexadecimal. This can be used
** to verify the fossil_filename_to_utf8() routine on Windows and Mac.
*/
void test_echo_cmd(void){
|
Changes to src/main.mk.
| ︙ | |||
100 101 102 103 104 105 106 107 108 109 110 111 112 113 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | + | $(SRCDIR)/timeline.c \ $(SRCDIR)/tkt.c \ $(SRCDIR)/tktsetup.c \ $(SRCDIR)/undo.c \ $(SRCDIR)/update.c \ $(SRCDIR)/url.c \ $(SRCDIR)/user.c \ $(SRCDIR)/utf8.c \ $(SRCDIR)/verify.c \ $(SRCDIR)/vfile.c \ $(SRCDIR)/wiki.c \ $(SRCDIR)/wikiformat.c \ $(SRCDIR)/winhttp.c \ $(SRCDIR)/wysiwyg.c \ $(SRCDIR)/xfer.c \ |
| ︙ | |||
201 202 203 204 205 206 207 208 209 210 211 212 213 214 | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | + | $(OBJDIR)/timeline_.c \ $(OBJDIR)/tkt_.c \ $(OBJDIR)/tktsetup_.c \ $(OBJDIR)/undo_.c \ $(OBJDIR)/update_.c \ $(OBJDIR)/url_.c \ $(OBJDIR)/user_.c \ $(OBJDIR)/utf8_.c \ $(OBJDIR)/verify_.c \ $(OBJDIR)/vfile_.c \ $(OBJDIR)/wiki_.c \ $(OBJDIR)/wikiformat_.c \ $(OBJDIR)/winhttp_.c \ $(OBJDIR)/wysiwyg_.c \ $(OBJDIR)/xfer_.c \ |
| ︙ | |||
302 303 304 305 306 307 308 309 310 311 312 313 314 315 | 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | + | $(OBJDIR)/timeline.o \ $(OBJDIR)/tkt.o \ $(OBJDIR)/tktsetup.o \ $(OBJDIR)/undo.o \ $(OBJDIR)/update.o \ $(OBJDIR)/url.o \ $(OBJDIR)/user.o \ $(OBJDIR)/utf8.o \ $(OBJDIR)/verify.o \ $(OBJDIR)/vfile.o \ $(OBJDIR)/wiki.o \ $(OBJDIR)/wikiformat.o \ $(OBJDIR)/winhttp.o \ $(OBJDIR)/wysiwyg.o \ $(OBJDIR)/xfer.o \ |
| ︙ | |||
379 380 381 382 383 384 385 | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | - + | clean: rm -rf $(OBJDIR)/* $(APPNAME) $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex $(OBJDIR)/mkindex $(TRANS_SRC) >$@ $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h |
| ︙ | |||
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 | 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 | + + + + + + + | $(OBJDIR)/user_.c: $(SRCDIR)/user.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/user.c >$(OBJDIR)/user_.c $(OBJDIR)/user.o: $(OBJDIR)/user_.c $(OBJDIR)/user.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/user.o -c $(OBJDIR)/user_.c $(OBJDIR)/user.h: $(OBJDIR)/headers $(OBJDIR)/utf8_.c: $(SRCDIR)/utf8.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/utf8.c >$(OBJDIR)/utf8_.c $(OBJDIR)/utf8.o: $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/utf8.o -c $(OBJDIR)/utf8_.c $(OBJDIR)/utf8.h: $(OBJDIR)/headers $(OBJDIR)/verify_.c: $(SRCDIR)/verify.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/verify.c >$(OBJDIR)/verify_.c $(OBJDIR)/verify.o: $(OBJDIR)/verify_.c $(OBJDIR)/verify.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/verify.o -c $(OBJDIR)/verify_.c $(OBJDIR)/verify.h: $(OBJDIR)/headers |
| ︙ |
Changes to src/makemake.tcl.
| ︙ | |||
105 106 107 108 109 110 111 112 113 114 115 116 117 118 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | + | tktsetup undo update url user verify vfile utf8 wiki wikiformat winhttp wysiwyg xfer xfersetup zip |
| ︙ |
Changes to src/rebuild.c.
| ︙ | |||
841 842 843 844 845 846 847 | 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 | - + - + |
while( (pEntry=readdir(d))!=0 ){
Blob path;
char *zSubpath;
if( pEntry->d_name[0]=='.' ){
continue;
}
|
| ︙ | |||
865 866 867 868 869 870 871 | 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 | - + |
fflush(stdout);
}
closedir(d);
}else {
fossil_panic("encountered error %d while trying to open \"%s\".",
errno, g.argv[3]);
}
|
| ︙ |
Added src/utf8.c.