Fossil SCM
Pull the latest trunk changes into the venks-emacs branch.
Commit
690ba8cbdb20c57c35f41aca4210a3dbf95ba7dd
Parent
081a29c0b7689c4…
5 files changed
-10
+3
-2
+4
+5
-4
+7
-2
-10
| --- src/checkout.c | ||
| +++ src/checkout.c | ||
| @@ -74,20 +74,10 @@ | ||
| 74 | 74 | } |
| 75 | 75 | load_vfile_from_rid(vid); |
| 76 | 76 | return vid; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | -/* | |
| 80 | -** Load a vfile from a record ID. | |
| 81 | -*/ | |
| 82 | -void load_vfile_from_rid(int vid){ | |
| 83 | - if( db_exists("SELECT 1 FROM vfile WHERE vid=%d", vid) ){ | |
| 84 | - return; | |
| 85 | - } | |
| 86 | - vfile_build(vid); | |
| 87 | -} | |
| 88 | - | |
| 89 | 79 | /* |
| 90 | 80 | ** Set or clear the vfile.isexe flag for a file. |
| 91 | 81 | */ |
| 92 | 82 | static void set_or_clear_isexe(const char *zFilename, int vid, int onoff){ |
| 93 | 83 | static Stmt s; |
| 94 | 84 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -74,20 +74,10 @@ | |
| 74 | } |
| 75 | load_vfile_from_rid(vid); |
| 76 | return vid; |
| 77 | } |
| 78 | |
| 79 | /* |
| 80 | ** Load a vfile from a record ID. |
| 81 | */ |
| 82 | void load_vfile_from_rid(int vid){ |
| 83 | if( db_exists("SELECT 1 FROM vfile WHERE vid=%d", vid) ){ |
| 84 | return; |
| 85 | } |
| 86 | vfile_build(vid); |
| 87 | } |
| 88 | |
| 89 | /* |
| 90 | ** Set or clear the vfile.isexe flag for a file. |
| 91 | */ |
| 92 | static void set_or_clear_isexe(const char *zFilename, int vid, int onoff){ |
| 93 | static Stmt s; |
| 94 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -74,20 +74,10 @@ | |
| 74 | } |
| 75 | load_vfile_from_rid(vid); |
| 76 | return vid; |
| 77 | } |
| 78 | |
| 79 | /* |
| 80 | ** Set or clear the vfile.isexe flag for a file. |
| 81 | */ |
| 82 | static void set_or_clear_isexe(const char *zFilename, int vid, int onoff){ |
| 83 | static Stmt s; |
| 84 |
+3
-2
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -199,12 +199,13 @@ | ||
| 199 | 199 | int rc = 0; |
| 200 | 200 | #if !defined(_WIN32) |
| 201 | 201 | struct stat buf; |
| 202 | 202 | if( stat(zFilename, &buf)!=0 ) return 0; |
| 203 | 203 | if( onoff ){ |
| 204 | - if( (buf.st_mode & 0111)!=0111 ){ | |
| 205 | - chmod(zFilename, buf.st_mode | 0111); | |
| 204 | + int targetMode = (buf.st_mode & 0444)>>2; | |
| 205 | + if( (buf.st_mode & 0111)!=targetMode ){ | |
| 206 | + chmod(zFilename, buf.st_mode | targetMode); | |
| 206 | 207 | rc = 1; |
| 207 | 208 | } |
| 208 | 209 | }else{ |
| 209 | 210 | if( (buf.st_mode & 0111)!=0 ){ |
| 210 | 211 | chmod(zFilename, buf.st_mode & ~0111); |
| 211 | 212 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -199,12 +199,13 @@ | |
| 199 | int rc = 0; |
| 200 | #if !defined(_WIN32) |
| 201 | struct stat buf; |
| 202 | if( stat(zFilename, &buf)!=0 ) return 0; |
| 203 | if( onoff ){ |
| 204 | if( (buf.st_mode & 0111)!=0111 ){ |
| 205 | chmod(zFilename, buf.st_mode | 0111); |
| 206 | rc = 1; |
| 207 | } |
| 208 | }else{ |
| 209 | if( (buf.st_mode & 0111)!=0 ){ |
| 210 | chmod(zFilename, buf.st_mode & ~0111); |
| 211 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -199,12 +199,13 @@ | |
| 199 | int rc = 0; |
| 200 | #if !defined(_WIN32) |
| 201 | struct stat buf; |
| 202 | if( stat(zFilename, &buf)!=0 ) return 0; |
| 203 | if( onoff ){ |
| 204 | int targetMode = (buf.st_mode & 0444)>>2; |
| 205 | if( (buf.st_mode & 0111)!=targetMode ){ |
| 206 | chmod(zFilename, buf.st_mode | targetMode); |
| 207 | rc = 1; |
| 208 | } |
| 209 | }else{ |
| 210 | if( (buf.st_mode & 0111)!=0 ){ |
| 211 | chmod(zFilename, buf.st_mode & ~0111); |
| 212 |
+4
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -748,10 +748,14 @@ | ||
| 748 | 748 | } |
| 749 | 749 | if( !privateOnly ){ |
| 750 | 750 | db_multi_exec( |
| 751 | 751 | "UPDATE user SET pw='';" |
| 752 | 752 | "DELETE FROM config WHERE name GLOB 'last-sync-*';" |
| 753 | + "DELETE FROM config WHERE name GLOB 'peer-*';" | |
| 754 | + "DELETE FROM config WHERE name GLOB 'login-group-*';" | |
| 755 | + "DELETE FROM config WHERE name GLOB 'skin:*';" | |
| 756 | + "DELETE FROM config WHERE name GLOB 'subrepo:*';" | |
| 753 | 757 | ); |
| 754 | 758 | if( bVerily ){ |
| 755 | 759 | db_multi_exec( |
| 756 | 760 | "DELETE FROM concealed;" |
| 757 | 761 | "UPDATE rcvfrom SET ipaddr='unknown';" |
| 758 | 762 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -748,10 +748,14 @@ | |
| 748 | } |
| 749 | if( !privateOnly ){ |
| 750 | db_multi_exec( |
| 751 | "UPDATE user SET pw='';" |
| 752 | "DELETE FROM config WHERE name GLOB 'last-sync-*';" |
| 753 | ); |
| 754 | if( bVerily ){ |
| 755 | db_multi_exec( |
| 756 | "DELETE FROM concealed;" |
| 757 | "UPDATE rcvfrom SET ipaddr='unknown';" |
| 758 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -748,10 +748,14 @@ | |
| 748 | } |
| 749 | if( !privateOnly ){ |
| 750 | db_multi_exec( |
| 751 | "UPDATE user SET pw='';" |
| 752 | "DELETE FROM config WHERE name GLOB 'last-sync-*';" |
| 753 | "DELETE FROM config WHERE name GLOB 'peer-*';" |
| 754 | "DELETE FROM config WHERE name GLOB 'login-group-*';" |
| 755 | "DELETE FROM config WHERE name GLOB 'skin:*';" |
| 756 | "DELETE FROM config WHERE name GLOB 'subrepo:*';" |
| 757 | ); |
| 758 | if( bVerily ){ |
| 759 | db_multi_exec( |
| 760 | "DELETE FROM concealed;" |
| 761 | "UPDATE rcvfrom SET ipaddr='unknown';" |
| 762 |
+5
-4
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -324,11 +324,11 @@ | ||
| 324 | 324 | int ridv = db_column_int(&q, 2); /* RecordID for current */ |
| 325 | 325 | int idt = db_column_int(&q, 3); /* VFILE entry for target */ |
| 326 | 326 | int ridt = db_column_int(&q, 4); /* RecordID for target */ |
| 327 | 327 | int chnged = db_column_int(&q, 5); /* Current is edited */ |
| 328 | 328 | const char *zNewName = db_column_text(&q,6);/* New filename */ |
| 329 | - int isexe = db_column_int(&q, 6); /* EXE perm for new file */ | |
| 329 | + int isexe = db_column_int(&q, 7); /* EXE perm for new file */ | |
| 330 | 330 | char *zFullPath; /* Full pathname of the file */ |
| 331 | 331 | char *zFullNewPath; /* Full pathname of dest */ |
| 332 | 332 | char nameChng; /* True if the name changed */ |
| 333 | 333 | |
| 334 | 334 | zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| @@ -429,12 +429,13 @@ | ||
| 429 | 429 | */ |
| 430 | 430 | if( nConflict && !nochangeFlag ){ |
| 431 | 431 | if( internalUpdate ){ |
| 432 | 432 | internalConflictCnt = nConflict; |
| 433 | 433 | }else{ |
| 434 | - fossil_print("WARNING: %d merge conflicts - see messages above for details.\n", | |
| 435 | - nConflict); | |
| 434 | + fossil_print( | |
| 435 | + "WARNING: %d merge conflicts - see messages above for details.\n", | |
| 436 | + nConflict); | |
| 436 | 437 | } |
| 437 | 438 | } |
| 438 | 439 | |
| 439 | 440 | /* |
| 440 | 441 | ** Clean up the mid and pid VFILE entries. Then commit the changes. |
| @@ -443,11 +444,11 @@ | ||
| 443 | 444 | db_end_transaction(1); /* With --nochange, rollback changes */ |
| 444 | 445 | }else{ |
| 445 | 446 | if( g.argc<=3 ){ |
| 446 | 447 | /* All files updated. Shift the current checkout to the target. */ |
| 447 | 448 | db_multi_exec("DELETE FROM vfile WHERE vid!=%d", tid); |
| 448 | - checkout_set_all_exe(vid); | |
| 449 | + checkout_set_all_exe(tid); | |
| 449 | 450 | manifest_to_disk(tid); |
| 450 | 451 | db_lset_int("checkout", tid); |
| 451 | 452 | }else{ |
| 452 | 453 | /* A subset of files have been checked out. Keep the current |
| 453 | 454 | ** checkout unchanged. */ |
| 454 | 455 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -324,11 +324,11 @@ | |
| 324 | int ridv = db_column_int(&q, 2); /* RecordID for current */ |
| 325 | int idt = db_column_int(&q, 3); /* VFILE entry for target */ |
| 326 | int ridt = db_column_int(&q, 4); /* RecordID for target */ |
| 327 | int chnged = db_column_int(&q, 5); /* Current is edited */ |
| 328 | const char *zNewName = db_column_text(&q,6);/* New filename */ |
| 329 | int isexe = db_column_int(&q, 6); /* EXE perm for new file */ |
| 330 | char *zFullPath; /* Full pathname of the file */ |
| 331 | char *zFullNewPath; /* Full pathname of dest */ |
| 332 | char nameChng; /* True if the name changed */ |
| 333 | |
| 334 | zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| @@ -429,12 +429,13 @@ | |
| 429 | */ |
| 430 | if( nConflict && !nochangeFlag ){ |
| 431 | if( internalUpdate ){ |
| 432 | internalConflictCnt = nConflict; |
| 433 | }else{ |
| 434 | fossil_print("WARNING: %d merge conflicts - see messages above for details.\n", |
| 435 | nConflict); |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | /* |
| 440 | ** Clean up the mid and pid VFILE entries. Then commit the changes. |
| @@ -443,11 +444,11 @@ | |
| 443 | db_end_transaction(1); /* With --nochange, rollback changes */ |
| 444 | }else{ |
| 445 | if( g.argc<=3 ){ |
| 446 | /* All files updated. Shift the current checkout to the target. */ |
| 447 | db_multi_exec("DELETE FROM vfile WHERE vid!=%d", tid); |
| 448 | checkout_set_all_exe(vid); |
| 449 | manifest_to_disk(tid); |
| 450 | db_lset_int("checkout", tid); |
| 451 | }else{ |
| 452 | /* A subset of files have been checked out. Keep the current |
| 453 | ** checkout unchanged. */ |
| 454 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -324,11 +324,11 @@ | |
| 324 | int ridv = db_column_int(&q, 2); /* RecordID for current */ |
| 325 | int idt = db_column_int(&q, 3); /* VFILE entry for target */ |
| 326 | int ridt = db_column_int(&q, 4); /* RecordID for target */ |
| 327 | int chnged = db_column_int(&q, 5); /* Current is edited */ |
| 328 | const char *zNewName = db_column_text(&q,6);/* New filename */ |
| 329 | int isexe = db_column_int(&q, 7); /* EXE perm for new file */ |
| 330 | char *zFullPath; /* Full pathname of the file */ |
| 331 | char *zFullNewPath; /* Full pathname of dest */ |
| 332 | char nameChng; /* True if the name changed */ |
| 333 | |
| 334 | zFullPath = mprintf("%s%s", g.zLocalRoot, zName); |
| @@ -429,12 +429,13 @@ | |
| 429 | */ |
| 430 | if( nConflict && !nochangeFlag ){ |
| 431 | if( internalUpdate ){ |
| 432 | internalConflictCnt = nConflict; |
| 433 | }else{ |
| 434 | fossil_print( |
| 435 | "WARNING: %d merge conflicts - see messages above for details.\n", |
| 436 | nConflict); |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | /* |
| 441 | ** Clean up the mid and pid VFILE entries. Then commit the changes. |
| @@ -443,11 +444,11 @@ | |
| 444 | db_end_transaction(1); /* With --nochange, rollback changes */ |
| 445 | }else{ |
| 446 | if( g.argc<=3 ){ |
| 447 | /* All files updated. Shift the current checkout to the target. */ |
| 448 | db_multi_exec("DELETE FROM vfile WHERE vid!=%d", tid); |
| 449 | checkout_set_all_exe(tid); |
| 450 | manifest_to_disk(tid); |
| 451 | db_lset_int("checkout", tid); |
| 452 | }else{ |
| 453 | /* A subset of files have been checked out. Keep the current |
| 454 | ** checkout unchanged. */ |
| 455 |
+7
-2
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -70,19 +70,24 @@ | ||
| 70 | 70 | if( rid==0 && phantomize ){ |
| 71 | 71 | rid = content_new(zUuid, phantomize-1); |
| 72 | 72 | } |
| 73 | 73 | return rid; |
| 74 | 74 | } |
| 75 | + | |
| 75 | 76 | |
| 76 | 77 | /* |
| 77 | -** Build a catalog of all files in a checkin. | |
| 78 | +** Load a vfile from a record ID. | |
| 78 | 79 | */ |
| 79 | -void vfile_build(int vid){ | |
| 80 | +void load_vfile_from_rid(int vid){ | |
| 80 | 81 | int rid, size; |
| 81 | 82 | Stmt ins, ridq; |
| 82 | 83 | Manifest *p; |
| 83 | 84 | ManifestFile *pFile; |
| 85 | + | |
| 86 | + if( db_exists("SELECT 1 FROM vfile WHERE vid=%d", vid) ){ | |
| 87 | + return; | |
| 88 | + } | |
| 84 | 89 | |
| 85 | 90 | db_begin_transaction(); |
| 86 | 91 | p = manifest_get(vid, CFTYPE_MANIFEST); |
| 87 | 92 | if( p==0 ) return; |
| 88 | 93 | db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid); |
| 89 | 94 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -70,19 +70,24 @@ | |
| 70 | if( rid==0 && phantomize ){ |
| 71 | rid = content_new(zUuid, phantomize-1); |
| 72 | } |
| 73 | return rid; |
| 74 | } |
| 75 | |
| 76 | /* |
| 77 | ** Build a catalog of all files in a checkin. |
| 78 | */ |
| 79 | void vfile_build(int vid){ |
| 80 | int rid, size; |
| 81 | Stmt ins, ridq; |
| 82 | Manifest *p; |
| 83 | ManifestFile *pFile; |
| 84 | |
| 85 | db_begin_transaction(); |
| 86 | p = manifest_get(vid, CFTYPE_MANIFEST); |
| 87 | if( p==0 ) return; |
| 88 | db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid); |
| 89 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -70,19 +70,24 @@ | |
| 70 | if( rid==0 && phantomize ){ |
| 71 | rid = content_new(zUuid, phantomize-1); |
| 72 | } |
| 73 | return rid; |
| 74 | } |
| 75 | |
| 76 | |
| 77 | /* |
| 78 | ** Load a vfile from a record ID. |
| 79 | */ |
| 80 | void load_vfile_from_rid(int vid){ |
| 81 | int rid, size; |
| 82 | Stmt ins, ridq; |
| 83 | Manifest *p; |
| 84 | ManifestFile *pFile; |
| 85 | |
| 86 | if( db_exists("SELECT 1 FROM vfile WHERE vid=%d", vid) ){ |
| 87 | return; |
| 88 | } |
| 89 | |
| 90 | db_begin_transaction(); |
| 91 | p = manifest_get(vid, CFTYPE_MANIFEST); |
| 92 | if( p==0 ) return; |
| 93 | db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid); |
| 94 |