Fossil SCM
Issue a warning to the user before using "ed" or "notepad" if no default text editor is set.
Commit
115d90d8b0aab28679f9a1b146c3d047e71817eb
Parent
99f52f3806ead4c…
1 file changed
+7
+7
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -413,12 +413,19 @@ | ||
| 413 | 413 | zEditor = getenv("EDITOR"); |
| 414 | 414 | } |
| 415 | 415 | if( zEditor==0 ){ |
| 416 | 416 | #if defined(_WIN32) |
| 417 | 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\""); | |
| 418 | 421 | #else |
| 419 | 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."); | |
| 420 | 427 | #endif |
| 421 | 428 | } |
| 422 | 429 | zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'", |
| 423 | 430 | g.zLocalRoot); |
| 424 | 431 | #if defined(_WIN32) |
| 425 | 432 |
| --- 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 |