Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch use-utf8-in-win-external-editor Through [0111420601] Excluding Merge-Ins
This is equivalent to a diff from 6545e6cf74 to 0111420601
|
2012-10-15
| ||
| 05:09 | bug-fix: is_temporary_file expects utf8, not unicode on Windows check-in: 0e6b7bc363 user: jan.nijtmans tags: trunk | |
|
2012-10-14
| ||
| 19:55 | implement big-endian unicode decoding for commit message files check-in: 514f71a1cf user: jan.nijtmans tags: use-utf8-in-win-external-editor | |
|
2012-10-13
| ||
| 18:38 | merge trunk check-in: 0111420601 user: jan.nijtmans tags: use-utf8-in-win-external-editor | |
| 17:31 | Omit the "private" tag from private check-ins. This opens up the possibility of publishing check-ins that were originally private. Fix the "deconstruct" command so that it omits private artifacts unless the --private option is used. check-in: 6545e6cf74 user: drh tags: trunk | |
| 14:19 | Add the --temp option to the "fossil extra" and "fossil clean" commands. check-in: 3206b6485a user: drh tags: trunk | |
|
2012-10-07
| ||
| 17:18 | merge trunk make Notepad the default comment editor on Windows check-in: 10cf72bd3b user: jan.nijtmans tags: use-utf8-in-win-external-editor | |
Changes to src/checkin.c.
| ︙ | ︙ | |||
471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
zEditor = db_get("editor", 0);
if( zEditor==0 ){
zEditor = fossil_getenv("VISUAL");
}
if( zEditor==0 ){
zEditor = fossil_getenv("EDITOR");
}
if( zEditor==0 ){
blob_append(pPrompt,
"#\n"
"# Since no default text editor is set using EDITOR or VISUAL\n"
"# environment variables or the \"fossil set editor\" command,\n"
"# and because no comment was specified using the \"-m\" or \"-M\"\n"
"# command-line options, you will need to enter the comment below.\n"
| > > > > > | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
zEditor = db_get("editor", 0);
if( zEditor==0 ){
zEditor = fossil_getenv("VISUAL");
}
if( zEditor==0 ){
zEditor = fossil_getenv("EDITOR");
}
#ifdef _WIN32
if( zEditor==0 ){
zEditor = mprintf("%s\\notepad.exe", fossil_getenv("SystemRoot"));
}
#endif
if( zEditor==0 ){
blob_append(pPrompt,
"#\n"
"# Since no default text editor is set using EDITOR or VISUAL\n"
"# environment variables or the \"fossil set editor\" command,\n"
"# and because no comment was specified using the \"-m\" or \"-M\"\n"
"# command-line options, you will need to enter the comment below.\n"
|
| ︙ | ︙ | |||
500 501 502 503 504 505 506 |
}
blob_read_from_file(&reply, zFile);
}else{
char zIn[300];
blob_zero(&reply);
while( fgets(zIn, sizeof(zIn), stdin)!=0 ){
| < | < | < | 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 |
}
blob_read_from_file(&reply, zFile);
}else{
char zIn[300];
blob_zero(&reply);
while( fgets(zIn, sizeof(zIn), stdin)!=0 ){
if( zIn[0]=='.' && (zIn[1]==0 || zIn[1]=='\r' || zIn[1]=='\n') ){
break;
}
blob_append(&reply, zIn, -1);
}
}
blob_remove_cr(&reply);
file_delete(zFile);
free(zFile);
blob_zero(pComment);
while( blob_line(&reply, &line) ){
|
| ︙ | ︙ | |||
556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
Blob *pComment,
char *zInit,
const char *zBranch,
int parent_rid,
const char *zUserOvrd
){
Blob prompt;
blob_init(&prompt, zInit, -1);
blob_append(&prompt,
"\n"
"# Enter comments on this check-in. Lines beginning with # are ignored.\n"
"# The check-in comment follows wiki formatting rules.\n"
"#\n", -1
);
blob_appendf(&prompt, "# user: %s\n", zUserOvrd ? zUserOvrd : g.zLogin);
| > > > > > > > > | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
Blob *pComment,
char *zInit,
const char *zBranch,
int parent_rid,
const char *zUserOvrd
){
Blob prompt;
#ifdef _WIN32
static const unsigned char bom[] = { 0xEF, 0xBB, 0xBF };
blob_init(&prompt, (const char *) bom, 3);
if( zInit && zInit[0]) {
blob_append(&prompt, zInit, -1);
}
#else
blob_init(&prompt, zInit, -1);
#endif
blob_append(&prompt,
"\n"
"# Enter comments on this check-in. Lines beginning with # are ignored.\n"
"# The check-in comment follows wiki formatting rules.\n"
"#\n", -1
);
blob_appendf(&prompt, "# user: %s\n", zUserOvrd ? zUserOvrd : g.zLogin);
|
| ︙ | ︙ | |||
1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 |
Blob ans;
blob_zero(&ans);
prompt_user("empty check-in comment. continue (y/N)? ", &ans);
if( blob_str(&ans)[0]!='y' ){
fossil_exit(1);
}
}else{
db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
db_end_transaction(0);
db_begin_transaction();
}
/* Step 1: Insert records for all modified files into the blob
** table. If there were arguments passed to this command, only
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 |
Blob ans;
blob_zero(&ans);
prompt_user("empty check-in comment. continue (y/N)? ", &ans);
if( blob_str(&ans)[0]!='y' ){
fossil_exit(1);
}
}else{
#ifdef _WIN32
/* On windows, the check-in comment might come back from the editor
** in various encodings. Try to figure out the encoding and do the
** right thing. */
if( zComment==0 ){
static const unsigned char bom[] = { 0xEF, 0xBB, 0xBF };
static const unsigned short ubom = 0xfeff;
static const unsigned short urbom = 0xfffe;
if( blob_size(&comment)>2 && memcmp(blob_buffer(&comment), bom, 3)==0 ) {
struct Blob temp;
char *zUtf8 = blob_str(&comment) + 3;
blob_append(&temp, zUtf8, -1);
fossil_mbcs_free(zUtf8);
blob_swap(&temp, &comment);
blob_reset(&temp);
}else if( blob_size(&comment)>1 && (blob_size(&comment)&1)==0
&& memcmp(blob_buffer(&comment), &ubom, 2)==0 ) {
char *zUtf8;
/* Make sure the blob contains two terminating 0-bytes */
blob_append(&comment, "", 1);
zUtf8 = blob_str(&comment) + 2;
zUtf8 = fossil_unicode_to_utf8(zUtf8);
blob_zero(&comment);
blob_append(&comment, zUtf8, -1);
fossil_mbcs_free(zUtf8);
}else if( blob_size(&comment)>1
&& memcmp(blob_buffer(&comment), &urbom, 2)==0 ){
fossil_fatal("unicode bom (be) not (yet) implemented");
}else{
char *zUtf8 = fossil_mbcs_to_utf8(blob_str(&comment));
blob_zero(&comment);
blob_append(&comment, zUtf8, -1);
fossil_mbcs_free(zUtf8);
}
}
#endif /* _WIN32 */
db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
db_end_transaction(0);
db_begin_transaction();
}
/* Step 1: Insert records for all modified files into the blob
** table. If there were arguments passed to this command, only
|
| ︙ | ︙ |