Fossil

Check-in [115d90d8]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Issue a warning to the user before using "ed" or "notepad" if no default text editor is set.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:115d90d8b0aab28679f9a1b146c3d047e71817eb
User & Date: drh 2010-12-17 12:13:59
Context
2010-12-17
12:41
When "fossil set editor" is unset and when there is no EDITOR or VISUAL environment variable set, then gather the check-in comment from standard input (with appropriate prompting) rather than trying to run "ed" or "notepad". check-in: aa929c4d user: drh tags: trunk
12:13
Issue a warning to the user before using "ed" or "notepad" if no default text editor is set. check-in: 115d90d8 user: drh tags: trunk
12:03
Remember which database was opened first (as the "main" database) in the g.zMainDbType global variable. check-in: 99f52f38 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

411
412
413
414
415
416
417



418
419




420
421
422
423
424
425
426
  }
  if( zEditor==0 ){
    zEditor = getenv("EDITOR");
  }
  if( zEditor==0 ){
#if defined(_WIN32)
    zEditor = "notepad";



#else
    zEditor = "ed";




#endif
  }
  zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
                   g.zLocalRoot);
#if defined(_WIN32)
  blob_add_cr(&text);
#endif







>
>
>


>
>
>
>







411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
  }
  if( zEditor==0 ){
    zEditor = getenv("EDITOR");
  }
  if( zEditor==0 ){
#if defined(_WIN32)
    zEditor = "notepad";
    fossil_warning(
       "no default text editor selected using \"fossil set editor\"\n"
       "or the EDITOR or VISUAL environment variables - using \"notepad\"");
#else
    zEditor = "ed";
    fossil_warning(
       "no default text editor selected using \"fossil set editor\"\n"
       "or the EDITOR or VISUAL environment variables - using \"ed\" -\n"
       "enter \"q\" to quit.");
#endif
  }
  zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
                   g.zLocalRoot);
#if defined(_WIN32)
  blob_add_cr(&text);
#endif