Fossil

Check-in [c8a88273]
Login

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

Overview
Comment:Make option --exec-rel-paths actually work, in stead of just giving: "unrecognized command-line option, or missing argument: --exec-rel-paths"
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | exec-rel-paths
Files: files | file ages | folders
SHA1: c8a8827309b3ea050a71a50f9686cdf8cebcd76c
User & Date: jan.nijtmans 2015-06-11 08:33:19
Context
2015-06-11
08:41
Slight optimization: don't bother checking the options, when either --exec-abs-paths or --exec-rel-paths is specified. check-in: e86aafed user: jan.nijtmans tags: exec-rel-paths
08:33
Make option --exec-rel-paths actually work, in stead of just giving: "unrecognized command-line option, or missing argument: --exec-rel-paths" check-in: c8a88273 user: jan.nijtmans tags: exec-rel-paths
2015-06-10
04:04
Add help text for the new setting. check-in: 2369a92f user: mistachkin tags: exec-rel-paths
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/diffcmd.c.

38
39
40
41
42
43
44
45
46
47
48
49

50
51
52
53
54
55
56
...
825
826
827
828
829
830
831

832
833
834
835
836
837
838
/*
** Use the "exec-rel-paths" setting and the --exec-abs-paths and
** --exec-rel-paths command line options to determine whether
** certain external commands are executed using relative paths.
*/
static int determine_exec_relative_option()
{
  int relativePaths = db_get_boolean("exec-rel-paths", 0);
  int relPathOption = find_option("exec-rel-paths", 0, 0)!=0;
  int absPathOption = find_option("exec-abs-paths", 0, 0)!=0;
  if( relPathOption ){ relativePaths = 1; }
  if( absPathOption ){ relativePaths = 0; }

  return relativePaths;
}

/*
** Print the "Index:" message that patches wants to see at the top of a diff.
*/
void diff_print_index(const char *zFile, u64 diffFlags){
................................................................................
  if( zTo==0 ){
    db_must_be_within_tree();
    if( !isInternDiff ){
      zDiffCmd = diff_command_external(isGDiff);
    }
    zBinGlob = diff_get_binary_glob();
    fIncludeBinary = diff_include_binary_files();

    verify_all_options();
    if( g.argc>=3 ){
      for(f=2; f<g.argc; ++f){
        diff_one_against_disk(zFrom, zDiffCmd, zBinGlob, fIncludeBinary,
                              diffFlags, g.argv[f]);
      }
    }else{







|
|
|
|
|
>







 







>







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
/*
** Use the "exec-rel-paths" setting and the --exec-abs-paths and
** --exec-rel-paths command line options to determine whether
** certain external commands are executed using relative paths.
*/
static int determine_exec_relative_option()
{
  static int relativePaths = -1;
  if( relativePaths == -1 ){
    relativePaths = db_get_boolean("exec-rel-paths", 0);
    if( find_option("exec-rel-paths", 0, 0)!=0 ){ relativePaths = 1; }
    if( find_option("exec-abs-paths", 0, 0)!=0 ){ relativePaths = 0; }
  }
  return relativePaths;
}

/*
** Print the "Index:" message that patches wants to see at the top of a diff.
*/
void diff_print_index(const char *zFile, u64 diffFlags){
................................................................................
  if( zTo==0 ){
    db_must_be_within_tree();
    if( !isInternDiff ){
      zDiffCmd = diff_command_external(isGDiff);
    }
    zBinGlob = diff_get_binary_glob();
    fIncludeBinary = diff_include_binary_files();
    determine_exec_relative_option();
    verify_all_options();
    if( g.argc>=3 ){
      for(f=2; f<g.argc; ++f){
        diff_one_against_disk(zFrom, zDiffCmd, zBinGlob, fIncludeBinary,
                              diffFlags, g.argv[f]);
      }
    }else{