Fossil SCM
Add check for win32/cygwin whether the config-db is writable in stead of checking that the $HOME directory is writable. Eliminate g.zHome and g.configOpen, in stead use a single g.configDbName. Then people no longer have to guess whether the config db name is ".fossil" or "_fossil". g.zHome was only used for locating the config db, nothing else.
Commit
473e08a6d190a66c4fc9a44e0fa83010f23302d6
Parent
ab2920c2b9478b4…
14 files changed
+3
+3
+14
-22
+14
-22
+2
-4
+2
-4
+1
-2
+1
-2
-2
-2
+1
-2
+1
-2
+1
-1
+1
-1
+3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -203,10 +203,13 @@ | ||
| 203 | 203 | int vid; |
| 204 | 204 | db_must_be_within_tree(); |
| 205 | 205 | /* 012345678901234 */ |
| 206 | 206 | fossil_print("repository: %s\n", db_repository_filename()); |
| 207 | 207 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 208 | + if( g.configDbName ){ | |
| 209 | + fossil_print("config-db: %s\n", g.configDbName); | |
| 210 | + } | |
| 208 | 211 | vid = db_lget_int("checkout", 0); |
| 209 | 212 | if( vid ){ |
| 210 | 213 | show_common_info(vid, "checkout:", 1, 1); |
| 211 | 214 | } |
| 212 | 215 | db_record_repository_filename(0); |
| 213 | 216 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -203,10 +203,13 @@ | |
| 203 | int vid; |
| 204 | db_must_be_within_tree(); |
| 205 | /* 012345678901234 */ |
| 206 | fossil_print("repository: %s\n", db_repository_filename()); |
| 207 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 208 | vid = db_lget_int("checkout", 0); |
| 209 | if( vid ){ |
| 210 | show_common_info(vid, "checkout:", 1, 1); |
| 211 | } |
| 212 | db_record_repository_filename(0); |
| 213 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -203,10 +203,13 @@ | |
| 203 | int vid; |
| 204 | db_must_be_within_tree(); |
| 205 | /* 012345678901234 */ |
| 206 | fossil_print("repository: %s\n", db_repository_filename()); |
| 207 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 208 | if( g.configDbName ){ |
| 209 | fossil_print("config-db: %s\n", g.configDbName); |
| 210 | } |
| 211 | vid = db_lget_int("checkout", 0); |
| 212 | if( vid ){ |
| 213 | show_common_info(vid, "checkout:", 1, 1); |
| 214 | } |
| 215 | db_record_repository_filename(0); |
| 216 |
+3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -203,10 +203,13 @@ | ||
| 203 | 203 | int vid; |
| 204 | 204 | db_must_be_within_tree(); |
| 205 | 205 | /* 012345678901234 */ |
| 206 | 206 | fossil_print("repository: %s\n", db_repository_filename()); |
| 207 | 207 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 208 | + if( g.configDbName ){ | |
| 209 | + fossil_print("config-db: %s\n", g.configDbName); | |
| 210 | + } | |
| 208 | 211 | vid = db_lget_int("checkout", 0); |
| 209 | 212 | if( vid ){ |
| 210 | 213 | show_common_info(vid, "checkout:", 1, 1); |
| 211 | 214 | } |
| 212 | 215 | db_record_repository_filename(0); |
| 213 | 216 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -203,10 +203,13 @@ | |
| 203 | int vid; |
| 204 | db_must_be_within_tree(); |
| 205 | /* 012345678901234 */ |
| 206 | fossil_print("repository: %s\n", db_repository_filename()); |
| 207 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 208 | vid = db_lget_int("checkout", 0); |
| 209 | if( vid ){ |
| 210 | show_common_info(vid, "checkout:", 1, 1); |
| 211 | } |
| 212 | db_record_repository_filename(0); |
| 213 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -203,10 +203,13 @@ | |
| 203 | int vid; |
| 204 | db_must_be_within_tree(); |
| 205 | /* 012345678901234 */ |
| 206 | fossil_print("repository: %s\n", db_repository_filename()); |
| 207 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 208 | if( g.configDbName ){ |
| 209 | fossil_print("config-db: %s\n", g.configDbName); |
| 210 | } |
| 211 | vid = db_lget_int("checkout", 0); |
| 212 | if( vid ){ |
| 213 | show_common_info(vid, "checkout:", 1, 1); |
| 214 | } |
| 215 | db_record_repository_filename(0); |
| 216 |
M
src/db.c
+14
-22
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -792,11 +792,11 @@ | ||
| 792 | 792 | ** case, invoke this routine with useAttach as 1. |
| 793 | 793 | */ |
| 794 | 794 | void db_open_config(int useAttach){ |
| 795 | 795 | char *zDbName; |
| 796 | 796 | char *zHome; |
| 797 | - if( g.configOpen ) return; | |
| 797 | + if( g.configDbName ) return; | |
| 798 | 798 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 799 | 799 | zHome = fossil_getenv("LOCALAPPDATA"); |
| 800 | 800 | if( zHome==0 ){ |
| 801 | 801 | zHome = fossil_getenv("APPDATA"); |
| 802 | 802 | if( zHome==0 ){ |
| @@ -803,18 +803,10 @@ | ||
| 803 | 803 | char *zDrive = fossil_getenv("HOMEDRIVE"); |
| 804 | 804 | zHome = fossil_getenv("HOMEPATH"); |
| 805 | 805 | if( zDrive && zHome ) zHome = mprintf("%s%s", zDrive, zHome); |
| 806 | 806 | } |
| 807 | 807 | } |
| 808 | -#if defined(__CYGWIN__) | |
| 809 | - if( zHome!=0 ){ | |
| 810 | - /* We now have the win32 path, but we need the Cygwin equivalent. */ | |
| 811 | - char *zPath = fossil_utf8_to_filename(zHome); | |
| 812 | - fossil_filename_free(zHome); | |
| 813 | - zHome = zPath; | |
| 814 | - } | |
| 815 | -#endif | |
| 816 | 808 | if( zHome==0 ){ |
| 817 | 809 | fossil_fatal("cannot locate home directory - " |
| 818 | 810 | "please set the LOCALAPPDATA or APPDATA or HOMEPATH " |
| 819 | 811 | "environment variables"); |
| 820 | 812 | } |
| @@ -826,37 +818,37 @@ | ||
| 826 | 818 | } |
| 827 | 819 | #endif |
| 828 | 820 | if( file_isdir(zHome)!=1 ){ |
| 829 | 821 | fossil_fatal("invalid home directory: %s", zHome); |
| 830 | 822 | } |
| 831 | -#if !defined(_WIN32) | |
| 832 | - if( file_access(zHome, W_OK) ){ | |
| 833 | - fossil_fatal("home directory %s must be writeable", zHome); | |
| 834 | - } | |
| 835 | -#endif | |
| 836 | - g.zHome = mprintf("%/", zHome); | |
| 837 | 823 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 838 | 824 | /* . filenames give some window systems problems and many apps problems */ |
| 839 | 825 | zDbName = mprintf("%//_fossil", zHome); |
| 840 | 826 | #else |
| 827 | + if( file_access(zHome, W_OK) ){ | |
| 828 | + fossil_fatal("home directory %s must be writeable", zHome); | |
| 829 | + } | |
| 841 | 830 | zDbName = mprintf("%s/.fossil", zHome); |
| 842 | 831 | #endif |
| 843 | 832 | if( file_size(zDbName)<1024*3 ){ |
| 844 | 833 | db_init_database(zDbName, zConfigSchema, (char*)0); |
| 845 | 834 | } |
| 835 | +#if defined(_WIN32) || defined(__CYGWIN__) | |
| 836 | + if( file_access(zDbName, W_OK) ){ | |
| 837 | + fossil_fatal("configuration file %s must be writeable", zDbName); | |
| 838 | + } | |
| 839 | +#endif | |
| 846 | 840 | if( useAttach ){ |
| 847 | 841 | db_open_or_attach(zDbName, "configdb", &g.useAttach); |
| 848 | 842 | g.dbConfig = 0; |
| 849 | 843 | g.zConfigDbType = 0; |
| 850 | 844 | }else{ |
| 851 | 845 | g.useAttach = 0; |
| 852 | 846 | g.dbConfig = db_open(zDbName); |
| 853 | 847 | g.zConfigDbType = "configdb"; |
| 854 | 848 | } |
| 855 | - g.configOpen = 1; | |
| 856 | - free(zDbName); | |
| 857 | - fossil_filename_free(zHome); | |
| 849 | + g.configDbName = zDbName; | |
| 858 | 850 | } |
| 859 | 851 | |
| 860 | 852 | |
| 861 | 853 | /* |
| 862 | 854 | ** Returns TRUE if zTable exists in the local database but lacks column |
| @@ -1212,11 +1204,11 @@ | ||
| 1212 | 1204 | fossil_warning("unfinalized SQL statement: [%s]", sqlite3_sql(pStmt)); |
| 1213 | 1205 | } |
| 1214 | 1206 | } |
| 1215 | 1207 | g.repositoryOpen = 0; |
| 1216 | 1208 | g.localOpen = 0; |
| 1217 | - g.configOpen = 0; | |
| 1209 | + g.configDbName = NULL; | |
| 1218 | 1210 | sqlite3_wal_checkpoint(g.db, 0); |
| 1219 | 1211 | sqlite3_close(g.db); |
| 1220 | 1212 | g.db = 0; |
| 1221 | 1213 | g.zMainDbType = 0; |
| 1222 | 1214 | if( g.dbConfig ){ |
| @@ -1775,11 +1767,11 @@ | ||
| 1775 | 1767 | } |
| 1776 | 1768 | } |
| 1777 | 1769 | if( g.repositoryOpen ){ |
| 1778 | 1770 | z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName); |
| 1779 | 1771 | } |
| 1780 | - if( z==0 && g.configOpen ){ | |
| 1772 | + if( z==0 && g.configDbName ){ | |
| 1781 | 1773 | db_swap_connections(); |
| 1782 | 1774 | z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1783 | 1775 | db_swap_connections(); |
| 1784 | 1776 | } |
| 1785 | 1777 | if( ctrlSetting!=0 && ctrlSetting->versionable && g.localOpen ){ |
| @@ -1822,11 +1814,11 @@ | ||
| 1822 | 1814 | } |
| 1823 | 1815 | db_end_transaction(0); |
| 1824 | 1816 | } |
| 1825 | 1817 | int db_is_global(const char *zName){ |
| 1826 | 1818 | int rc = 0; |
| 1827 | - if( g.configOpen ){ | |
| 1819 | + if( g.configDbName ){ | |
| 1828 | 1820 | db_swap_connections(); |
| 1829 | 1821 | rc = db_exists("SELECT 1 FROM global_config WHERE name=%Q", zName); |
| 1830 | 1822 | db_swap_connections(); |
| 1831 | 1823 | } |
| 1832 | 1824 | return rc; |
| @@ -1843,11 +1835,11 @@ | ||
| 1843 | 1835 | } |
| 1844 | 1836 | db_finalize(&q); |
| 1845 | 1837 | }else{ |
| 1846 | 1838 | rc = SQLITE_DONE; |
| 1847 | 1839 | } |
| 1848 | - if( rc==SQLITE_DONE && g.configOpen ){ | |
| 1840 | + if( rc==SQLITE_DONE && g.configDbName ){ | |
| 1849 | 1841 | db_swap_connections(); |
| 1850 | 1842 | v = db_int(dflt, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1851 | 1843 | db_swap_connections(); |
| 1852 | 1844 | } |
| 1853 | 1845 | return v; |
| 1854 | 1846 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -792,11 +792,11 @@ | |
| 792 | ** case, invoke this routine with useAttach as 1. |
| 793 | */ |
| 794 | void db_open_config(int useAttach){ |
| 795 | char *zDbName; |
| 796 | char *zHome; |
| 797 | if( g.configOpen ) return; |
| 798 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 799 | zHome = fossil_getenv("LOCALAPPDATA"); |
| 800 | if( zHome==0 ){ |
| 801 | zHome = fossil_getenv("APPDATA"); |
| 802 | if( zHome==0 ){ |
| @@ -803,18 +803,10 @@ | |
| 803 | char *zDrive = fossil_getenv("HOMEDRIVE"); |
| 804 | zHome = fossil_getenv("HOMEPATH"); |
| 805 | if( zDrive && zHome ) zHome = mprintf("%s%s", zDrive, zHome); |
| 806 | } |
| 807 | } |
| 808 | #if defined(__CYGWIN__) |
| 809 | if( zHome!=0 ){ |
| 810 | /* We now have the win32 path, but we need the Cygwin equivalent. */ |
| 811 | char *zPath = fossil_utf8_to_filename(zHome); |
| 812 | fossil_filename_free(zHome); |
| 813 | zHome = zPath; |
| 814 | } |
| 815 | #endif |
| 816 | if( zHome==0 ){ |
| 817 | fossil_fatal("cannot locate home directory - " |
| 818 | "please set the LOCALAPPDATA or APPDATA or HOMEPATH " |
| 819 | "environment variables"); |
| 820 | } |
| @@ -826,37 +818,37 @@ | |
| 826 | } |
| 827 | #endif |
| 828 | if( file_isdir(zHome)!=1 ){ |
| 829 | fossil_fatal("invalid home directory: %s", zHome); |
| 830 | } |
| 831 | #if !defined(_WIN32) |
| 832 | if( file_access(zHome, W_OK) ){ |
| 833 | fossil_fatal("home directory %s must be writeable", zHome); |
| 834 | } |
| 835 | #endif |
| 836 | g.zHome = mprintf("%/", zHome); |
| 837 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 838 | /* . filenames give some window systems problems and many apps problems */ |
| 839 | zDbName = mprintf("%//_fossil", zHome); |
| 840 | #else |
| 841 | zDbName = mprintf("%s/.fossil", zHome); |
| 842 | #endif |
| 843 | if( file_size(zDbName)<1024*3 ){ |
| 844 | db_init_database(zDbName, zConfigSchema, (char*)0); |
| 845 | } |
| 846 | if( useAttach ){ |
| 847 | db_open_or_attach(zDbName, "configdb", &g.useAttach); |
| 848 | g.dbConfig = 0; |
| 849 | g.zConfigDbType = 0; |
| 850 | }else{ |
| 851 | g.useAttach = 0; |
| 852 | g.dbConfig = db_open(zDbName); |
| 853 | g.zConfigDbType = "configdb"; |
| 854 | } |
| 855 | g.configOpen = 1; |
| 856 | free(zDbName); |
| 857 | fossil_filename_free(zHome); |
| 858 | } |
| 859 | |
| 860 | |
| 861 | /* |
| 862 | ** Returns TRUE if zTable exists in the local database but lacks column |
| @@ -1212,11 +1204,11 @@ | |
| 1212 | fossil_warning("unfinalized SQL statement: [%s]", sqlite3_sql(pStmt)); |
| 1213 | } |
| 1214 | } |
| 1215 | g.repositoryOpen = 0; |
| 1216 | g.localOpen = 0; |
| 1217 | g.configOpen = 0; |
| 1218 | sqlite3_wal_checkpoint(g.db, 0); |
| 1219 | sqlite3_close(g.db); |
| 1220 | g.db = 0; |
| 1221 | g.zMainDbType = 0; |
| 1222 | if( g.dbConfig ){ |
| @@ -1775,11 +1767,11 @@ | |
| 1775 | } |
| 1776 | } |
| 1777 | if( g.repositoryOpen ){ |
| 1778 | z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName); |
| 1779 | } |
| 1780 | if( z==0 && g.configOpen ){ |
| 1781 | db_swap_connections(); |
| 1782 | z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1783 | db_swap_connections(); |
| 1784 | } |
| 1785 | if( ctrlSetting!=0 && ctrlSetting->versionable && g.localOpen ){ |
| @@ -1822,11 +1814,11 @@ | |
| 1822 | } |
| 1823 | db_end_transaction(0); |
| 1824 | } |
| 1825 | int db_is_global(const char *zName){ |
| 1826 | int rc = 0; |
| 1827 | if( g.configOpen ){ |
| 1828 | db_swap_connections(); |
| 1829 | rc = db_exists("SELECT 1 FROM global_config WHERE name=%Q", zName); |
| 1830 | db_swap_connections(); |
| 1831 | } |
| 1832 | return rc; |
| @@ -1843,11 +1835,11 @@ | |
| 1843 | } |
| 1844 | db_finalize(&q); |
| 1845 | }else{ |
| 1846 | rc = SQLITE_DONE; |
| 1847 | } |
| 1848 | if( rc==SQLITE_DONE && g.configOpen ){ |
| 1849 | db_swap_connections(); |
| 1850 | v = db_int(dflt, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1851 | db_swap_connections(); |
| 1852 | } |
| 1853 | return v; |
| 1854 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -792,11 +792,11 @@ | |
| 792 | ** case, invoke this routine with useAttach as 1. |
| 793 | */ |
| 794 | void db_open_config(int useAttach){ |
| 795 | char *zDbName; |
| 796 | char *zHome; |
| 797 | if( g.configDbName ) return; |
| 798 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 799 | zHome = fossil_getenv("LOCALAPPDATA"); |
| 800 | if( zHome==0 ){ |
| 801 | zHome = fossil_getenv("APPDATA"); |
| 802 | if( zHome==0 ){ |
| @@ -803,18 +803,10 @@ | |
| 803 | char *zDrive = fossil_getenv("HOMEDRIVE"); |
| 804 | zHome = fossil_getenv("HOMEPATH"); |
| 805 | if( zDrive && zHome ) zHome = mprintf("%s%s", zDrive, zHome); |
| 806 | } |
| 807 | } |
| 808 | if( zHome==0 ){ |
| 809 | fossil_fatal("cannot locate home directory - " |
| 810 | "please set the LOCALAPPDATA or APPDATA or HOMEPATH " |
| 811 | "environment variables"); |
| 812 | } |
| @@ -826,37 +818,37 @@ | |
| 818 | } |
| 819 | #endif |
| 820 | if( file_isdir(zHome)!=1 ){ |
| 821 | fossil_fatal("invalid home directory: %s", zHome); |
| 822 | } |
| 823 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 824 | /* . filenames give some window systems problems and many apps problems */ |
| 825 | zDbName = mprintf("%//_fossil", zHome); |
| 826 | #else |
| 827 | if( file_access(zHome, W_OK) ){ |
| 828 | fossil_fatal("home directory %s must be writeable", zHome); |
| 829 | } |
| 830 | zDbName = mprintf("%s/.fossil", zHome); |
| 831 | #endif |
| 832 | if( file_size(zDbName)<1024*3 ){ |
| 833 | db_init_database(zDbName, zConfigSchema, (char*)0); |
| 834 | } |
| 835 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 836 | if( file_access(zDbName, W_OK) ){ |
| 837 | fossil_fatal("configuration file %s must be writeable", zDbName); |
| 838 | } |
| 839 | #endif |
| 840 | if( useAttach ){ |
| 841 | db_open_or_attach(zDbName, "configdb", &g.useAttach); |
| 842 | g.dbConfig = 0; |
| 843 | g.zConfigDbType = 0; |
| 844 | }else{ |
| 845 | g.useAttach = 0; |
| 846 | g.dbConfig = db_open(zDbName); |
| 847 | g.zConfigDbType = "configdb"; |
| 848 | } |
| 849 | g.configDbName = zDbName; |
| 850 | } |
| 851 | |
| 852 | |
| 853 | /* |
| 854 | ** Returns TRUE if zTable exists in the local database but lacks column |
| @@ -1212,11 +1204,11 @@ | |
| 1204 | fossil_warning("unfinalized SQL statement: [%s]", sqlite3_sql(pStmt)); |
| 1205 | } |
| 1206 | } |
| 1207 | g.repositoryOpen = 0; |
| 1208 | g.localOpen = 0; |
| 1209 | g.configDbName = NULL; |
| 1210 | sqlite3_wal_checkpoint(g.db, 0); |
| 1211 | sqlite3_close(g.db); |
| 1212 | g.db = 0; |
| 1213 | g.zMainDbType = 0; |
| 1214 | if( g.dbConfig ){ |
| @@ -1775,11 +1767,11 @@ | |
| 1767 | } |
| 1768 | } |
| 1769 | if( g.repositoryOpen ){ |
| 1770 | z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName); |
| 1771 | } |
| 1772 | if( z==0 && g.configDbName ){ |
| 1773 | db_swap_connections(); |
| 1774 | z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1775 | db_swap_connections(); |
| 1776 | } |
| 1777 | if( ctrlSetting!=0 && ctrlSetting->versionable && g.localOpen ){ |
| @@ -1822,11 +1814,11 @@ | |
| 1814 | } |
| 1815 | db_end_transaction(0); |
| 1816 | } |
| 1817 | int db_is_global(const char *zName){ |
| 1818 | int rc = 0; |
| 1819 | if( g.configDbName ){ |
| 1820 | db_swap_connections(); |
| 1821 | rc = db_exists("SELECT 1 FROM global_config WHERE name=%Q", zName); |
| 1822 | db_swap_connections(); |
| 1823 | } |
| 1824 | return rc; |
| @@ -1843,11 +1835,11 @@ | |
| 1835 | } |
| 1836 | db_finalize(&q); |
| 1837 | }else{ |
| 1838 | rc = SQLITE_DONE; |
| 1839 | } |
| 1840 | if( rc==SQLITE_DONE && g.configDbName ){ |
| 1841 | db_swap_connections(); |
| 1842 | v = db_int(dflt, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1843 | db_swap_connections(); |
| 1844 | } |
| 1845 | return v; |
| 1846 |
M
src/db.c
+14
-22
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -792,11 +792,11 @@ | ||
| 792 | 792 | ** case, invoke this routine with useAttach as 1. |
| 793 | 793 | */ |
| 794 | 794 | void db_open_config(int useAttach){ |
| 795 | 795 | char *zDbName; |
| 796 | 796 | char *zHome; |
| 797 | - if( g.configOpen ) return; | |
| 797 | + if( g.configDbName ) return; | |
| 798 | 798 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 799 | 799 | zHome = fossil_getenv("LOCALAPPDATA"); |
| 800 | 800 | if( zHome==0 ){ |
| 801 | 801 | zHome = fossil_getenv("APPDATA"); |
| 802 | 802 | if( zHome==0 ){ |
| @@ -803,18 +803,10 @@ | ||
| 803 | 803 | char *zDrive = fossil_getenv("HOMEDRIVE"); |
| 804 | 804 | zHome = fossil_getenv("HOMEPATH"); |
| 805 | 805 | if( zDrive && zHome ) zHome = mprintf("%s%s", zDrive, zHome); |
| 806 | 806 | } |
| 807 | 807 | } |
| 808 | -#if defined(__CYGWIN__) | |
| 809 | - if( zHome!=0 ){ | |
| 810 | - /* We now have the win32 path, but we need the Cygwin equivalent. */ | |
| 811 | - char *zPath = fossil_utf8_to_filename(zHome); | |
| 812 | - fossil_filename_free(zHome); | |
| 813 | - zHome = zPath; | |
| 814 | - } | |
| 815 | -#endif | |
| 816 | 808 | if( zHome==0 ){ |
| 817 | 809 | fossil_fatal("cannot locate home directory - " |
| 818 | 810 | "please set the LOCALAPPDATA or APPDATA or HOMEPATH " |
| 819 | 811 | "environment variables"); |
| 820 | 812 | } |
| @@ -826,37 +818,37 @@ | ||
| 826 | 818 | } |
| 827 | 819 | #endif |
| 828 | 820 | if( file_isdir(zHome)!=1 ){ |
| 829 | 821 | fossil_fatal("invalid home directory: %s", zHome); |
| 830 | 822 | } |
| 831 | -#if !defined(_WIN32) | |
| 832 | - if( file_access(zHome, W_OK) ){ | |
| 833 | - fossil_fatal("home directory %s must be writeable", zHome); | |
| 834 | - } | |
| 835 | -#endif | |
| 836 | - g.zHome = mprintf("%/", zHome); | |
| 837 | 823 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 838 | 824 | /* . filenames give some window systems problems and many apps problems */ |
| 839 | 825 | zDbName = mprintf("%//_fossil", zHome); |
| 840 | 826 | #else |
| 827 | + if( file_access(zHome, W_OK) ){ | |
| 828 | + fossil_fatal("home directory %s must be writeable", zHome); | |
| 829 | + } | |
| 841 | 830 | zDbName = mprintf("%s/.fossil", zHome); |
| 842 | 831 | #endif |
| 843 | 832 | if( file_size(zDbName)<1024*3 ){ |
| 844 | 833 | db_init_database(zDbName, zConfigSchema, (char*)0); |
| 845 | 834 | } |
| 835 | +#if defined(_WIN32) || defined(__CYGWIN__) | |
| 836 | + if( file_access(zDbName, W_OK) ){ | |
| 837 | + fossil_fatal("configuration file %s must be writeable", zDbName); | |
| 838 | + } | |
| 839 | +#endif | |
| 846 | 840 | if( useAttach ){ |
| 847 | 841 | db_open_or_attach(zDbName, "configdb", &g.useAttach); |
| 848 | 842 | g.dbConfig = 0; |
| 849 | 843 | g.zConfigDbType = 0; |
| 850 | 844 | }else{ |
| 851 | 845 | g.useAttach = 0; |
| 852 | 846 | g.dbConfig = db_open(zDbName); |
| 853 | 847 | g.zConfigDbType = "configdb"; |
| 854 | 848 | } |
| 855 | - g.configOpen = 1; | |
| 856 | - free(zDbName); | |
| 857 | - fossil_filename_free(zHome); | |
| 849 | + g.configDbName = zDbName; | |
| 858 | 850 | } |
| 859 | 851 | |
| 860 | 852 | |
| 861 | 853 | /* |
| 862 | 854 | ** Returns TRUE if zTable exists in the local database but lacks column |
| @@ -1212,11 +1204,11 @@ | ||
| 1212 | 1204 | fossil_warning("unfinalized SQL statement: [%s]", sqlite3_sql(pStmt)); |
| 1213 | 1205 | } |
| 1214 | 1206 | } |
| 1215 | 1207 | g.repositoryOpen = 0; |
| 1216 | 1208 | g.localOpen = 0; |
| 1217 | - g.configOpen = 0; | |
| 1209 | + g.configDbName = NULL; | |
| 1218 | 1210 | sqlite3_wal_checkpoint(g.db, 0); |
| 1219 | 1211 | sqlite3_close(g.db); |
| 1220 | 1212 | g.db = 0; |
| 1221 | 1213 | g.zMainDbType = 0; |
| 1222 | 1214 | if( g.dbConfig ){ |
| @@ -1775,11 +1767,11 @@ | ||
| 1775 | 1767 | } |
| 1776 | 1768 | } |
| 1777 | 1769 | if( g.repositoryOpen ){ |
| 1778 | 1770 | z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName); |
| 1779 | 1771 | } |
| 1780 | - if( z==0 && g.configOpen ){ | |
| 1772 | + if( z==0 && g.configDbName ){ | |
| 1781 | 1773 | db_swap_connections(); |
| 1782 | 1774 | z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1783 | 1775 | db_swap_connections(); |
| 1784 | 1776 | } |
| 1785 | 1777 | if( ctrlSetting!=0 && ctrlSetting->versionable && g.localOpen ){ |
| @@ -1822,11 +1814,11 @@ | ||
| 1822 | 1814 | } |
| 1823 | 1815 | db_end_transaction(0); |
| 1824 | 1816 | } |
| 1825 | 1817 | int db_is_global(const char *zName){ |
| 1826 | 1818 | int rc = 0; |
| 1827 | - if( g.configOpen ){ | |
| 1819 | + if( g.configDbName ){ | |
| 1828 | 1820 | db_swap_connections(); |
| 1829 | 1821 | rc = db_exists("SELECT 1 FROM global_config WHERE name=%Q", zName); |
| 1830 | 1822 | db_swap_connections(); |
| 1831 | 1823 | } |
| 1832 | 1824 | return rc; |
| @@ -1843,11 +1835,11 @@ | ||
| 1843 | 1835 | } |
| 1844 | 1836 | db_finalize(&q); |
| 1845 | 1837 | }else{ |
| 1846 | 1838 | rc = SQLITE_DONE; |
| 1847 | 1839 | } |
| 1848 | - if( rc==SQLITE_DONE && g.configOpen ){ | |
| 1840 | + if( rc==SQLITE_DONE && g.configDbName ){ | |
| 1849 | 1841 | db_swap_connections(); |
| 1850 | 1842 | v = db_int(dflt, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1851 | 1843 | db_swap_connections(); |
| 1852 | 1844 | } |
| 1853 | 1845 | return v; |
| 1854 | 1846 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -792,11 +792,11 @@ | |
| 792 | ** case, invoke this routine with useAttach as 1. |
| 793 | */ |
| 794 | void db_open_config(int useAttach){ |
| 795 | char *zDbName; |
| 796 | char *zHome; |
| 797 | if( g.configOpen ) return; |
| 798 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 799 | zHome = fossil_getenv("LOCALAPPDATA"); |
| 800 | if( zHome==0 ){ |
| 801 | zHome = fossil_getenv("APPDATA"); |
| 802 | if( zHome==0 ){ |
| @@ -803,18 +803,10 @@ | |
| 803 | char *zDrive = fossil_getenv("HOMEDRIVE"); |
| 804 | zHome = fossil_getenv("HOMEPATH"); |
| 805 | if( zDrive && zHome ) zHome = mprintf("%s%s", zDrive, zHome); |
| 806 | } |
| 807 | } |
| 808 | #if defined(__CYGWIN__) |
| 809 | if( zHome!=0 ){ |
| 810 | /* We now have the win32 path, but we need the Cygwin equivalent. */ |
| 811 | char *zPath = fossil_utf8_to_filename(zHome); |
| 812 | fossil_filename_free(zHome); |
| 813 | zHome = zPath; |
| 814 | } |
| 815 | #endif |
| 816 | if( zHome==0 ){ |
| 817 | fossil_fatal("cannot locate home directory - " |
| 818 | "please set the LOCALAPPDATA or APPDATA or HOMEPATH " |
| 819 | "environment variables"); |
| 820 | } |
| @@ -826,37 +818,37 @@ | |
| 826 | } |
| 827 | #endif |
| 828 | if( file_isdir(zHome)!=1 ){ |
| 829 | fossil_fatal("invalid home directory: %s", zHome); |
| 830 | } |
| 831 | #if !defined(_WIN32) |
| 832 | if( file_access(zHome, W_OK) ){ |
| 833 | fossil_fatal("home directory %s must be writeable", zHome); |
| 834 | } |
| 835 | #endif |
| 836 | g.zHome = mprintf("%/", zHome); |
| 837 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 838 | /* . filenames give some window systems problems and many apps problems */ |
| 839 | zDbName = mprintf("%//_fossil", zHome); |
| 840 | #else |
| 841 | zDbName = mprintf("%s/.fossil", zHome); |
| 842 | #endif |
| 843 | if( file_size(zDbName)<1024*3 ){ |
| 844 | db_init_database(zDbName, zConfigSchema, (char*)0); |
| 845 | } |
| 846 | if( useAttach ){ |
| 847 | db_open_or_attach(zDbName, "configdb", &g.useAttach); |
| 848 | g.dbConfig = 0; |
| 849 | g.zConfigDbType = 0; |
| 850 | }else{ |
| 851 | g.useAttach = 0; |
| 852 | g.dbConfig = db_open(zDbName); |
| 853 | g.zConfigDbType = "configdb"; |
| 854 | } |
| 855 | g.configOpen = 1; |
| 856 | free(zDbName); |
| 857 | fossil_filename_free(zHome); |
| 858 | } |
| 859 | |
| 860 | |
| 861 | /* |
| 862 | ** Returns TRUE if zTable exists in the local database but lacks column |
| @@ -1212,11 +1204,11 @@ | |
| 1212 | fossil_warning("unfinalized SQL statement: [%s]", sqlite3_sql(pStmt)); |
| 1213 | } |
| 1214 | } |
| 1215 | g.repositoryOpen = 0; |
| 1216 | g.localOpen = 0; |
| 1217 | g.configOpen = 0; |
| 1218 | sqlite3_wal_checkpoint(g.db, 0); |
| 1219 | sqlite3_close(g.db); |
| 1220 | g.db = 0; |
| 1221 | g.zMainDbType = 0; |
| 1222 | if( g.dbConfig ){ |
| @@ -1775,11 +1767,11 @@ | |
| 1775 | } |
| 1776 | } |
| 1777 | if( g.repositoryOpen ){ |
| 1778 | z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName); |
| 1779 | } |
| 1780 | if( z==0 && g.configOpen ){ |
| 1781 | db_swap_connections(); |
| 1782 | z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1783 | db_swap_connections(); |
| 1784 | } |
| 1785 | if( ctrlSetting!=0 && ctrlSetting->versionable && g.localOpen ){ |
| @@ -1822,11 +1814,11 @@ | |
| 1822 | } |
| 1823 | db_end_transaction(0); |
| 1824 | } |
| 1825 | int db_is_global(const char *zName){ |
| 1826 | int rc = 0; |
| 1827 | if( g.configOpen ){ |
| 1828 | db_swap_connections(); |
| 1829 | rc = db_exists("SELECT 1 FROM global_config WHERE name=%Q", zName); |
| 1830 | db_swap_connections(); |
| 1831 | } |
| 1832 | return rc; |
| @@ -1843,11 +1835,11 @@ | |
| 1843 | } |
| 1844 | db_finalize(&q); |
| 1845 | }else{ |
| 1846 | rc = SQLITE_DONE; |
| 1847 | } |
| 1848 | if( rc==SQLITE_DONE && g.configOpen ){ |
| 1849 | db_swap_connections(); |
| 1850 | v = db_int(dflt, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1851 | db_swap_connections(); |
| 1852 | } |
| 1853 | return v; |
| 1854 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -792,11 +792,11 @@ | |
| 792 | ** case, invoke this routine with useAttach as 1. |
| 793 | */ |
| 794 | void db_open_config(int useAttach){ |
| 795 | char *zDbName; |
| 796 | char *zHome; |
| 797 | if( g.configDbName ) return; |
| 798 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 799 | zHome = fossil_getenv("LOCALAPPDATA"); |
| 800 | if( zHome==0 ){ |
| 801 | zHome = fossil_getenv("APPDATA"); |
| 802 | if( zHome==0 ){ |
| @@ -803,18 +803,10 @@ | |
| 803 | char *zDrive = fossil_getenv("HOMEDRIVE"); |
| 804 | zHome = fossil_getenv("HOMEPATH"); |
| 805 | if( zDrive && zHome ) zHome = mprintf("%s%s", zDrive, zHome); |
| 806 | } |
| 807 | } |
| 808 | if( zHome==0 ){ |
| 809 | fossil_fatal("cannot locate home directory - " |
| 810 | "please set the LOCALAPPDATA or APPDATA or HOMEPATH " |
| 811 | "environment variables"); |
| 812 | } |
| @@ -826,37 +818,37 @@ | |
| 818 | } |
| 819 | #endif |
| 820 | if( file_isdir(zHome)!=1 ){ |
| 821 | fossil_fatal("invalid home directory: %s", zHome); |
| 822 | } |
| 823 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 824 | /* . filenames give some window systems problems and many apps problems */ |
| 825 | zDbName = mprintf("%//_fossil", zHome); |
| 826 | #else |
| 827 | if( file_access(zHome, W_OK) ){ |
| 828 | fossil_fatal("home directory %s must be writeable", zHome); |
| 829 | } |
| 830 | zDbName = mprintf("%s/.fossil", zHome); |
| 831 | #endif |
| 832 | if( file_size(zDbName)<1024*3 ){ |
| 833 | db_init_database(zDbName, zConfigSchema, (char*)0); |
| 834 | } |
| 835 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 836 | if( file_access(zDbName, W_OK) ){ |
| 837 | fossil_fatal("configuration file %s must be writeable", zDbName); |
| 838 | } |
| 839 | #endif |
| 840 | if( useAttach ){ |
| 841 | db_open_or_attach(zDbName, "configdb", &g.useAttach); |
| 842 | g.dbConfig = 0; |
| 843 | g.zConfigDbType = 0; |
| 844 | }else{ |
| 845 | g.useAttach = 0; |
| 846 | g.dbConfig = db_open(zDbName); |
| 847 | g.zConfigDbType = "configdb"; |
| 848 | } |
| 849 | g.configDbName = zDbName; |
| 850 | } |
| 851 | |
| 852 | |
| 853 | /* |
| 854 | ** Returns TRUE if zTable exists in the local database but lacks column |
| @@ -1212,11 +1204,11 @@ | |
| 1204 | fossil_warning("unfinalized SQL statement: [%s]", sqlite3_sql(pStmt)); |
| 1205 | } |
| 1206 | } |
| 1207 | g.repositoryOpen = 0; |
| 1208 | g.localOpen = 0; |
| 1209 | g.configDbName = NULL; |
| 1210 | sqlite3_wal_checkpoint(g.db, 0); |
| 1211 | sqlite3_close(g.db); |
| 1212 | g.db = 0; |
| 1213 | g.zMainDbType = 0; |
| 1214 | if( g.dbConfig ){ |
| @@ -1775,11 +1767,11 @@ | |
| 1767 | } |
| 1768 | } |
| 1769 | if( g.repositoryOpen ){ |
| 1770 | z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName); |
| 1771 | } |
| 1772 | if( z==0 && g.configDbName ){ |
| 1773 | db_swap_connections(); |
| 1774 | z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1775 | db_swap_connections(); |
| 1776 | } |
| 1777 | if( ctrlSetting!=0 && ctrlSetting->versionable && g.localOpen ){ |
| @@ -1822,11 +1814,11 @@ | |
| 1814 | } |
| 1815 | db_end_transaction(0); |
| 1816 | } |
| 1817 | int db_is_global(const char *zName){ |
| 1818 | int rc = 0; |
| 1819 | if( g.configDbName ){ |
| 1820 | db_swap_connections(); |
| 1821 | rc = db_exists("SELECT 1 FROM global_config WHERE name=%Q", zName); |
| 1822 | db_swap_connections(); |
| 1823 | } |
| 1824 | return rc; |
| @@ -1843,11 +1835,11 @@ | |
| 1835 | } |
| 1836 | db_finalize(&q); |
| 1837 | }else{ |
| 1838 | rc = SQLITE_DONE; |
| 1839 | } |
| 1840 | if( rc==SQLITE_DONE && g.configDbName ){ |
| 1841 | db_swap_connections(); |
| 1842 | v = db_int(dflt, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1843 | db_swap_connections(); |
| 1844 | } |
| 1845 | return v; |
| 1846 |
+2
-4
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -198,15 +198,13 @@ | ||
| 198 | 198 | if( g.localOpen ){ |
| 199 | 199 | fossil_print("repository: %s\n", db_repository_filename()); |
| 200 | 200 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 201 | 201 | } |
| 202 | 202 | if( bDetail ) extraRepoInfo(); |
| 203 | -#if defined(_WIN32) | |
| 204 | - if( g.zHome ){ | |
| 205 | - fossil_print("user-home: %s\n", g.zHome); | |
| 203 | + if( g.configDbName ){ | |
| 204 | + fossil_print("config-db: %s\n", g.configDbName); | |
| 206 | 205 | } |
| 207 | -#endif | |
| 208 | 206 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 209 | 207 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| 210 | 208 | if( vid ){ |
| 211 | 209 | show_common_info(vid, "checkout:", 1, 1); |
| 212 | 210 | } |
| 213 | 211 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -198,15 +198,13 @@ | |
| 198 | if( g.localOpen ){ |
| 199 | fossil_print("repository: %s\n", db_repository_filename()); |
| 200 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 201 | } |
| 202 | if( bDetail ) extraRepoInfo(); |
| 203 | #if defined(_WIN32) |
| 204 | if( g.zHome ){ |
| 205 | fossil_print("user-home: %s\n", g.zHome); |
| 206 | } |
| 207 | #endif |
| 208 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 209 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| 210 | if( vid ){ |
| 211 | show_common_info(vid, "checkout:", 1, 1); |
| 212 | } |
| 213 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -198,15 +198,13 @@ | |
| 198 | if( g.localOpen ){ |
| 199 | fossil_print("repository: %s\n", db_repository_filename()); |
| 200 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 201 | } |
| 202 | if( bDetail ) extraRepoInfo(); |
| 203 | if( g.configDbName ){ |
| 204 | fossil_print("config-db: %s\n", g.configDbName); |
| 205 | } |
| 206 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 207 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| 208 | if( vid ){ |
| 209 | show_common_info(vid, "checkout:", 1, 1); |
| 210 | } |
| 211 |
+2
-4
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -198,15 +198,13 @@ | ||
| 198 | 198 | if( g.localOpen ){ |
| 199 | 199 | fossil_print("repository: %s\n", db_repository_filename()); |
| 200 | 200 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 201 | 201 | } |
| 202 | 202 | if( bDetail ) extraRepoInfo(); |
| 203 | -#if defined(_WIN32) | |
| 204 | - if( g.zHome ){ | |
| 205 | - fossil_print("user-home: %s\n", g.zHome); | |
| 203 | + if( g.configDbName ){ | |
| 204 | + fossil_print("config-db: %s\n", g.configDbName); | |
| 206 | 205 | } |
| 207 | -#endif | |
| 208 | 206 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 209 | 207 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| 210 | 208 | if( vid ){ |
| 211 | 209 | show_common_info(vid, "checkout:", 1, 1); |
| 212 | 210 | } |
| 213 | 211 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -198,15 +198,13 @@ | |
| 198 | if( g.localOpen ){ |
| 199 | fossil_print("repository: %s\n", db_repository_filename()); |
| 200 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 201 | } |
| 202 | if( bDetail ) extraRepoInfo(); |
| 203 | #if defined(_WIN32) |
| 204 | if( g.zHome ){ |
| 205 | fossil_print("user-home: %s\n", g.zHome); |
| 206 | } |
| 207 | #endif |
| 208 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 209 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| 210 | if( vid ){ |
| 211 | show_common_info(vid, "checkout:", 1, 1); |
| 212 | } |
| 213 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -198,15 +198,13 @@ | |
| 198 | if( g.localOpen ){ |
| 199 | fossil_print("repository: %s\n", db_repository_filename()); |
| 200 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 201 | } |
| 202 | if( bDetail ) extraRepoInfo(); |
| 203 | if( g.configDbName ){ |
| 204 | fossil_print("config-db: %s\n", g.configDbName); |
| 205 | } |
| 206 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 207 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| 208 | if( vid ){ |
| 209 | show_common_info(vid, "checkout:", 1, 1); |
| 210 | } |
| 211 |
+1
-2
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -1372,11 +1372,11 @@ | ||
| 1372 | 1372 | #define VAL(K,V) cson_object_set(o, #K, (V) ? (V) : cson_value_null()) |
| 1373 | 1373 | VAL(capabilities, json_cap_value()); |
| 1374 | 1374 | INT(g, argc); |
| 1375 | 1375 | INT(g, isConst); |
| 1376 | 1376 | INT(g, useAttach); |
| 1377 | - INT(g, configOpen); | |
| 1377 | + CSTR(g, configDbName); | |
| 1378 | 1378 | INT(g, repositoryOpen); |
| 1379 | 1379 | INT(g, localOpen); |
| 1380 | 1380 | INT(g, minPrefix); |
| 1381 | 1381 | INT(g, fSqlTrace); |
| 1382 | 1382 | INT(g, fSqlStats); |
| @@ -1410,11 +1410,10 @@ | ||
| 1410 | 1410 | INT(g, nAux); |
| 1411 | 1411 | INT(g, allowSymlinks); |
| 1412 | 1412 | |
| 1413 | 1413 | CSTR(g, zMainDbType); |
| 1414 | 1414 | CSTR(g, zConfigDbType); |
| 1415 | - CSTR(g, zHome); | |
| 1416 | 1415 | CSTR(g, zLocalRoot); |
| 1417 | 1416 | CSTR(g, zPath); |
| 1418 | 1417 | CSTR(g, zExtra); |
| 1419 | 1418 | CSTR(g, zBaseURL); |
| 1420 | 1419 | CSTR(g, zTop); |
| 1421 | 1420 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -1372,11 +1372,11 @@ | |
| 1372 | #define VAL(K,V) cson_object_set(o, #K, (V) ? (V) : cson_value_null()) |
| 1373 | VAL(capabilities, json_cap_value()); |
| 1374 | INT(g, argc); |
| 1375 | INT(g, isConst); |
| 1376 | INT(g, useAttach); |
| 1377 | INT(g, configOpen); |
| 1378 | INT(g, repositoryOpen); |
| 1379 | INT(g, localOpen); |
| 1380 | INT(g, minPrefix); |
| 1381 | INT(g, fSqlTrace); |
| 1382 | INT(g, fSqlStats); |
| @@ -1410,11 +1410,10 @@ | |
| 1410 | INT(g, nAux); |
| 1411 | INT(g, allowSymlinks); |
| 1412 | |
| 1413 | CSTR(g, zMainDbType); |
| 1414 | CSTR(g, zConfigDbType); |
| 1415 | CSTR(g, zHome); |
| 1416 | CSTR(g, zLocalRoot); |
| 1417 | CSTR(g, zPath); |
| 1418 | CSTR(g, zExtra); |
| 1419 | CSTR(g, zBaseURL); |
| 1420 | CSTR(g, zTop); |
| 1421 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -1372,11 +1372,11 @@ | |
| 1372 | #define VAL(K,V) cson_object_set(o, #K, (V) ? (V) : cson_value_null()) |
| 1373 | VAL(capabilities, json_cap_value()); |
| 1374 | INT(g, argc); |
| 1375 | INT(g, isConst); |
| 1376 | INT(g, useAttach); |
| 1377 | CSTR(g, configDbName); |
| 1378 | INT(g, repositoryOpen); |
| 1379 | INT(g, localOpen); |
| 1380 | INT(g, minPrefix); |
| 1381 | INT(g, fSqlTrace); |
| 1382 | INT(g, fSqlStats); |
| @@ -1410,11 +1410,10 @@ | |
| 1410 | INT(g, nAux); |
| 1411 | INT(g, allowSymlinks); |
| 1412 | |
| 1413 | CSTR(g, zMainDbType); |
| 1414 | CSTR(g, zConfigDbType); |
| 1415 | CSTR(g, zLocalRoot); |
| 1416 | CSTR(g, zPath); |
| 1417 | CSTR(g, zExtra); |
| 1418 | CSTR(g, zBaseURL); |
| 1419 | CSTR(g, zTop); |
| 1420 |
+1
-2
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -1372,11 +1372,11 @@ | ||
| 1372 | 1372 | #define VAL(K,V) cson_object_set(o, #K, (V) ? (V) : cson_value_null()) |
| 1373 | 1373 | VAL(capabilities, json_cap_value()); |
| 1374 | 1374 | INT(g, argc); |
| 1375 | 1375 | INT(g, isConst); |
| 1376 | 1376 | INT(g, useAttach); |
| 1377 | - INT(g, configOpen); | |
| 1377 | + CSTR(g, configDbName); | |
| 1378 | 1378 | INT(g, repositoryOpen); |
| 1379 | 1379 | INT(g, localOpen); |
| 1380 | 1380 | INT(g, minPrefix); |
| 1381 | 1381 | INT(g, fSqlTrace); |
| 1382 | 1382 | INT(g, fSqlStats); |
| @@ -1410,11 +1410,10 @@ | ||
| 1410 | 1410 | INT(g, nAux); |
| 1411 | 1411 | INT(g, allowSymlinks); |
| 1412 | 1412 | |
| 1413 | 1413 | CSTR(g, zMainDbType); |
| 1414 | 1414 | CSTR(g, zConfigDbType); |
| 1415 | - CSTR(g, zHome); | |
| 1416 | 1415 | CSTR(g, zLocalRoot); |
| 1417 | 1416 | CSTR(g, zPath); |
| 1418 | 1417 | CSTR(g, zExtra); |
| 1419 | 1418 | CSTR(g, zBaseURL); |
| 1420 | 1419 | CSTR(g, zTop); |
| 1421 | 1420 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -1372,11 +1372,11 @@ | |
| 1372 | #define VAL(K,V) cson_object_set(o, #K, (V) ? (V) : cson_value_null()) |
| 1373 | VAL(capabilities, json_cap_value()); |
| 1374 | INT(g, argc); |
| 1375 | INT(g, isConst); |
| 1376 | INT(g, useAttach); |
| 1377 | INT(g, configOpen); |
| 1378 | INT(g, repositoryOpen); |
| 1379 | INT(g, localOpen); |
| 1380 | INT(g, minPrefix); |
| 1381 | INT(g, fSqlTrace); |
| 1382 | INT(g, fSqlStats); |
| @@ -1410,11 +1410,10 @@ | |
| 1410 | INT(g, nAux); |
| 1411 | INT(g, allowSymlinks); |
| 1412 | |
| 1413 | CSTR(g, zMainDbType); |
| 1414 | CSTR(g, zConfigDbType); |
| 1415 | CSTR(g, zHome); |
| 1416 | CSTR(g, zLocalRoot); |
| 1417 | CSTR(g, zPath); |
| 1418 | CSTR(g, zExtra); |
| 1419 | CSTR(g, zBaseURL); |
| 1420 | CSTR(g, zTop); |
| 1421 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -1372,11 +1372,11 @@ | |
| 1372 | #define VAL(K,V) cson_object_set(o, #K, (V) ? (V) : cson_value_null()) |
| 1373 | VAL(capabilities, json_cap_value()); |
| 1374 | INT(g, argc); |
| 1375 | INT(g, isConst); |
| 1376 | INT(g, useAttach); |
| 1377 | CSTR(g, configDbName); |
| 1378 | INT(g, repositoryOpen); |
| 1379 | INT(g, localOpen); |
| 1380 | INT(g, minPrefix); |
| 1381 | INT(g, fSqlTrace); |
| 1382 | INT(g, fSqlStats); |
| @@ -1410,11 +1410,10 @@ | |
| 1410 | INT(g, nAux); |
| 1411 | INT(g, allowSymlinks); |
| 1412 | |
| 1413 | CSTR(g, zMainDbType); |
| 1414 | CSTR(g, zConfigDbType); |
| 1415 | CSTR(g, zLocalRoot); |
| 1416 | CSTR(g, zPath); |
| 1417 | CSTR(g, zExtra); |
| 1418 | CSTR(g, zBaseURL); |
| 1419 | CSTR(g, zTop); |
| 1420 |
-2
| --- src/json_status.c | ||
| +++ src/json_status.c | ||
| @@ -37,11 +37,10 @@ | ||
| 37 | 37 | /* |
| 38 | 38 | ** Implementation of the /json/status page. |
| 39 | 39 | ** |
| 40 | 40 | */ |
| 41 | 41 | cson_value * json_page_status(){ |
| 42 | - char const * zSql = NULL; | |
| 43 | 42 | Stmt q = empty_Stmt; |
| 44 | 43 | cson_object * oPay; |
| 45 | 44 | /*cson_object * files;*/ |
| 46 | 45 | int vid, nErr = 0; |
| 47 | 46 | cson_object * tmpO; |
| @@ -101,11 +100,10 @@ | ||
| 101 | 100 | " WHERE is_selected(id)" |
| 102 | 101 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1" |
| 103 | 102 | ); |
| 104 | 103 | while( db_step(&q)==SQLITE_ROW ){ |
| 105 | 104 | const char *zPathname = db_column_text(&q,0); |
| 106 | - const char *zDisplayName = zPathname; | |
| 107 | 105 | int isDeleted = db_column_int(&q, 1); |
| 108 | 106 | int isChnged = db_column_int(&q,2); |
| 109 | 107 | int isNew = db_column_int(&q,3)==0; |
| 110 | 108 | int isRenamed = db_column_int(&q,4); |
| 111 | 109 | cson_object * oFile; |
| 112 | 110 |
| --- src/json_status.c | |
| +++ src/json_status.c | |
| @@ -37,11 +37,10 @@ | |
| 37 | /* |
| 38 | ** Implementation of the /json/status page. |
| 39 | ** |
| 40 | */ |
| 41 | cson_value * json_page_status(){ |
| 42 | char const * zSql = NULL; |
| 43 | Stmt q = empty_Stmt; |
| 44 | cson_object * oPay; |
| 45 | /*cson_object * files;*/ |
| 46 | int vid, nErr = 0; |
| 47 | cson_object * tmpO; |
| @@ -101,11 +100,10 @@ | |
| 101 | " WHERE is_selected(id)" |
| 102 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1" |
| 103 | ); |
| 104 | while( db_step(&q)==SQLITE_ROW ){ |
| 105 | const char *zPathname = db_column_text(&q,0); |
| 106 | const char *zDisplayName = zPathname; |
| 107 | int isDeleted = db_column_int(&q, 1); |
| 108 | int isChnged = db_column_int(&q,2); |
| 109 | int isNew = db_column_int(&q,3)==0; |
| 110 | int isRenamed = db_column_int(&q,4); |
| 111 | cson_object * oFile; |
| 112 |
| --- src/json_status.c | |
| +++ src/json_status.c | |
| @@ -37,11 +37,10 @@ | |
| 37 | /* |
| 38 | ** Implementation of the /json/status page. |
| 39 | ** |
| 40 | */ |
| 41 | cson_value * json_page_status(){ |
| 42 | Stmt q = empty_Stmt; |
| 43 | cson_object * oPay; |
| 44 | /*cson_object * files;*/ |
| 45 | int vid, nErr = 0; |
| 46 | cson_object * tmpO; |
| @@ -101,11 +100,10 @@ | |
| 100 | " WHERE is_selected(id)" |
| 101 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1" |
| 102 | ); |
| 103 | while( db_step(&q)==SQLITE_ROW ){ |
| 104 | const char *zPathname = db_column_text(&q,0); |
| 105 | int isDeleted = db_column_int(&q, 1); |
| 106 | int isChnged = db_column_int(&q,2); |
| 107 | int isNew = db_column_int(&q,3)==0; |
| 108 | int isRenamed = db_column_int(&q,4); |
| 109 | cson_object * oFile; |
| 110 |
-2
| --- src/json_status.c | ||
| +++ src/json_status.c | ||
| @@ -37,11 +37,10 @@ | ||
| 37 | 37 | /* |
| 38 | 38 | ** Implementation of the /json/status page. |
| 39 | 39 | ** |
| 40 | 40 | */ |
| 41 | 41 | cson_value * json_page_status(){ |
| 42 | - char const * zSql = NULL; | |
| 43 | 42 | Stmt q = empty_Stmt; |
| 44 | 43 | cson_object * oPay; |
| 45 | 44 | /*cson_object * files;*/ |
| 46 | 45 | int vid, nErr = 0; |
| 47 | 46 | cson_object * tmpO; |
| @@ -101,11 +100,10 @@ | ||
| 101 | 100 | " WHERE is_selected(id)" |
| 102 | 101 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1" |
| 103 | 102 | ); |
| 104 | 103 | while( db_step(&q)==SQLITE_ROW ){ |
| 105 | 104 | const char *zPathname = db_column_text(&q,0); |
| 106 | - const char *zDisplayName = zPathname; | |
| 107 | 105 | int isDeleted = db_column_int(&q, 1); |
| 108 | 106 | int isChnged = db_column_int(&q,2); |
| 109 | 107 | int isNew = db_column_int(&q,3)==0; |
| 110 | 108 | int isRenamed = db_column_int(&q,4); |
| 111 | 109 | cson_object * oFile; |
| 112 | 110 |
| --- src/json_status.c | |
| +++ src/json_status.c | |
| @@ -37,11 +37,10 @@ | |
| 37 | /* |
| 38 | ** Implementation of the /json/status page. |
| 39 | ** |
| 40 | */ |
| 41 | cson_value * json_page_status(){ |
| 42 | char const * zSql = NULL; |
| 43 | Stmt q = empty_Stmt; |
| 44 | cson_object * oPay; |
| 45 | /*cson_object * files;*/ |
| 46 | int vid, nErr = 0; |
| 47 | cson_object * tmpO; |
| @@ -101,11 +100,10 @@ | |
| 101 | " WHERE is_selected(id)" |
| 102 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1" |
| 103 | ); |
| 104 | while( db_step(&q)==SQLITE_ROW ){ |
| 105 | const char *zPathname = db_column_text(&q,0); |
| 106 | const char *zDisplayName = zPathname; |
| 107 | int isDeleted = db_column_int(&q, 1); |
| 108 | int isChnged = db_column_int(&q,2); |
| 109 | int isNew = db_column_int(&q,3)==0; |
| 110 | int isRenamed = db_column_int(&q,4); |
| 111 | cson_object * oFile; |
| 112 |
| --- src/json_status.c | |
| +++ src/json_status.c | |
| @@ -37,11 +37,10 @@ | |
| 37 | /* |
| 38 | ** Implementation of the /json/status page. |
| 39 | ** |
| 40 | */ |
| 41 | cson_value * json_page_status(){ |
| 42 | Stmt q = empty_Stmt; |
| 43 | cson_object * oPay; |
| 44 | /*cson_object * files;*/ |
| 45 | int vid, nErr = 0; |
| 46 | cson_object * tmpO; |
| @@ -101,11 +100,10 @@ | |
| 100 | " WHERE is_selected(id)" |
| 101 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1" |
| 102 | ); |
| 103 | while( db_step(&q)==SQLITE_ROW ){ |
| 104 | const char *zPathname = db_column_text(&q,0); |
| 105 | int isDeleted = db_column_int(&q, 1); |
| 106 | int isChnged = db_column_int(&q,2); |
| 107 | int isNew = db_column_int(&q,3)==0; |
| 108 | int isRenamed = db_column_int(&q,4); |
| 109 | cson_object * oFile; |
| 110 |
+1
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -114,17 +114,16 @@ | ||
| 114 | 114 | char *nameOfExe; /* Full path of executable. */ |
| 115 | 115 | int isConst; /* True if the output is unchanging */ |
| 116 | 116 | sqlite3 *db; /* The connection to the databases */ |
| 117 | 117 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 118 | 118 | int useAttach; /* True if global_config is attached to repository */ |
| 119 | - int configOpen; /* True if the config database is open */ | |
| 119 | + const char *configDbName; /* Path of the config database. NULL if not open */ | |
| 120 | 120 | sqlite3_int64 now; /* Seconds since 1970 */ |
| 121 | 121 | int repositoryOpen; /* True if the main repository database is open */ |
| 122 | 122 | char *zRepositoryName; /* Name of the repository database */ |
| 123 | 123 | const char *zMainDbType;/* "configdb", "localdb", or "repository" */ |
| 124 | 124 | const char *zConfigDbType; /* "configdb", "localdb", or "repository" */ |
| 125 | - const char *zHome; /* Name of user home directory */ | |
| 126 | 125 | int localOpen; /* True if the local database is open */ |
| 127 | 126 | char *zLocalRoot; /* The directory holding the local database */ |
| 128 | 127 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 129 | 128 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 130 | 129 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 131 | 130 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -114,17 +114,16 @@ | |
| 114 | char *nameOfExe; /* Full path of executable. */ |
| 115 | int isConst; /* True if the output is unchanging */ |
| 116 | sqlite3 *db; /* The connection to the databases */ |
| 117 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 118 | int useAttach; /* True if global_config is attached to repository */ |
| 119 | int configOpen; /* True if the config database is open */ |
| 120 | sqlite3_int64 now; /* Seconds since 1970 */ |
| 121 | int repositoryOpen; /* True if the main repository database is open */ |
| 122 | char *zRepositoryName; /* Name of the repository database */ |
| 123 | const char *zMainDbType;/* "configdb", "localdb", or "repository" */ |
| 124 | const char *zConfigDbType; /* "configdb", "localdb", or "repository" */ |
| 125 | const char *zHome; /* Name of user home directory */ |
| 126 | int localOpen; /* True if the local database is open */ |
| 127 | char *zLocalRoot; /* The directory holding the local database */ |
| 128 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 129 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 130 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 131 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -114,17 +114,16 @@ | |
| 114 | char *nameOfExe; /* Full path of executable. */ |
| 115 | int isConst; /* True if the output is unchanging */ |
| 116 | sqlite3 *db; /* The connection to the databases */ |
| 117 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 118 | int useAttach; /* True if global_config is attached to repository */ |
| 119 | const char *configDbName; /* Path of the config database. NULL if not open */ |
| 120 | sqlite3_int64 now; /* Seconds since 1970 */ |
| 121 | int repositoryOpen; /* True if the main repository database is open */ |
| 122 | char *zRepositoryName; /* Name of the repository database */ |
| 123 | const char *zMainDbType;/* "configdb", "localdb", or "repository" */ |
| 124 | const char *zConfigDbType; /* "configdb", "localdb", or "repository" */ |
| 125 | int localOpen; /* True if the local database is open */ |
| 126 | char *zLocalRoot; /* The directory holding the local database */ |
| 127 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 128 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 129 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 130 |
+1
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -114,17 +114,16 @@ | ||
| 114 | 114 | char *nameOfExe; /* Full path of executable. */ |
| 115 | 115 | int isConst; /* True if the output is unchanging */ |
| 116 | 116 | sqlite3 *db; /* The connection to the databases */ |
| 117 | 117 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 118 | 118 | int useAttach; /* True if global_config is attached to repository */ |
| 119 | - int configOpen; /* True if the config database is open */ | |
| 119 | + const char *configDbName; /* Path of the config database. NULL if not open */ | |
| 120 | 120 | sqlite3_int64 now; /* Seconds since 1970 */ |
| 121 | 121 | int repositoryOpen; /* True if the main repository database is open */ |
| 122 | 122 | char *zRepositoryName; /* Name of the repository database */ |
| 123 | 123 | const char *zMainDbType;/* "configdb", "localdb", or "repository" */ |
| 124 | 124 | const char *zConfigDbType; /* "configdb", "localdb", or "repository" */ |
| 125 | - const char *zHome; /* Name of user home directory */ | |
| 126 | 125 | int localOpen; /* True if the local database is open */ |
| 127 | 126 | char *zLocalRoot; /* The directory holding the local database */ |
| 128 | 127 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 129 | 128 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 130 | 129 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 131 | 130 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -114,17 +114,16 @@ | |
| 114 | char *nameOfExe; /* Full path of executable. */ |
| 115 | int isConst; /* True if the output is unchanging */ |
| 116 | sqlite3 *db; /* The connection to the databases */ |
| 117 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 118 | int useAttach; /* True if global_config is attached to repository */ |
| 119 | int configOpen; /* True if the config database is open */ |
| 120 | sqlite3_int64 now; /* Seconds since 1970 */ |
| 121 | int repositoryOpen; /* True if the main repository database is open */ |
| 122 | char *zRepositoryName; /* Name of the repository database */ |
| 123 | const char *zMainDbType;/* "configdb", "localdb", or "repository" */ |
| 124 | const char *zConfigDbType; /* "configdb", "localdb", or "repository" */ |
| 125 | const char *zHome; /* Name of user home directory */ |
| 126 | int localOpen; /* True if the local database is open */ |
| 127 | char *zLocalRoot; /* The directory holding the local database */ |
| 128 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 129 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 130 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 131 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -114,17 +114,16 @@ | |
| 114 | char *nameOfExe; /* Full path of executable. */ |
| 115 | int isConst; /* True if the output is unchanging */ |
| 116 | sqlite3 *db; /* The connection to the databases */ |
| 117 | sqlite3 *dbConfig; /* Separate connection for global_config table */ |
| 118 | int useAttach; /* True if global_config is attached to repository */ |
| 119 | const char *configDbName; /* Path of the config database. NULL if not open */ |
| 120 | sqlite3_int64 now; /* Seconds since 1970 */ |
| 121 | int repositoryOpen; /* True if the main repository database is open */ |
| 122 | char *zRepositoryName; /* Name of the repository database */ |
| 123 | const char *zMainDbType;/* "configdb", "localdb", or "repository" */ |
| 124 | const char *zConfigDbType; /* "configdb", "localdb", or "repository" */ |
| 125 | int localOpen; /* True if the local database is open */ |
| 126 | char *zLocalRoot; /* The directory holding the local database */ |
| 127 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 128 | int fSqlTrace; /* True if --sqltrace flag is present */ |
| 129 | int fSqlStats; /* True if --sqltrace or --sqlstats are present */ |
| 130 |
+1
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1678,11 +1678,11 @@ | ||
| 1678 | 1678 | @ |
| 1679 | 1679 | @ <p>Only a the first statement in the entry box will be run. |
| 1680 | 1680 | @ Any subsequent statements will be silently ignored.</p> |
| 1681 | 1681 | @ |
| 1682 | 1682 | @ <p>Database names:<ul><li>repository → %s(db_name("repository")) |
| 1683 | - if( g.configOpen ){ | |
| 1683 | + if( g.configDbName ){ | |
| 1684 | 1684 | @ <li>config → %s(db_name("configdb")) |
| 1685 | 1685 | } |
| 1686 | 1686 | if( g.localOpen ){ |
| 1687 | 1687 | @ <li>local-checkout → %s(db_name("localdb")) |
| 1688 | 1688 | } |
| 1689 | 1689 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1678,11 +1678,11 @@ | |
| 1678 | @ |
| 1679 | @ <p>Only a the first statement in the entry box will be run. |
| 1680 | @ Any subsequent statements will be silently ignored.</p> |
| 1681 | @ |
| 1682 | @ <p>Database names:<ul><li>repository → %s(db_name("repository")) |
| 1683 | if( g.configOpen ){ |
| 1684 | @ <li>config → %s(db_name("configdb")) |
| 1685 | } |
| 1686 | if( g.localOpen ){ |
| 1687 | @ <li>local-checkout → %s(db_name("localdb")) |
| 1688 | } |
| 1689 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1678,11 +1678,11 @@ | |
| 1678 | @ |
| 1679 | @ <p>Only a the first statement in the entry box will be run. |
| 1680 | @ Any subsequent statements will be silently ignored.</p> |
| 1681 | @ |
| 1682 | @ <p>Database names:<ul><li>repository → %s(db_name("repository")) |
| 1683 | if( g.configDbName ){ |
| 1684 | @ <li>config → %s(db_name("configdb")) |
| 1685 | } |
| 1686 | if( g.localOpen ){ |
| 1687 | @ <li>local-checkout → %s(db_name("localdb")) |
| 1688 | } |
| 1689 |
+1
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1678,11 +1678,11 @@ | ||
| 1678 | 1678 | @ |
| 1679 | 1679 | @ <p>Only a the first statement in the entry box will be run. |
| 1680 | 1680 | @ Any subsequent statements will be silently ignored.</p> |
| 1681 | 1681 | @ |
| 1682 | 1682 | @ <p>Database names:<ul><li>repository → %s(db_name("repository")) |
| 1683 | - if( g.configOpen ){ | |
| 1683 | + if( g.configDbName ){ | |
| 1684 | 1684 | @ <li>config → %s(db_name("configdb")) |
| 1685 | 1685 | } |
| 1686 | 1686 | if( g.localOpen ){ |
| 1687 | 1687 | @ <li>local-checkout → %s(db_name("localdb")) |
| 1688 | 1688 | } |
| 1689 | 1689 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1678,11 +1678,11 @@ | |
| 1678 | @ |
| 1679 | @ <p>Only a the first statement in the entry box will be run. |
| 1680 | @ Any subsequent statements will be silently ignored.</p> |
| 1681 | @ |
| 1682 | @ <p>Database names:<ul><li>repository → %s(db_name("repository")) |
| 1683 | if( g.configOpen ){ |
| 1684 | @ <li>config → %s(db_name("configdb")) |
| 1685 | } |
| 1686 | if( g.localOpen ){ |
| 1687 | @ <li>local-checkout → %s(db_name("localdb")) |
| 1688 | } |
| 1689 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1678,11 +1678,11 @@ | |
| 1678 | @ |
| 1679 | @ <p>Only a the first statement in the entry box will be run. |
| 1680 | @ Any subsequent statements will be silently ignored.</p> |
| 1681 | @ |
| 1682 | @ <p>Database names:<ul><li>repository → %s(db_name("repository")) |
| 1683 | if( g.configDbName ){ |
| 1684 | @ <li>config → %s(db_name("configdb")) |
| 1685 | } |
| 1686 | if( g.localOpen ){ |
| 1687 | @ <li>local-checkout → %s(db_name("localdb")) |
| 1688 | } |
| 1689 |