Fossil

Check-in [c9f32668]
Login

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

Overview
Comment:Only use relative paths on win32 and cygwin, not on other platforms: external tools which buggy interpretation of relative paths don't exist on win32/cygwin. This allows a win32 diff tool (like winmerge) to be used in cygwin fossil, or a cygwin diff tool in a win32 fossil, no matter if the current directory is C:\Users\foo or /cygdrive/c/Users/foo.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | exec-rel-paths
Files: files | file ages | folders
SHA1: c9f3266836f1f7fe68a3a4cb185591fd52c08e6e
User & Date: jan.nijtmans 2015-06-05 11:46:07
Context
2015-06-09
10:56
Add "diff-cmd-abs-paths" setting, controlling whether "fossil diff/gdiff" provide absolute paths to the external diff tool or not. check-in: 55b4a751 user: jan.nijtmans tags: exec-rel-paths
2015-06-05
11:46
Only use relative paths on win32 and cygwin, not on other platforms: external tools which buggy interpretation of relative paths don't exist on win32/cygwin. This allows a win32 diff tool (like winmerge) to be used in cygwin fossil, or a cygwin diff tool in a win32 fossil, no matter if the current directory is C:\Users\foo or /cygdrive/c/Users/foo. check-in: c9f32668 user: jan.nijtmans tags: exec-rel-paths
10:28
Merge trunk check-in: d066ee03 user: jan.nijtmans tags: exec-rel-paths
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/diffcmd.c.

386
387
388
389
390
391
392

393
394




395
396
397
398
399
400
401
    int isNew = db_column_int(&q,3);
    int srcid = db_column_int(&q, 4);
    int isLink = db_column_int(&q, 5);
    const char *zFullName;
    int showDiff = 1;
    Blob fname;


    blob_zero(&fname);
    file_relative_name(zPathname, &fname, 1);




    zFullName = blob_str(&fname);
    if( isDeleted ){
      fossil_print("DELETED  %s\n", zPathname);
      if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; }
    }else if( file_access(zFullName, F_OK) ){
      fossil_print("MISSING  %s\n", zPathname);
      if( !asNewFile ){ showDiff = 0; }







>


>
>
>
>







386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
    int isNew = db_column_int(&q,3);
    int srcid = db_column_int(&q, 4);
    int isLink = db_column_int(&q, 5);
    const char *zFullName;
    int showDiff = 1;
    Blob fname;

#if defined(_WIN32) || defined(__CYGWIN__)
    blob_zero(&fname);
    file_relative_name(zPathname, &fname, 1);
#else
    blob_set(&fname, g.zLocalRoot);
    blob_append(&fname, zPathname, -1);
#endif
    zFullName = blob_str(&fname);
    if( isDeleted ){
      fossil_print("DELETED  %s\n", zPathname);
      if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; }
    }else if( file_access(zFullName, F_OK) ){
      fossil_print("MISSING  %s\n", zPathname);
      if( !asNewFile ){ showDiff = 0; }