Fossil SCM
Bug fix: make sure "fossil update" sets the execute permission bit correctly.
Commit
37c231b11d02739fbab03740f4cdf359a436cfe7
Parent
12989181a635b3b…
1 file changed
+2
-2
+2
-2
| --- 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); |
| @@ -443,11 +443,11 @@ | ||
| 443 | 443 | db_end_transaction(1); /* With --nochange, rollback changes */ |
| 444 | 444 | }else{ |
| 445 | 445 | if( g.argc<=3 ){ |
| 446 | 446 | /* All files updated. Shift the current checkout to the target. */ |
| 447 | 447 | db_multi_exec("DELETE FROM vfile WHERE vid!=%d", tid); |
| 448 | - checkout_set_all_exe(vid); | |
| 448 | + checkout_set_all_exe(tid); | |
| 449 | 449 | manifest_to_disk(tid); |
| 450 | 450 | db_lset_int("checkout", tid); |
| 451 | 451 | }else{ |
| 452 | 452 | /* A subset of files have been checked out. Keep the current |
| 453 | 453 | ** checkout unchanged. */ |
| 454 | 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, 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); |
| @@ -443,11 +443,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); |
| @@ -443,11 +443,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(tid); |
| 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 |