Fossil

Diff
Login

Differences From Artifact [eba50dbae4]:

To Artifact [eaa04c096c]:


46
47
48
49
50
51
52










































53
54
55
56
57
58
59
struct Stmt {
  Blob sql;               /* The SQL for this statement */
  sqlite3_stmt *pStmt;    /* The results of sqlite3_prepare() */
  Stmt *pNext, *pPrev;    /* List of all unfinalized statements */
  int nStep;              /* Number of sqlite3_step() calls */
};
#endif /* INTERFACE */











































/*
** Call this routine when a database error occurs.
*/
static void db_err(const char *zFormat, ...){
  va_list ap;
  char *z;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
struct Stmt {
  Blob sql;               /* The SQL for this statement */
  sqlite3_stmt *pStmt;    /* The results of sqlite3_prepare() */
  Stmt *pNext, *pPrev;    /* List of all unfinalized statements */
  int nStep;              /* Number of sqlite3_step() calls */
};
#endif /* INTERFACE */

/*
** Get the configured name for the manifest file
*/
const char* db_manifestName(void){
  static char zManifestFNDefault[] = "manifest";

  if (!g.zManifestFN){
    char *zManifestFNPara;

    zManifestFNPara = db_get("manifest",zManifestFNDefault);
    if (!zManifestFNPara || !*zManifestFNPara){
      zManifestFNPara = zManifestFNDefault;
    }
    g.zManifestFN = mprintf("%s",db_get("manifest",zManifestFNPara));
  }
  return (g.zManifestFN);
}

/*
** Get the configured name for the manifest.uuid file
*/
const char* db_manifestUuidName(void){
  if (!g.zManifestUuidFN){
    g.zManifestUuidFN = mprintf("%s.uuid",db_manifestName());
  }
  return (g.zManifestUuidFN);
}

/*
** clear manifest filename caches
*/
void db_FreeManifestNames(void){
  if (g.zManifestFN){
    free(g.zManifestFN);
    g.zManifestFN = 0;
  }
  if (g.zManifestUuidFN){
    free(g.zManifestUuidFN);
    g.zManifestUuidFN = 0;
  }
}

/*
** Call this routine when a database error occurs.
*/
static void db_err(const char *zFormat, ...){
  va_list ap;
  char *z;
781
782
783
784
785
786
787


788
789
790
791
792
793
794
        /* Found a valid checkout database file */
        zPwd[n] = 0;
        while( n>1 && zPwd[n-1]=='/' ){
          n--;
          zPwd[n] = 0;
        }
        g.zLocalRoot = mprintf("%s/", zPwd);


        return 1;
      }
    }
    n--;
    while( n>0 && zPwd[n]!='/' ){ n--; }
    while( n>0 && zPwd[n-1]=='/' ){ n--; }
    zPwd[n] = 0;







>
>







823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
        /* Found a valid checkout database file */
        zPwd[n] = 0;
        while( n>1 && zPwd[n-1]=='/' ){
          n--;
          zPwd[n] = 0;
        }
        g.zLocalRoot = mprintf("%s/", zPwd);
        g.zManifestFN = 0;
        g.zManifestUuidFN = 0;
        return 1;
      }
    }
    n--;
    while( n>0 && zPwd[n]!='/' ){ n--; }
    while( n>0 && zPwd[n-1]=='/' ){ n--; }
    zPwd[n] = 0;
1520
1521
1522
1523
1524
1525
1526

1527
1528
1529
1530
1531
1532
1533
  { "diff-command",  0,               16, "diff"                },
  { "dont-push",     0,                0, "0"                   },
  { "editor",        0,               16, ""                    },
  { "gdiff-command", 0,               16, "gdiff"               },
  { "ignore-glob",   0,               40, ""                    },
  { "http-port",     0,               16, "8080"                },
  { "localauth",     0,                0, "0"                   },

  { "mtime-changes", 0,                0, "0"                   },
  { "pgp-command",   0,               32, "gpg --clearsign -o " },
  { "proxy",         0,               32, "off"                 },
  { "ssh-command",   0,               32, ""                    },
  { "web-browser",   0,               32, ""                    },
  { 0,0,0,0 }
};







>







1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
  { "diff-command",  0,               16, "diff"                },
  { "dont-push",     0,                0, "0"                   },
  { "editor",        0,               16, ""                    },
  { "gdiff-command", 0,               16, "gdiff"               },
  { "ignore-glob",   0,               40, ""                    },
  { "http-port",     0,               16, "8080"                },
  { "localauth",     0,                0, "0"                   },
  { "manifest",      0,               32, ""                    },
  { "mtime-changes", 0,                0, "0"                   },
  { "pgp-command",   0,               32, "gpg --clearsign -o " },
  { "proxy",         0,               32, "off"                 },
  { "ssh-command",   0,               32, ""                    },
  { "web-browser",   0,               32, ""                    },
  { 0,0,0,0 }
};
1582
1583
1584
1585
1586
1587
1588


1589
1590
1591
1592
1593
1594
1595
**                     specifying files that the "extra" command will ignore.
**                     Example:  *.o,*.obj,*.exe
**
**    localauth        If enabled, require that HTTP connections from
**                     127.0.0.1 be authenticated by password.  If
**                     false, all HTTP requests from localhost have
**                     unrestricted access to the repository.


**
**    mtime-changes    Use file modification times (mtimes) to detect when
**                     files have been modified.  (Default "on".)
**
**    pgp-command      Command used to clear-sign manifests at check-in.
**                     The default is "gpg --clearsign -o ".
**







>
>







1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
**                     specifying files that the "extra" command will ignore.
**                     Example:  *.o,*.obj,*.exe
**
**    localauth        If enabled, require that HTTP connections from
**                     127.0.0.1 be authenticated by password.  If
**                     false, all HTTP requests from localhost have
**                     unrestricted access to the repository.
**
**    manifest         name of manifest file, standard is manifest
**
**    mtime-changes    Use file modification times (mtimes) to detect when
**                     files have been modified.  (Default "on".)
**
**    pgp-command      Command used to clear-sign manifests at check-in.
**                     The default is "gpg --clearsign -o ".
**
1637
1638
1639
1640
1641
1642
1643

1644
      db_set(ctrlSettings[i].name, g.argv[3], globalFlag);
    }else{
      print_setting(ctrlSettings[i].name);
    }
  }else{
    usage("?PROPERTY? ?VALUE?");
  }

}







>

1684
1685
1686
1687
1688
1689
1690
1691
1692
      db_set(ctrlSettings[i].name, g.argv[3], globalFlag);
    }else{
      print_setting(ctrlSettings[i].name);
    }
  }else{
    usage("?PROPERTY? ?VALUE?");
  }
  db_FreeManifestNames();
}