Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add "diff-cmd-abs-paths" setting, controlling whether "fossil diff/gdiff" provide absolute paths to the external diff tool or not. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | exec-rel-paths |
| Files: | files | file ages | folders |
| SHA1: |
55b4a751c8816348b21e2f96a21dc959 |
| User & Date: | jan.nijtmans 2015-06-09 10:56:05.713 |
Context
|
2015-06-10
| ||
| 03:22 | Revise the changes on this branch to favor the current default behavior. Also, make it possible to override the new setting with a command line option. check-in: 2036eef767 user: mistachkin tags: exec-rel-paths | |
|
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: 55b4a751c8 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: c9f3266836 user: jan.nijtmans tags: exec-rel-paths | |
Changes
Changes to src/db.c.
| ︙ | ︙ | |||
2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 |
{ "case-sensitive", 0, 0, 0, 0, "on" },
#endif
{ "clean-glob", 0, 40, 1, 0, "" },
{ "clearsign", 0, 0, 0, 0, "off" },
{ "crnl-glob", 0, 40, 1, 0, "" },
{ "default-perms", 0, 16, 0, 0, "u" },
{ "diff-binary", 0, 0, 0, 0, "on" },
{ "diff-command", 0, 40, 0, 0, "" },
{ "dont-push", 0, 0, 0, 0, "off" },
{ "dotfiles", 0, 0, 1, 0, "off" },
{ "editor", 0, 32, 0, 0, "" },
{ "empty-dirs", 0, 40, 1, 0, "" },
{ "encoding-glob", 0, 40, 1, 0, "" },
{ "gdiff-command", 0, 40, 0, 0, "gdiff" },
| > > > > > | 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 |
{ "case-sensitive", 0, 0, 0, 0, "on" },
#endif
{ "clean-glob", 0, 40, 1, 0, "" },
{ "clearsign", 0, 0, 0, 0, "off" },
{ "crnl-glob", 0, 40, 1, 0, "" },
{ "default-perms", 0, 16, 0, 0, "u" },
{ "diff-binary", 0, 0, 0, 0, "on" },
#if defined(_WIN32) || defined(__CYGWIN__)
{ "diff-cmd-abs-path",0, 0, 0, 0, "off" },
#else
{ "diff-cmd-abs-path",0, 0, 0, 0, "on" },
#endif
{ "diff-command", 0, 40, 0, 0, "" },
{ "dont-push", 0, 0, 0, 0, "off" },
{ "dotfiles", 0, 0, 1, 0, "off" },
{ "editor", 0, 32, 0, 0, "" },
{ "empty-dirs", 0, 40, 1, 0, "" },
{ "encoding-glob", 0, 40, 1, 0, "" },
{ "gdiff-command", 0, 40, 0, 0, "gdiff" },
|
| ︙ | ︙ |
Changes to src/diffcmd.c.
| ︙ | ︙ | |||
386 387 388 389 390 391 392 |
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;
| | < < < | | | > > > | 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( db_get_boolean("diff-cmd-abs-path",0) ){
blob_set(&fname, g.zLocalRoot);
blob_append(&fname, zPathname, -1);
}else{
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; }
|
| ︙ | ︙ |