Fossil SCM

Add the 'exec-rel-paths' setting and its machinery to permit relative paths to be used when calling external diffing tools.

mistachkin 2015-10-27 01:21 trunk merge
Commit 825d78b6f7d080558278ce821c6578878e43bcef
+8
--- auto.def
+++ auto.def
@@ -5,10 +5,12 @@
55
options {
66
with-openssl:path|auto|none
77
=> {Look for OpenSSL in the given path, or auto or none}
88
with-miniz=0 => {Use miniz from the source tree}
99
with-zlib:path => {Look for zlib in the given path}
10
+ with-exec-rel-paths=0
11
+ => {Enable relative paths for external diff/gdiff}
1012
with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)}
1113
with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
1214
with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
1315
with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
1416
with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
@@ -91,10 +93,16 @@
9193
if {[opt-bool with-legacy-mv-rm]} {
9294
define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_LEGACY_MV_RM
9395
define FOSSIL_ENABLE_LEGACY_MV_RM
9496
msg-result "Legacy mv/rm support enabled"
9597
}
98
+
99
+if {[opt-bool with-exec-rel-paths]} {
100
+ define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_EXEC_REL_PATHS
101
+ define FOSSIL_ENABLE_EXEC_REL_PATHS
102
+ msg-result "Relative paths in external diff/gdiff enabled"
103
+}
96104
97105
if {[opt-bool with-th1-docs]} {
98106
define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_DOCS
99107
define FOSSIL_ENABLE_TH1_DOCS
100108
msg-result "TH1 embedded documentation support enabled"
101109
--- auto.def
+++ auto.def
@@ -5,10 +5,12 @@
5 options {
6 with-openssl:path|auto|none
7 => {Look for OpenSSL in the given path, or auto or none}
8 with-miniz=0 => {Use miniz from the source tree}
9 with-zlib:path => {Look for zlib in the given path}
 
 
10 with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)}
11 with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
12 with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
13 with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
14 with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
@@ -91,10 +93,16 @@
91 if {[opt-bool with-legacy-mv-rm]} {
92 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_LEGACY_MV_RM
93 define FOSSIL_ENABLE_LEGACY_MV_RM
94 msg-result "Legacy mv/rm support enabled"
95 }
 
 
 
 
 
 
96
97 if {[opt-bool with-th1-docs]} {
98 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_DOCS
99 define FOSSIL_ENABLE_TH1_DOCS
100 msg-result "TH1 embedded documentation support enabled"
101
--- auto.def
+++ auto.def
@@ -5,10 +5,12 @@
5 options {
6 with-openssl:path|auto|none
7 => {Look for OpenSSL in the given path, or auto or none}
8 with-miniz=0 => {Use miniz from the source tree}
9 with-zlib:path => {Look for zlib in the given path}
10 with-exec-rel-paths=0
11 => {Enable relative paths for external diff/gdiff}
12 with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)}
13 with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
14 with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
15 with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
16 with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
@@ -91,10 +93,16 @@
93 if {[opt-bool with-legacy-mv-rm]} {
94 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_LEGACY_MV_RM
95 define FOSSIL_ENABLE_LEGACY_MV_RM
96 msg-result "Legacy mv/rm support enabled"
97 }
98
99 if {[opt-bool with-exec-rel-paths]} {
100 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_EXEC_REL_PATHS
101 define FOSSIL_ENABLE_EXEC_REL_PATHS
102 msg-result "Relative paths in external diff/gdiff enabled"
103 }
104
105 if {[opt-bool with-th1-docs]} {
106 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_DOCS
107 define FOSSIL_ENABLE_TH1_DOCS
108 msg-result "TH1 embedded documentation support enabled"
109
+8
--- src/db.c
+++ src/db.c
@@ -2380,10 +2380,15 @@
23802380
{ "dont-push", 0, 0, 0, 0, "off" },
23812381
{ "dotfiles", 0, 0, 1, 0, "off" },
23822382
{ "editor", 0, 32, 0, 0, "" },
23832383
{ "empty-dirs", 0, 40, 1, 0, "" },
23842384
{ "encoding-glob", 0, 40, 1, 0, "" },
2385
+#if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
2386
+ { "exec-rel-paths", 0, 0, 0, 0, "on" },
2387
+#else
2388
+ { "exec-rel-paths", 0, 0, 0, 0, "off" },
2389
+#endif
23852390
{ "gdiff-command", 0, 40, 0, 0, "gdiff" },
23862391
{ "gmerge-command", 0, 40, 0, 0, "" },
23872392
{ "hash-digits", 0, 5, 0, 0, "10" },
23882393
{ "http-port", 0, 16, 0, 0, "8080" },
23892394
{ "https-login", 0, 0, 0, 0, "off" },
@@ -2555,10 +2560,13 @@
25552560
** encoding-glob The VALUE is a comma or newline-separated list of GLOB
25562561
** (versionable) patterns specifying files that the "commit" command will
25572562
** ignore when issuing warnings about text files that may
25582563
** use another encoding than ASCII or UTF-8. Set to "*"
25592564
** to disable encoding checking.
2565
+**
2566
+** exec-rel-paths When executing certain external commands (e.g. diff and
2567
+** gdiff), use relative paths.
25602568
**
25612569
** gdiff-command External command to run when performing a graphical
25622570
** diff. If undefined, text diff will be used.
25632571
**
25642572
** gmerge-command A graphical merge conflict resolver command operating
25652573
--- src/db.c
+++ src/db.c
@@ -2380,10 +2380,15 @@
2380 { "dont-push", 0, 0, 0, 0, "off" },
2381 { "dotfiles", 0, 0, 1, 0, "off" },
2382 { "editor", 0, 32, 0, 0, "" },
2383 { "empty-dirs", 0, 40, 1, 0, "" },
2384 { "encoding-glob", 0, 40, 1, 0, "" },
 
 
 
 
 
2385 { "gdiff-command", 0, 40, 0, 0, "gdiff" },
2386 { "gmerge-command", 0, 40, 0, 0, "" },
2387 { "hash-digits", 0, 5, 0, 0, "10" },
2388 { "http-port", 0, 16, 0, 0, "8080" },
2389 { "https-login", 0, 0, 0, 0, "off" },
@@ -2555,10 +2560,13 @@
2555 ** encoding-glob The VALUE is a comma or newline-separated list of GLOB
2556 ** (versionable) patterns specifying files that the "commit" command will
2557 ** ignore when issuing warnings about text files that may
2558 ** use another encoding than ASCII or UTF-8. Set to "*"
2559 ** to disable encoding checking.
 
 
 
2560 **
2561 ** gdiff-command External command to run when performing a graphical
2562 ** diff. If undefined, text diff will be used.
2563 **
2564 ** gmerge-command A graphical merge conflict resolver command operating
2565
--- src/db.c
+++ src/db.c
@@ -2380,10 +2380,15 @@
2380 { "dont-push", 0, 0, 0, 0, "off" },
2381 { "dotfiles", 0, 0, 1, 0, "off" },
2382 { "editor", 0, 32, 0, 0, "" },
2383 { "empty-dirs", 0, 40, 1, 0, "" },
2384 { "encoding-glob", 0, 40, 1, 0, "" },
2385 #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
2386 { "exec-rel-paths", 0, 0, 0, 0, "on" },
2387 #else
2388 { "exec-rel-paths", 0, 0, 0, 0, "off" },
2389 #endif
2390 { "gdiff-command", 0, 40, 0, 0, "gdiff" },
2391 { "gmerge-command", 0, 40, 0, 0, "" },
2392 { "hash-digits", 0, 5, 0, 0, "10" },
2393 { "http-port", 0, 16, 0, 0, "8080" },
2394 { "https-login", 0, 0, 0, 0, "off" },
@@ -2555,10 +2560,13 @@
2560 ** encoding-glob The VALUE is a comma or newline-separated list of GLOB
2561 ** (versionable) patterns specifying files that the "commit" command will
2562 ** ignore when issuing warnings about text files that may
2563 ** use another encoding than ASCII or UTF-8. Set to "*"
2564 ** to disable encoding checking.
2565 **
2566 ** exec-rel-paths When executing certain external commands (e.g. diff and
2567 ** gdiff), use relative paths.
2568 **
2569 ** gdiff-command External command to run when performing a graphical
2570 ** diff. If undefined, text diff will be used.
2571 **
2572 ** gmerge-command A graphical merge conflict resolver command operating
2573
+37 -3
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -32,10 +32,32 @@
3232
3333
/*
3434
** Used when the name for the diff is unknown.
3535
*/
3636
#define DIFF_NO_NAME "(unknown)"
37
+
38
+/*
39
+** Use the "exec-rel-paths" setting and the --exec-abs-paths and
40
+** --exec-rel-paths command line options to determine whether
41
+** certain external commands are executed using relative paths.
42
+*/
43
+static int determine_exec_relative_option(int force)
44
+{
45
+ static int relativePaths = -1;
46
+ if( force || relativePaths==-1 ){
47
+ int relPathOption = find_option("exec-rel-paths", 0, 0)!=0;
48
+ int absPathOption = find_option("exec-abs-paths", 0, 0)!=0;
49
+#if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
50
+ relativePaths = db_get_boolean("exec-rel-paths", 1);
51
+#else
52
+ relativePaths = db_get_boolean("exec-rel-paths", 0);
53
+#endif
54
+ if( relPathOption ){ relativePaths = 1; }
55
+ if( absPathOption ){ relativePaths = 0; }
56
+ }
57
+ return relativePaths;
58
+}
3759
3860
/*
3961
** Print the "Index:" message that patches wants to see at the top of a diff.
4062
*/
4163
void diff_print_index(const char *zFile, u64 diffFlags){
@@ -384,13 +406,22 @@
384406
int isDeleted = db_column_int(&q, 1);
385407
int isChnged = db_column_int(&q,2);
386408
int isNew = db_column_int(&q,3);
387409
int srcid = db_column_int(&q, 4);
388410
int isLink = db_column_int(&q, 5);
389
- char *zToFree = mprintf("%s%s", g.zLocalRoot, zPathname);
390
- const char *zFullName = zToFree;
411
+ const char *zFullName;
391412
int showDiff = 1;
413
+ Blob fname;
414
+
415
+ if( determine_exec_relative_option(0) ){
416
+ blob_zero(&fname);
417
+ file_relative_name(zPathname, &fname, 1);
418
+ }else{
419
+ blob_set(&fname, g.zLocalRoot);
420
+ blob_append(&fname, zPathname, -1);
421
+ }
422
+ zFullName = blob_str(&fname);
392423
if( isDeleted ){
393424
fossil_print("DELETED %s\n", zPathname);
394425
if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; }
395426
}else if( file_access(zFullName, F_OK) ){
396427
fossil_print("MISSING %s\n", zPathname);
@@ -426,11 +457,11 @@
426457
diff_print_index(zPathname, diffFlags);
427458
diff_file(&content, isBin, zFullName, zPathname, zDiffCmd,
428459
zBinGlob, fIncludeBinary, diffFlags);
429460
blob_reset(&content);
430461
}
431
- free(zToFree);
462
+ blob_reset(&fname);
432463
}
433464
db_finalize(&q);
434465
db_end_transaction(1); /* ROLLBACK */
435466
}
436467
@@ -816,10 +847,12 @@
816847
** --binary PATTERN Treat files that match the glob PATTERN as binary
817848
** --branch BRANCH Show diff of all changes on BRANCH
818849
** --brief Show filenames only
819850
** --context|-c N Use N lines of context
820851
** --diff-binary BOOL Include binary files when using external commands
852
+** --exec-abs-paths Force absolute path names with external commands.
853
+** --exec-rel-paths Force relative path names with external commands.
821854
** --from|-r VERSION select VERSION as source for the diff
822855
** --internal|-i use internal diff logic
823856
** --side-by-side|-y side-by-side diff
824857
** --strip-trailing-cr Strip trailing CR
825858
** --tk Launch a Tcl/Tk GUI for display
@@ -880,10 +913,11 @@
880913
if( !isInternDiff ){
881914
zDiffCmd = diff_command_external(isGDiff);
882915
}
883916
zBinGlob = diff_get_binary_glob();
884917
fIncludeBinary = diff_include_binary_files();
918
+ determine_exec_relative_option(1);
885919
verify_all_options();
886920
if( againstUndo ){
887921
if( db_lget_int("undo_available",0)==0 ){
888922
fossil_print("No undo or redo is available\n");
889923
return;
890924
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -32,10 +32,32 @@
32
33 /*
34 ** Used when the name for the diff is unknown.
35 */
36 #define DIFF_NO_NAME "(unknown)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
38 /*
39 ** Print the "Index:" message that patches wants to see at the top of a diff.
40 */
41 void diff_print_index(const char *zFile, u64 diffFlags){
@@ -384,13 +406,22 @@
384 int isDeleted = db_column_int(&q, 1);
385 int isChnged = db_column_int(&q,2);
386 int isNew = db_column_int(&q,3);
387 int srcid = db_column_int(&q, 4);
388 int isLink = db_column_int(&q, 5);
389 char *zToFree = mprintf("%s%s", g.zLocalRoot, zPathname);
390 const char *zFullName = zToFree;
391 int showDiff = 1;
 
 
 
 
 
 
 
 
 
 
392 if( isDeleted ){
393 fossil_print("DELETED %s\n", zPathname);
394 if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; }
395 }else if( file_access(zFullName, F_OK) ){
396 fossil_print("MISSING %s\n", zPathname);
@@ -426,11 +457,11 @@
426 diff_print_index(zPathname, diffFlags);
427 diff_file(&content, isBin, zFullName, zPathname, zDiffCmd,
428 zBinGlob, fIncludeBinary, diffFlags);
429 blob_reset(&content);
430 }
431 free(zToFree);
432 }
433 db_finalize(&q);
434 db_end_transaction(1); /* ROLLBACK */
435 }
436
@@ -816,10 +847,12 @@
816 ** --binary PATTERN Treat files that match the glob PATTERN as binary
817 ** --branch BRANCH Show diff of all changes on BRANCH
818 ** --brief Show filenames only
819 ** --context|-c N Use N lines of context
820 ** --diff-binary BOOL Include binary files when using external commands
 
 
821 ** --from|-r VERSION select VERSION as source for the diff
822 ** --internal|-i use internal diff logic
823 ** --side-by-side|-y side-by-side diff
824 ** --strip-trailing-cr Strip trailing CR
825 ** --tk Launch a Tcl/Tk GUI for display
@@ -880,10 +913,11 @@
880 if( !isInternDiff ){
881 zDiffCmd = diff_command_external(isGDiff);
882 }
883 zBinGlob = diff_get_binary_glob();
884 fIncludeBinary = diff_include_binary_files();
 
