Fossil

Check-in [3cadf76c]
Login

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

Overview
Comment:Notepad and Cygwin interpret absolute paths differently. Solution: make the path relative. This is generally better anyway because relative paths are shorter and less likely to overflow platform path limitations.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3cadf76c3d1b7645c73e7ad572f3f723b26c5799
User & Date: jan.nijtmans 2013-09-19 11:29:21
References
2013-10-29
12:24 Fixed ticket [8c46da20]: Checkin fails: "editor aborted" on Cygwin plus 5 other changes artifact: 7476a260 user: jan.nijtmans
Context
2013-09-19
11:48
Fix MSVC build error and warnings: c:\localdata\workspace\fossil\src\util.c(249) : warning C4715: 'fossil_timer_fetch' : not all control paths return a value c:\localdata\workspace\fossil\src\util.c(270) : warning C4715: 'fossil_timer_reset' : not all control paths return a value check-in: 6e1e4bb8 user: jan.nijtmans tags: trunk
11:29
Notepad and Cygwin interpret absolute paths differently. Solution: make the path relative. This is generally better anyway because relative paths are shorter and less likely to overflow platform path limitations. check-in: 3cadf76c user: jan.nijtmans tags: trunk
11:18
Bug-fix in file_relative_name(): If filename is a super-directory of the current directory then the final slash is missing. Test-case: "fossil test-relative-name /home/ --slash". Result "../../.." should be "../../../". This bugfix is needed for my next commit. check-in: add75245 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

640
641
642
643
644
645
646



647
648


649
650
651
652
653
654
655
       "# 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"
       "# Type \".\" on a line by itself when you are done:\n", -1);
    zFile = mprintf("-");
  }else{



    zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",
                    g.zLocalRoot);


  }
#if defined(_WIN32)
  blob_add_cr(pPrompt);
#endif
  blob_write_to_file(pPrompt, zFile);
  if( zEditor ){
    zCmd = mprintf("%s \"%s\"", zEditor, zFile);







>
>
>

<
>
>







640
641
642
643
644
645
646
647
648
649
650

651
652
653
654
655
656
657
658
659
       "# 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"
       "# Type \".\" on a line by itself when you are done:\n", -1);
    zFile = mprintf("-");
  }else{
    Blob fname;
    blob_zero(&fname);
    file_relative_name(g.zLocalRoot, &fname, 1);
    zFile = db_text(0, "SELECT '%qci-comment-' || hex(randomblob(6)) || '.txt'",

                    blob_str(&fname));
    blob_reset(&fname);
  }
#if defined(_WIN32)
  blob_add_cr(pPrompt);
#endif
  blob_write_to_file(pPrompt, zFile);
  if( zEditor ){
    zCmd = mprintf("%s \"%s\"", zEditor, zFile);