Fossil SCM

Issue a warning to the user before using "ed" or "notepad" if no default text editor is set.

drh 2010-12-17 12:13 trunk
Commit 115d90d8b0aab28679f9a1b146c3d047e71817eb
1 file changed +7
--- src/checkin.c
+++ src/checkin.c
@@ -413,12 +413,19 @@
413413
zEditor = getenv("EDITOR");
414414
}
415415
if( zEditor==0 ){
416416
#if defined(_WIN32)
417417
zEditor = "notepad";
418
+ fossil_warning(
419
+ "no default text editor selected using \"fossil set editor\"\n"
420
+ "or the EDITOR or VISUAL environment variables - using \"notepad\"");
418421
#else
419422
zEditor = "ed";
423
+ fossil_warning(
424
+ "no default text editor selected using \"fossil set editor\"\n"
425
+ "or the EDITOR or VISUAL environment variables - using \"ed\" -\n"
426
+ "enter \"q\" to quit.");
420427
#endif
421428
}
422429
zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
423430
g.zLocalRoot);
424431
#if defined(_WIN32)
425432
--- src/checkin.c
+++ src/checkin.c
@@ -413,12 +413,19 @@
413 zEditor = getenv("EDITOR");
414 }
415 if( zEditor==0 ){
416 #if defined(_WIN32)
417 zEditor = "notepad";
 
 
 
418 #else
419 zEditor = "ed";
 
 
 
 
420 #endif
421 }
422 zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
423 g.zLocalRoot);
424 #if defined(_WIN32)
425
--- src/checkin.c
+++ src/checkin.c
@@ -413,12 +413,19 @@
413 zEditor = getenv("EDITOR");
414 }
415 if( zEditor==0 ){
416 #if defined(_WIN32)
417 zEditor = "notepad";
418 fossil_warning(
419 "no default text editor selected using \"fossil set editor\"\n"
420 "or the EDITOR or VISUAL environment variables - using \"notepad\"");
421 #else
422 zEditor = "ed";
423 fossil_warning(
424 "no default text editor selected using \"fossil set editor\"\n"
425 "or the EDITOR or VISUAL environment variables - using \"ed\" -\n"
426 "enter \"q\" to quit.");
427 #endif
428 }
429 zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
430 g.zLocalRoot);
431 #if defined(_WIN32)
432

Keyboard Shortcuts

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