885 verify_all_options();
886 if( againstUndo ){
887 if( db_lget_int("undo_available",0)==0 ){
888 fossil_print("No undo or redo is available\n");
889 return;
890
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -32,10 +32,32 @@
32
33 /*
34 ** Used when the name for the diff is unknown.
35 */
36 #define DIFF_NO_NAME "(unknown)"
37
38 /*
39 ** Use the "exec-rel-paths" setting and the --exec-abs-paths and
40 ** --exec-rel-paths command line options to determine whether
41 ** certain external commands are executed using relative paths.
42 */
43 static int determine_exec_relative_option(int force)
44 {
45 static int relativePaths = -1;
46 if( force || relativePaths==-1 ){
47 int relPathOption = find_option("exec-rel-paths", 0, 0)!=0;
48 int absPathOption = find_option("exec-abs-paths", 0, 0)!=0;
49 #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
50 relativePaths = db_get_boolean("exec-rel-paths", 1);
51 #else
52 relativePaths = db_get_boolean("exec-rel-paths", 0);
53 #endif
54 if( relPathOption ){ relativePaths = 1; }
55 if( absPathOption ){ relativePaths = 0; }
56 }
57 return relativePaths;
58 }
59
60 /*
61 ** Print the "Index:" message that patches wants to see at the top of a diff.
62 */
63 void diff_print_index(const char *zFile, u64 diffFlags){
@@ -384,13 +406,22 @@
406 int isDeleted = db_column_int(&q, 1);
407 int isChnged = db_column_int(&q,2);
408 int isNew = db_column_int(&q,3);
409 int srcid = db_column_int(&q, 4);
410 int isLink = db_column_int(&q, 5);
411 const char *zFullName;
 
412 int showDiff = 1;
413 Blob fname;
414
415 if( determine_exec_relative_option(0) ){
416 blob_zero(&fname);
417 file_relative_name(zPathname, &fname, 1);
418 }else{
419 blob_set(&fname, g.zLocalRoot);
420 blob_append(&fname, zPathname, -1);
421 }
422 zFullName = blob_str(&fname);
423 if( isDeleted ){
424 fossil_print("DELETED %s\n", zPathname);
425 if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; }
426 }else if( file_access(zFullName, F_OK) ){
427 fossil_print("MISSING %s\n", zPathname);
@@ -426,11 +457,11 @@
457 diff_print_index(zPathname, diffFlags);
458 diff_file(&content, isBin, zFullName, zPathname, zDiffCmd,
459 zBinGlob, fIncludeBinary, diffFlags);
460 blob_reset(&content);
461 }
462 blob_reset(&fname);
463 }
464 db_finalize(&q);
465 db_end_transaction(1); /* ROLLBACK */
466 }
467
@@ -816,10 +847,12 @@
847 ** --binary PATTERN Treat files that match the glob PATTERN as binary
848 ** --branch BRANCH Show diff of all changes on BRANCH
849 ** --brief Show filenames only
850 ** --context|-c N Use N lines of context
851 ** --diff-binary BOOL Include binary files when using external commands
852 ** --exec-abs-paths Force absolute path names with external commands.
853 ** --exec-rel-paths Force relative path names with external commands.
854 ** --from|-r VERSION select VERSION as source for the diff
855 ** --internal|-i use internal diff logic
856 ** --side-by-side|-y side-by-side diff
857 ** --strip-trailing-cr Strip trailing CR
858 ** --tk Launch a Tcl/Tk GUI for display
@@ -880,10 +913,11 @@
913 if( !isInternDiff ){
914 zDiffCmd = diff_command_external(isGDiff);
915 }
916 zBinGlob = diff_get_binary_glob();
917 fIncludeBinary = diff_include_binary_files();
918 determine_exec_relative_option(1);
919 verify_all_options();
920 if( againstUndo ){
921 if( db_lget_int("undo_available",0)==0 ){
922 fossil_print("No undo or redo is available\n");
923 return;
924
+37 -3
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -32,10 +32,32 @@
3232
3333
/*
3434
** Used when the name for the diff is unknown.
3535
*/
3636
#define DIFF_NO_NAME "(unknown)"
37
+
38
+/*
39
+** Use the "exec-rel-paths" setting and the --exec-abs-paths and
40
+** --exec-rel-paths command line options to determine whether
41
+** certain external commands are executed using relative paths.
42
+*/
43
+static int determine_exec_relative_option(int force)
44
+{
45
+ static int relativePaths = -1;
46
+ if( force || relativePaths==-1 ){
47
+ int relPathOption = find_option("exec-rel-paths", 0, 0)!=0;
48
+ int absPathOption = find_option("exec-abs-paths", 0, 0)!=0;
49
+#if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
50
+ relativePaths = db_get_boolean("exec-rel-paths", 1);
51
+#else
52
+ relativePaths = db_get_boolean("exec-rel-paths", 0);
53
+#endif
54
+ if( relPathOption ){ relativePaths = 1; }
55
+ if( absPathOption ){ relativePaths = 0; }
56
+ }
57
+ return relativePaths;
58
+}
3759
3860
/*
3961
** Print the "Index:" message that patches wants to see at the top of a diff.
4062
*/
4163
void diff_print_index(const char *zFile, u64 diffFlags){
@@ -384,13 +406,22 @@
384406
int isDeleted = db_column_int(&q, 1);
385407
int isChnged = db_column_int(&q,2);
386408
int isNew = db_column_int(&q,3);
387409
int srcid = db_column_int(&q, 4);
388410
int isLink = db_column_int(&q, 5);
389
- char *zToFree = mprintf("%s%s", g.zLocalRoot, zPathname);
390
- const char *zFullName = zToFree;
411
+ const char *zFullName;
391412
int showDiff = 1;
413
+ Blob fname;
414
+
415
+ if( determine_exec_relative_option(0) ){
416
+ blob_zero(&fname);
417
+ file_relative_name(zPathname, &fname, 1);
418
+ }else{
419
+ blob_set(&fname, g.zLocalRoot);
420
+ blob_append(&fname, zPathname, -1);
421
+ }
422
+ zFullName = blob_str(&fname);
392423
if( isDeleted ){
393424
fossil_print("DELETED %s\n", zPathname);
394425
if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; }
395426
}else if( file_access(zFullName, F_OK) ){
396427
fossil_print("MISSING %s\n", zPathname);
@@ -426,11 +457,11 @@
426457
diff_print_index(zPathname, diffFlags);
427458
diff_file(&content, isBin, zFullName, zPathname, zDiffCmd,
428459
zBinGlob, fIncludeBinary, diffFlags);
429460
blob_reset(&content);
430461
}
431
- free(zToFree);
462
+ blob_reset(&fname);
432463
}
433464
db_finalize(&q);
434465
db_end_transaction(1); /* ROLLBACK */
435466
}
436467
@@ -816,10 +847,12 @@
816847
** --binary PATTERN Treat files that match the glob PATTERN as binary
817848
** --branch BRANCH Show diff of all changes on BRANCH
818849
** --brief Show filenames only
819850
** --context|-c N Use N lines of context
820851
** --diff-binary BOOL Include binary files when using external commands
852
+** --exec-abs-paths Force absolute path names with external commands.
853
+** --exec-rel-paths Force relative path names with external commands.
821854
** --from|-r VERSION select VERSION as source for the diff
822855
** --internal|-i use internal diff logic
823856
** --side-by-side|-y side-by-side diff
824857
** --strip-trailing-cr Strip trailing CR
825858
** --tk Launch a Tcl/Tk GUI for display
@@ -880,10 +913,11 @@
880913
if( !isInternDiff ){
881914
zDiffCmd = diff_command_external(isGDiff);
882915
}
883916
zBinGlob = diff_get_binary_glob();
884917
fIncludeBinary = diff_include_binary_files();
918
+ determine_exec_relative_option(1);
885919
verify_all_options();
886920
if( againstUndo ){
887921
if( db_lget_int("undo_available",0)==0 ){
888922
fossil_print("No undo or redo is available\n");
889923
return;
890924
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -32,10 +32,32 @@
32
33 /*
34 ** Used when the name for the diff is unknown.
35 */
36 #define DIFF_NO_NAME "(unknown)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
38 /*
39 ** Print the "Index:" message that patches wants to see at the top of a diff.
40 */
41 void diff_print_index(const char *zFile, u64 diffFlags){
@@ -384,13 +406,22 @@
384 int isDeleted = db_column_int(&q, 1);
385 int isChnged = db_column_int(&q,2);
386 int isNew = db_column_int(&q,3);
387 int srcid = db_column_int(&q, 4);
388 int isLink = db_column_int(&q, 5);
389 char *zToFree = mprintf("%s%s", g.zLocalRoot, zPathname);
390 const char *zFullName = zToFree;
391 int showDiff = 1;
 
 
 
 
 
 
 
 
 
 
392 if( isDeleted ){
393 fossil_print("DELETED %s\n", zPathname);
394 if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; }
395 }else if( file_access(zFullName, F_OK) ){
396 fossil_print("MISSING %s\n", zPathname);
@@ -426,11 +457,11 @@
426 diff_print_index(zPathname, diffFlags);
427 diff_file(&content, isBin, zFullName, zPathname, zDiffCmd,
428 zBinGlob, fIncludeBinary, diffFlags);
429 blob_reset(&content);
430 }
431 free(zToFree);
432 }
433 db_finalize(&q);
434 db_end_transaction(1); /* ROLLBACK */
435 }
436
@@ -816,10 +847,12 @@
816 ** --binary PATTERN Treat files that match the glob PATTERN as binary
817 ** --branch BRANCH Show diff of all changes on BRANCH
818 ** --brief Show filenames only
819 ** --context|-c N Use N lines of context
820 ** --diff-binary BOOL Include binary files when using external commands
 
 
821 ** --from|-r VERSION select VERSION as source for the diff
822 ** --internal|-i use internal diff logic
823 ** --side-by-side|-y side-by-side diff
824 ** --strip-trailing-cr Strip trailing CR
825 ** --tk Launch a Tcl/Tk GUI for display
@@ -880,10 +913,11 @@
880 if( !isInternDiff ){
881 zDiffCmd = diff_command_external(isGDiff);
882 }
883 zBinGlob = diff_get_binary_glob();
884 fIncludeBinary = diff_include_binary_files();
 
