Fossil SCM

C

jan.nijtmans 2012-09-25 14:55 use-utf8-in-win-external-editor
Commit 7724ea65018d5a244270295fd2d7969f9958fe12
1 file changed +3 -3
+3 -3
--- src/checkin.c
+++ src/checkin.c
@@ -486,11 +486,11 @@
486486
"# environment variables or the \"fossil set editor\" command,\n"
487487
"# and because no check-in comment was specified using the \"-m\"\n"
488488
"# or \"-M\" command-line options, you will need to enter the\n"
489489
"# check-in comment below. Type \".\" on a line by itself when\n"
490490
"# you are done:\n", -1);
491
- zFile = NULL;
491
+ zFile = mprintf("-");
492492
}else{
493493
zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
494494
g.zLocalRoot);
495495
}
496496
#if defined(_WIN32)
@@ -523,14 +523,14 @@
523523
}
524524
blob_append(&text, zIn, -1);
525525
}
526526
}
527527
blob_remove_cr(&text);
528
- if( zFile ) {
528
+ if( zEditor ) {
529529
file_delete(zFile);
530
- fossil_free(zFile);
531530
}
531
+ fossil_free(zFile);
532532
blob_zero(pComment);
533533
while( blob_line(&text, &line) ){
534534
int i, n;
535535
char *z;
536536
n = blob_size(&line);
537537
--- src/checkin.c
+++ src/checkin.c
@@ -486,11 +486,11 @@
486 "# environment variables or the \"fossil set editor\" command,\n"
487 "# and because no check-in comment was specified using the \"-m\"\n"
488 "# or \"-M\" command-line options, you will need to enter the\n"
489 "# check-in comment below. Type \".\" on a line by itself when\n"
490 "# you are done:\n", -1);
491 zFile = NULL;
492 }else{
493 zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
494 g.zLocalRoot);
495 }
496 #if defined(_WIN32)
@@ -523,14 +523,14 @@
523 }
524 blob_append(&text, zIn, -1);
525 }
526 }
527 blob_remove_cr(&text);
528 if( zFile ) {
529 file_delete(zFile);
530 fossil_free(zFile);
531 }
 
532 blob_zero(pComment);
533 while( blob_line(&text, &line) ){
534 int i, n;
535 char *z;
536 n = blob_size(&line);
537
--- src/checkin.c
+++ src/checkin.c
@@ -486,11 +486,11 @@
486 "# environment variables or the \"fossil set editor\" command,\n"
487 "# and because no check-in comment was specified using the \"-m\"\n"
488 "# or \"-M\" command-line options, you will need to enter the\n"
489 "# check-in comment below. Type \".\" on a line by itself when\n"
490 "# you are done:\n", -1);
491 zFile = mprintf("-");
492 }else{
493 zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
494 g.zLocalRoot);
495 }
496 #if defined(_WIN32)
@@ -523,14 +523,14 @@
523 }
524 blob_append(&text, zIn, -1);
525 }
526 }
527 blob_remove_cr(&text);
528 if( zEditor ) {
529 file_delete(zFile);
 
530 }
531 fossil_free(zFile);
532 blob_zero(pComment);
533 while( blob_line(&text, &line) ){
534 int i, n;
535 char *z;
536 n = blob_size(&line);
537

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button