885 verify_all_options();
886 if( againstUndo ){
887 if( db_lget_int("undo_available",0)==0 ){
888 fossil_print("No undo or redo is available\n");
889 return;
890
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -32,10 +32,32 @@
32
33 /*
34 ** Used when the name for the diff is unknown.
35 */
36 #define DIFF_NO_NAME "(unknown)"
37
38 /*
39 ** Use the "exec-rel-paths" setting and the --exec-abs-paths and
40 ** --exec-rel-paths command line options to determine whether
41 ** certain external commands are executed using relative paths.
42 */
43 static int determine_exec_relative_option(int force)
44 {
45 static int relativePaths = -1;
46 if( force || relativePaths==-1 ){
47 int relPathOption = find_option("exec-rel-paths", 0, 0)!=0;
48 int absPathOption = find_option("exec-abs-paths", 0, 0)!=0;
49 #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
50 relativePaths = db_get_boolean("exec-rel-paths", 1);
51 #else
52 relativePaths = db_get_boolean("exec-rel-paths", 0);
53 #endif
54 if( relPathOption ){ relativePaths = 1; }
55 if( absPathOption ){ relativePaths = 0; }
56 }
57 return relativePaths;
58 }
59
60 /*
61 ** Print the "Index:" message that patches wants to see at the top of a diff.
62 */
63 void diff_print_index(const char *zFile, u64 diffFlags){
@@ -384,13 +406,22 @@
406 int isDeleted = db_column_int(&q, 1);
407 int isChnged = db_column_int(&q,2);
408 int isNew = db_column_int(&q,3);
409 int srcid = db_column_int(&q, 4);
410 int isLink = db_column_int(&q, 5);
411 const char *zFullName;
 
412 int showDiff = 1;
413 Blob fname;
414
415 if( determine_exec_relative_option(0) ){
416 blob_zero(&fname);
417 file_relative_name(zPathname, &fname, 1);
418 }else{
419 blob_set(&fname, g.zLocalRoot);
420 blob_append(&fname, zPathname, -1);
421 }
422 zFullName = blob_str(&fname);
423 if( isDeleted ){
424 fossil_print("DELETED %s\n", zPathname);
425 if( !asNewFile ){ showDiff = 0; zFullName = NULL_DEVICE; }
426 }else if( file_access(zFullName, F_OK) ){
427 fossil_print("MISSING %s\n", zPathname);
@@ -426,11 +457,11 @@
457 diff_print_index(zPathname, diffFlags);
458 diff_file(&content, isBin, zFullName, zPathname, zDiffCmd,
459 zBinGlob, fIncludeBinary, diffFlags);
460 blob_reset(&content);
461 }
462 blob_reset(&fname);
463 }
464 db_finalize(&q);
465 db_end_transaction(1); /* ROLLBACK */
466 }
467
@@ -816,10 +847,12 @@
847 ** --binary PATTERN Treat files that match the glob PATTERN as binary
848 ** --branch BRANCH Show diff of all changes on BRANCH
849 ** --brief Show filenames only
850 ** --context|-c N Use N lines of context
851 ** --diff-binary BOOL Include binary files when using external commands
852 ** --exec-abs-paths Force absolute path names with external commands.
853 ** --exec-rel-paths Force relative path names with external commands.
854 ** --from|-r VERSION select VERSION as source for the diff
855 ** --internal|-i use internal diff logic
856 ** --side-by-side|-y side-by-side diff
857 ** --strip-trailing-cr Strip trailing CR
858 ** --tk Launch a Tcl/Tk GUI for display
@@ -880,10 +913,11 @@
913 if( !isInternDiff ){
914 zDiffCmd = diff_command_external(isGDiff);
915 }
916 zBinGlob = diff_get_binary_glob();
917 fIncludeBinary = diff_include_binary_files();
918 determine_exec_relative_option(1);
919 verify_all_options();
920 if( againstUndo ){
921 if( db_lget_int("undo_available",0)==0 ){
922 fossil_print("No undo or redo is available\n");
923 return;
924
+3
--- src/main.c
+++ src/main.c
@@ -1060,10 +1060,13 @@
10601060
#if defined(FOSSIL_ENABLE_SSL)
10611061
fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
10621062
#endif
10631063
#if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
10641064
fossil_print("LEGACY_MV_RM\n");
1065
+#endif
1066
+#if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
1067
+ fossil_print("EXEC_REL_PATHS\n");
10651068
#endif
10661069
#if defined(FOSSIL_ENABLE_TH1_DOCS)
10671070
fossil_print("TH1_DOCS\n");
10681071
#endif
10691072
#if defined(FOSSIL_ENABLE_TH1_HOOKS)
10701073
--- src/main.c
+++ src/main.c
@@ -1060,10 +1060,13 @@
1060 #if defined(FOSSIL_ENABLE_SSL)
1061 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
1062 #endif
1063 #if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
1064 fossil_print("LEGACY_MV_RM\n");
 
 
 
1065 #endif
1066 #if defined(FOSSIL_ENABLE_TH1_DOCS)
1067 fossil_print("TH1_DOCS\n");
1068 #endif
1069 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
1070
--- src/main.c
+++ src/main.c
@@ -1060,10 +1060,13 @@
1060 #if defined(FOSSIL_ENABLE_SSL)
1061 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
1062 #endif
1063 #if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
1064 fossil_print("LEGACY_MV_RM\n");
1065 #endif
1066 #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
1067 fossil_print("EXEC_REL_PATHS\n");
1068 #endif
1069 #if defined(FOSSIL_ENABLE_TH1_DOCS)
1070 fossil_print("TH1_DOCS\n");
1071 #endif
1072 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
1073
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -505,10 +505,14 @@
505505
506506
#### Automatically build OpenSSL when building Fossil (causes rebuild
507507
# issues when building incrementally).
508508
#
509509
# FOSSIL_BUILD_SSL = 1
510
+
511
+#### Enable relative paths in external diff/gdiff
512
+#
513
+# FOSSIL_ENABLE_EXEC_REL_PATHS = 1
510514
511515
#### Enable legacy treatment of mv/rm (skip checkout files)
512516
#
513517
# FOSSIL_ENABLE_LEGACY_MV_RM = 1
514518
@@ -710,10 +714,16 @@
710714
# With HTTPS support
711715
ifdef FOSSIL_ENABLE_SSL
712716
TCC += -DFOSSIL_ENABLE_SSL=1
713717
RCC += -DFOSSIL_ENABLE_SSL=1
714718
endif
719
+
720
+# With relative paths in external diff/gdiff
721
+ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
722
+TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
723
+RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
724
+endif
715725
716726
# With legacy treatment of mv/rm
717727
ifdef FOSSIL_ENABLE_LEGACY_MV_RM
718728
TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
719729
RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
@@ -1339,10 +1349,15 @@
13391349
13401350
# Link everything except SQLite dynamically?
13411351
!ifndef FOSSIL_DYNAMIC_BUILD
13421352
FOSSIL_DYNAMIC_BUILD = 0
13431353
!endif
1354
+
1355
+# Enable relative paths in external diff/gdiff?
1356
+!ifndef FOSSIL_ENABLE_EXEC_REL_PATHS
1357
+FOSSIL_ENABLE_EXEC_REL_PATHS = 0
1358
+!endif
13441359
13451360
# Enable the JSON API?
13461361
!ifndef FOSSIL_ENABLE_JSON
13471362
FOSSIL_ENABLE_JSON = 0
13481363
!endif
@@ -1557,10 +1572,15 @@
15571572
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
15581573
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
15591574
LIBS = $(LIBS) $(SSLLIB)
15601575
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
15611576
!endif
1577
+
1578
+!if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
1579
+TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1
1580
+RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1
1581
+!endif
15621582
15631583
!if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0
15641584
TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
15651585
RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
15661586
!endif
15671587
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -505,10 +505,14 @@
505
506 #### Automatically build OpenSSL when building Fossil (causes rebuild
507 # issues when building incrementally).
508 #
509 # FOSSIL_BUILD_SSL = 1
 
 
 
 
510
511 #### Enable legacy treatment of mv/rm (skip checkout files)
512 #
513 # FOSSIL_ENABLE_LEGACY_MV_RM = 1
514
@@ -710,10 +714,16 @@
710 # With HTTPS support
711 ifdef FOSSIL_ENABLE_SSL
712 TCC += -DFOSSIL_ENABLE_SSL=1
713 RCC += -DFOSSIL_ENABLE_SSL=1
714 endif
 
 
 
 
 
 
715
716 # With legacy treatment of mv/rm
717 ifdef FOSSIL_ENABLE_LEGACY_MV_RM
718 TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
719 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
@@ -1339,10 +1349,15 @@
1339
1340 # Link everything except SQLite dynamically?
1341 !ifndef FOSSIL_DYNAMIC_BUILD
1342 FOSSIL_DYNAMIC_BUILD = 0
1343 !endif
 
 
 
 
 
1344
1345 # Enable the JSON API?
1346 !ifndef FOSSIL_ENABLE_JSON
1347 FOSSIL_ENABLE_JSON = 0
1348 !endif
@@ -1557,10 +1572,15 @@
1557 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1558 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1559 LIBS = $(LIBS) $(SSLLIB)
1560 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1561 !endif
 
 
 
 
 
1562
1563 !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0
1564 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1565 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1566 !endif
1567
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -505,10 +505,14 @@
505
506 #### Automatically build OpenSSL when building Fossil (causes rebuild
507 # issues when building incrementally).
508 #
509 # FOSSIL_BUILD_SSL = 1
510
511 #### Enable relative paths in external diff/gdiff
512 #
513 # FOSSIL_ENABLE_EXEC_REL_PATHS = 1
514
515 #### Enable legacy treatment of mv/rm (skip checkout files)
516 #
517 # FOSSIL_ENABLE_LEGACY_MV_RM = 1
518
@@ -710,10 +714,16 @@
714 # With HTTPS support
715 ifdef FOSSIL_ENABLE_SSL
716 TCC += -DFOSSIL_ENABLE_SSL=1
717 RCC += -DFOSSIL_ENABLE_SSL=1
718 endif
719
720 # With relative paths in external diff/gdiff
721 ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
722 TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
723 RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
724 endif
725
726 # With legacy treatment of mv/rm
727 ifdef FOSSIL_ENABLE_LEGACY_MV_RM
728 TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
729 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
@@ -1339,10 +1349,15 @@
1349
1350 # Link everything except SQLite dynamically?
1351 !ifndef FOSSIL_DYNAMIC_BUILD
1352 FOSSIL_DYNAMIC_BUILD = 0
1353 !endif
1354
1355 # Enable relative paths in external diff/gdiff?
1356 !ifndef FOSSIL_ENABLE_EXEC_REL_PATHS
1357 FOSSIL_ENABLE_EXEC_REL_PATHS = 0
1358 !endif
1359
1360 # Enable the JSON API?
1361 !ifndef FOSSIL_ENABLE_JSON
1362 FOSSIL_ENABLE_JSON = 0
1363 !endif
@@ -1557,10 +1572,15 @@
1572 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1573 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1574 LIBS = $(LIBS) $(SSLLIB)
1575 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1576 !endif
1577
1578 !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
1579 TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1
1580 RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1
1581 !endif
1582
1583 !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0
1584 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1585 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
1586 !endif
1587
--- src/th_main.c
+++ src/th_main.c
@@ -653,10 +653,11 @@
653653
** Return true if the fossil binary has the given compile-time feature
654654
** enabled. The set of features includes:
655655
**
656656
** "ssl" = FOSSIL_ENABLE_SSL
657657
** "legacyMvRm" = FOSSIL_ENABLE_LEGACY_MV_RM
658
+** "execRelPaths" = FOSSIL_ENABLE_EXEC_REL_PATHS
658659
** "th1Docs" = FOSSIL_ENABLE_TH1_DOCS
659660
** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS
660661
** "tcl" = FOSSIL_ENABLE_TCL
661662
** "useTclStubs" = USE_TCL_STUBS
662663
** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS
@@ -692,10 +693,15 @@
692693
#endif
693694
#if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
694695
else if( 0 == fossil_strnicmp( zArg, "legacyMvRm\0", 11 ) ){
695696
rc = 1;
696697
}
698
+#endif
699
+#if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
700
+ else if( 0 == fossil_strnicmp( zArg, "execRelPaths\0", 13 ) ){
701
+ rc = 1;
702
+ }
697703
#endif
698704
#if defined(FOSSIL_ENABLE_TH1_DOCS)
699705
else if( 0 == fossil_strnicmp( zArg, "th1Docs\0", 8 ) ){
700706
rc = 1;
701707
}
702708
--- src/th_main.c
+++ src/th_main.c
@@ -653,10 +653,11 @@
653 ** Return true if the fossil binary has the given compile-time feature
654 ** enabled. The set of features includes:
655 **
656 ** "ssl" = FOSSIL_ENABLE_SSL
657 ** "legacyMvRm" = FOSSIL_ENABLE_LEGACY_MV_RM
 
658 ** "th1Docs" = FOSSIL_ENABLE_TH1_DOCS
659 ** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS
660 ** "tcl" = FOSSIL_ENABLE_TCL
661 ** "useTclStubs" = USE_TCL_STUBS
662 ** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS
@@ -692,10 +693,15 @@
692 #endif
693 #if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
694 else if( 0 == fossil_strnicmp( zArg, "legacyMvRm\0", 11 ) ){
695 rc = 1;
696 }
 
 
 
 
 
697 #endif
698 #if defined(FOSSIL_ENABLE_TH1_DOCS)
699 else if( 0 == fossil_strnicmp( zArg, "th1Docs\0", 8 ) ){
700 rc = 1;
701 }
702
--- src/th_main.c
+++ src/th_main.c
@@ -653,10 +653,11 @@
653 ** Return true if the fossil binary has the given compile-time feature
654 ** enabled. The set of features includes:
655 **
656 ** "ssl" = FOSSIL_ENABLE_SSL
657 ** "legacyMvRm" = FOSSIL_ENABLE_LEGACY_MV_RM
658 ** "execRelPaths" = FOSSIL_ENABLE_EXEC_REL_PATHS
659 ** "th1Docs" = FOSSIL_ENABLE_TH1_DOCS
660 ** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS
661 ** "tcl" = FOSSIL_ENABLE_TCL
662 ** "useTclStubs" = USE_TCL_STUBS
663 ** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS
@@ -692,10 +693,15 @@
693 #endif
694 #if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
695 else if( 0 == fossil_strnicmp( zArg, "legacyMvRm\0", 11 ) ){
696 rc = 1;
697 }
698 #endif
699 #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
700 else if( 0 == fossil_strnicmp( zArg, "execRelPaths\0", 13 ) ){
701 rc = 1;
702 }
703 #endif
704 #if defined(FOSSIL_ENABLE_TH1_DOCS)
705 else if( 0 == fossil_strnicmp( zArg, "th1Docs\0", 8 ) ){
706 rc = 1;
707 }
708
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -56,10 +56,14 @@
5656
5757
#### Automatically build OpenSSL when building Fossil (causes rebuild
5858
# issues when building incrementally).
5959
#
6060
# FOSSIL_BUILD_SSL = 1
61
+
62
+#### Enable relative paths in external diff/gdiff
63
+#
64
+# FOSSIL_ENABLE_EXEC_REL_PATHS = 1
6165
6266
#### Enable legacy treatment of mv/rm (skip checkout files)
6367
#
6468
# FOSSIL_ENABLE_LEGACY_MV_RM = 1
6569
@@ -261,10 +265,16 @@
261265
# With HTTPS support
262266
ifdef FOSSIL_ENABLE_SSL
263267
TCC += -DFOSSIL_ENABLE_SSL=1
264268
RCC += -DFOSSIL_ENABLE_SSL=1
265269
endif
270
+
271
+# With relative paths in external diff/gdiff
272
+ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
273
+TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
274
+RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
275
+endif
266276
267277
# With legacy treatment of mv/rm
268278
ifdef FOSSIL_ENABLE_LEGACY_MV_RM
269279
TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
270280
RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
271281
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -56,10 +56,14 @@
56
57 #### Automatically build OpenSSL when building Fossil (causes rebuild
58 # issues when building incrementally).
59 #
60 # FOSSIL_BUILD_SSL = 1
 
 
 
 
61
62 #### Enable legacy treatment of mv/rm (skip checkout files)
63 #
64 # FOSSIL_ENABLE_LEGACY_MV_RM = 1
65
@@ -261,10 +265,16 @@
261 # With HTTPS support
262 ifdef FOSSIL_ENABLE_SSL
263 TCC += -DFOSSIL_ENABLE_SSL=1
264 RCC += -DFOSSIL_ENABLE_SSL=1
265 endif
 
 
 
 
 
 
266
267 # With legacy treatment of mv/rm
268 ifdef FOSSIL_ENABLE_LEGACY_MV_RM
269 TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
270 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
271
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -56,10 +56,14 @@
56
57 #### Automatically build OpenSSL when building Fossil (causes rebuild
58 # issues when building incrementally).
59 #
60 # FOSSIL_BUILD_SSL = 1
61
62 #### Enable relative paths in external diff/gdiff
63 #
64 # FOSSIL_ENABLE_EXEC_REL_PATHS = 1
65
66 #### Enable legacy treatment of mv/rm (skip checkout files)
67 #
68 # FOSSIL_ENABLE_LEGACY_MV_RM = 1
69
@@ -261,10 +265,16 @@
265 # With HTTPS support
266 ifdef FOSSIL_ENABLE_SSL
267 TCC += -DFOSSIL_ENABLE_SSL=1
268 RCC += -DFOSSIL_ENABLE_SSL=1
269 endif
270
271 # With relative paths in external diff/gdiff
272 ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
273 TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
274 RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
275 endif
276
277 # With legacy treatment of mv/rm
278 ifdef FOSSIL_ENABLE_LEGACY_MV_RM
279 TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
280 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
281
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -56,10 +56,14 @@
5656
5757
#### Automatically build OpenSSL when building Fossil (causes rebuild
5858
# issues when building incrementally).
5959
#
6060
# FOSSIL_BUILD_SSL = 1
61
+
62
+#### Enable relative paths in external diff/gdiff
63
+#
64
+# FOSSIL_ENABLE_EXEC_REL_PATHS = 1
6165
6266
#### Enable legacy treatment of mv/rm (skip checkout files)
6367
#
6468
FOSSIL_ENABLE_LEGACY_MV_RM = 1
6569
@@ -261,10 +265,16 @@
261265
# With HTTPS support
262266
ifdef FOSSIL_ENABLE_SSL
263267
TCC += -DFOSSIL_ENABLE_SSL=1
264268
RCC += -DFOSSIL_ENABLE_SSL=1
265269
endif
270
+
271
+# With relative paths in external diff/gdiff
272
+ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
273
+TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
274
+RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
275
+endif
266276
267277
# With legacy treatment of mv/rm
268278
ifdef FOSSIL_ENABLE_LEGACY_MV_RM
269279
TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
270280
RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
271281
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -56,10 +56,14 @@
56
57 #### Automatically build OpenSSL when building Fossil (causes rebuild
58 # issues when building incrementally).
59 #
60 # FOSSIL_BUILD_SSL = 1
 
 
 
 
61
62 #### Enable legacy treatment of mv/rm (skip checkout files)
63 #
64 FOSSIL_ENABLE_LEGACY_MV_RM = 1
65
@@ -261,10 +265,16 @@
261 # With HTTPS support
262 ifdef FOSSIL_ENABLE_SSL
263 TCC += -DFOSSIL_ENABLE_SSL=1
264 RCC += -DFOSSIL_ENABLE_SSL=1
265 endif
 
 
 
 
 
 
266
267 # With legacy treatment of mv/rm
268 ifdef FOSSIL_ENABLE_LEGACY_MV_RM
269 TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
270 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
271
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -56,10 +56,14 @@
56
57 #### Automatically build OpenSSL when building Fossil (causes rebuild
58 # issues when building incrementally).
59 #
60 # FOSSIL_BUILD_SSL = 1
61
62 #### Enable relative paths in external diff/gdiff
63 #
64 # FOSSIL_ENABLE_EXEC_REL_PATHS = 1
65
66 #### Enable legacy treatment of mv/rm (skip checkout files)
67 #
68 FOSSIL_ENABLE_LEGACY_MV_RM = 1
69
@@ -261,10 +265,16 @@
265 # With HTTPS support
266 ifdef FOSSIL_ENABLE_SSL
267 TCC += -DFOSSIL_ENABLE_SSL=1
268 RCC += -DFOSSIL_ENABLE_SSL=1
269 endif
270
271 # With relative paths in external diff/gdiff
272 ifdef FOSSIL_ENABLE_EXEC_REL_PATHS
273 TCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
274 RCC += -DFOSSIL_ENABLE_EXEC_REL_PATHS=1
275 endif
276
277 # With legacy treatment of mv/rm
278 ifdef FOSSIL_ENABLE_LEGACY_MV_RM
279 TCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
280 RCC += -DFOSSIL_ENABLE_LEGACY_MV_RM=1
281
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -46,10 +46,15 @@
4646
4747
# Link everything except SQLite dynamically?
4848
!ifndef FOSSIL_DYNAMIC_BUILD
4949
FOSSIL_DYNAMIC_BUILD = 0
5050
!endif
51
+
52
+# Enable relative paths in external diff/gdiff?
53
+!ifndef FOSSIL_ENABLE_EXEC_REL_PATHS
54
+FOSSIL_ENABLE_EXEC_REL_PATHS = 0
55
+!endif
5156
5257
# Enable the JSON API?
5358
!ifndef FOSSIL_ENABLE_JSON
5459
FOSSIL_ENABLE_JSON = 0
5560
!endif
@@ -264,10 +269,15 @@
264269
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
265270
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
266271
LIBS = $(LIBS) $(SSLLIB)
267272
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
268273
!endif
274
+
275
+!if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
276
+TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1
277
+RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1
278
+!endif
269279
270280
!if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0
271281
TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
272282
RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
273283
!endif
274284
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -46,10 +46,15 @@
46
47 # Link everything except SQLite dynamically?
48 !ifndef FOSSIL_DYNAMIC_BUILD
49 FOSSIL_DYNAMIC_BUILD = 0
50 !endif
 
 
 
 
 
51
52 # Enable the JSON API?
53 !ifndef FOSSIL_ENABLE_JSON
54 FOSSIL_ENABLE_JSON = 0
55 !endif
@@ -264,10 +269,15 @@
264 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
265 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
266 LIBS = $(LIBS) $(SSLLIB)
267 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
268 !endif
 
 
 
 
 
269
270 !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0
271 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
272 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
273 !endif
274
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -46,10 +46,15 @@
46
47 # Link everything except SQLite dynamically?
48 !ifndef FOSSIL_DYNAMIC_BUILD
49 FOSSIL_DYNAMIC_BUILD = 0
50 !endif
51
52 # Enable relative paths in external diff/gdiff?
53 !ifndef FOSSIL_ENABLE_EXEC_REL_PATHS
54 FOSSIL_ENABLE_EXEC_REL_PATHS = 0
55 !endif
56
57 # Enable the JSON API?
58 !ifndef FOSSIL_ENABLE_JSON
59 FOSSIL_ENABLE_JSON = 0
60 !endif
@@ -264,10 +269,15 @@
269 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
270 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
271 LIBS = $(LIBS) $(SSLLIB)
272 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
273 !endif
274
275 !if $(FOSSIL_ENABLE_EXEC_REL_PATHS)!=0
276 TCC = $(TCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1
277 RCC = $(RCC) /DFOSSIL_ENABLE_EXEC_REL_PATHS=1
278 !endif
279
280 !if $(FOSSIL_ENABLE_LEGACY_MV_RM)!=0
281 TCC = $(TCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
282 RCC = $(RCC) /DFOSSIL_ENABLE_LEGACY_MV_RM=1
283 !endif
284
--- win/fossil.rc
+++ win/fossil.rc
@@ -125,10 +125,15 @@
125125
#if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
126126
VALUE "LegacyMvRm", "Yes\0"
127127
#else
128128
VALUE "LegacyMvRm", "No\0"
129129
#endif /* defined(FOSSIL_ENABLE_LEGACY_MV_RM) */
130
+#if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
131
+ VALUE "ExecRelPaths", "Yes\0"
132
+#else
133
+ VALUE "ExecRelPaths", "No\0"
134
+#endif /* defined(FOSSIL_ENABLE_EXEC_REL_PATHS) */
130135
#if defined(FOSSIL_ENABLE_TH1_DOCS)
131136
VALUE "Th1Docs", "Yes\0"
132137
#else
133138
VALUE "Th1Docs", "No\0"
134139
#endif /* defined(FOSSIL_ENABLE_TH1_DOCS) */
135140
--- win/fossil.rc
+++ win/fossil.rc
@@ -125,10 +125,15 @@
125 #if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
126 VALUE "LegacyMvRm", "Yes\0"
127 #else
128 VALUE "LegacyMvRm", "No\0"
129 #endif /* defined(FOSSIL_ENABLE_LEGACY_MV_RM) */
 
 
 
 
 
130 #if defined(FOSSIL_ENABLE_TH1_DOCS)
131 VALUE "Th1Docs", "Yes\0"
132 #else
133 VALUE "Th1Docs", "No\0"
134 #endif /* defined(FOSSIL_ENABLE_TH1_DOCS) */
135
--- win/fossil.rc
+++ win/fossil.rc
@@ -125,10 +125,15 @@
125 #if defined(FOSSIL_ENABLE_LEGACY_MV_RM)
126 VALUE "LegacyMvRm", "Yes\0"
127 #else
128 VALUE "LegacyMvRm", "No\0"
129 #endif /* defined(FOSSIL_ENABLE_LEGACY_MV_RM) */
130 #if defined(FOSSIL_ENABLE_EXEC_REL_PATHS)
131 VALUE "ExecRelPaths", "Yes\0"
132 #else
133 VALUE "ExecRelPaths", "No\0"
134 #endif /* defined(FOSSIL_ENABLE_EXEC_REL_PATHS) */
135 #if defined(FOSSIL_ENABLE_TH1_DOCS)
136 VALUE "Th1Docs", "Yes\0"
137 #else
138 VALUE "Th1Docs", "No\0"
139 #endif /* defined(FOSSIL_ENABLE_TH1_DOCS) */
140
+1
--- www/th1.md
+++ www/th1.md
@@ -319,10 +319,11 @@
319319
Returns true if the binary has the given compile-time feature enabled.
320320
The possible features are:
321321
322322
1. **ssl** -- _Support for the HTTPS transport._
323323
1. **legacyMvRm** -- _Support for legacy mv/rm command behavior._
324
+ 1. **execRelPaths** -- _Use relative paths with external diff/gdiff._
324325
1. **th1Docs** -- _Support for TH1 in embedded documentation._
325326
1. **th1Hooks** -- _Support for TH1 command and web page hooks._
326327
1. **tcl** -- _Support for Tcl integration._
327328
1. **useTclStubs** -- _Tcl stubs enabled in the Tcl headers._
328329
1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._
329330
--- www/th1.md
+++ www/th1.md
@@ -319,10 +319,11 @@
319 Returns true if the binary has the given compile-time feature enabled.
320 The possible features are:
321
322 1. **ssl** -- _Support for the HTTPS transport._
323 1. **legacyMvRm** -- _Support for legacy mv/rm command behavior._
 
324 1. **th1Docs** -- _Support for TH1 in embedded documentation._
325 1. **th1Hooks** -- _Support for TH1 command and web page hooks._
326 1. **tcl** -- _Support for Tcl integration._
327 1. **useTclStubs** -- _Tcl stubs enabled in the Tcl headers._
328 1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._
329
--- www/th1.md
+++ www/th1.md
@@ -319,10 +319,11 @@
319 Returns true if the binary has the given compile-time feature enabled.
320 The possible features are:
321
322 1. **ssl** -- _Support for the HTTPS transport._
323 1. **legacyMvRm** -- _Support for legacy mv/rm command behavior._
324 1. **execRelPaths** -- _Use relative paths with external diff/gdiff._
325 1. **th1Docs** -- _Support for TH1 in embedded documentation._
326 1. **th1Hooks** -- _Support for TH1 command and web page hooks._
327 1. **tcl** -- _Support for Tcl integration._
328 1. **useTclStubs** -- _Tcl stubs enabled in the Tcl headers._
329 1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._
330

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button