Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch update-with-renames Excluding Merge-Ins
This is equivalent to a diff from e5bcfd1e to 7c284a8c
2024-01-13
| ||
12:59 | Have the `amend' command count arguments only once when option parsing is done. (check-in: 30f18ce1 user: florian tags: trunk) | |
2024-01-12
| ||
17:35 | When merging, make it possible to undo executable status changes. (Leaf check-in: 802e3ae9 user: preben tags: undo-exe-after-merge) | |
16:11 | Retain renames in local checkout when running fossil update. (Leaf check-in: 7c284a8c user: preben tags: update-with-renames) | |
15:48 | Merge current state of testing-improvements. make clean output is now easy to review. (check-in: e5bcfd1e user: preben tags: trunk) | |
2024-01-11
| ||
17:55 | In the update tests, also check fossil changes after updating. (Leaf check-in: 6e23e96a user: preben tags: testing-improvements) | |
2024-01-09
| ||
17:18 | Remerge the Wiki title search enhancement, after fixing it so that it does not disrupt check-in comment search. (check-in: 9d9bf1ab user: drh tags: trunk) | |
Changes to src/update.c.
︙ | ︙ | |||
270 271 272 273 274 275 276 | " isexe BOOLEAN," /* Does target have execute permission? */ " deleted BOOLEAN DEFAULT 0,"/* File marked by "rm" to become unmanaged */ " fnt TEXT %s" /* Filename of same file on target version */ ");", filename_collation(), filename_collation() ); | | > > | | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | " isexe BOOLEAN," /* Does target have execute permission? */ " deleted BOOLEAN DEFAULT 0,"/* File marked by "rm" to become unmanaged */ " fnt TEXT %s" /* Filename of same file on target version */ ");", filename_collation(), filename_collation() ); /* Add files found in the current version. If a file is renamed locally, ** use origname to compare with the original pathname in the target. */ db_multi_exec( "INSERT OR IGNORE INTO fv(fn,fnt,idv,idt,ridv,ridt,isexe,chnged,deleted)" " SELECT pathname, COALESCE(origname,pathname), id, 0, rid, 0," " isexe, chnged, deleted" " FROM vfile WHERE vid=%d", vid ); /* Compute file name changes on V->T. Record name changes in files that ** have changed locally. */ |
︙ | ︙ | |||
626 627 628 629 630 631 632 633 634 635 636 637 638 639 | zPwd = file_getcwd(0,0); db_multi_exec( "SELECT rmdir(%Q||name) FROM dir_to_delete" " WHERE (%Q||name)<>%Q ORDER BY name DESC", g.zLocalRoot, g.zLocalRoot, zPwd ); fossil_free(zPwd); if( g.argc<=3 ){ /* All files updated. Shift the current check-out to the target. */ db_multi_exec("DELETE FROM vfile WHERE vid!=%d", tid); checkout_set_all_exe(tid); manifest_to_disk(tid); db_set_checkout(tid); }else{ | > > > > > > > > > > > > > | 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | zPwd = file_getcwd(0,0); db_multi_exec( "SELECT rmdir(%Q||name) FROM dir_to_delete" " WHERE (%Q||name)<>%Q ORDER BY name DESC", g.zLocalRoot, g.zLocalRoot, zPwd ); fossil_free(zPwd); /* Before deleting the old vid, transfer renames from the current vid. */ db_multi_exec( "WITH mv AS (" " SELECT pathname AS path, origname AS orig" " FROM vfile" " WHERE vid=%i AND origname IS NOT NULL AND pathname!=origname" ")" " UPDATE vfile" " SET pathname=path, origname=orig" " FROM mv" " WHERE vid=%i AND pathname=orig", vid, tid ); if( g.argc<=3 ){ /* All files updated. Shift the current check-out to the target. */ db_multi_exec("DELETE FROM vfile WHERE vid!=%d", tid); checkout_set_all_exe(tid); manifest_to_disk(tid); db_set_checkout(tid); }else{ |
︙ | ︙ |
Changes to test/update.test.
︙ | ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | # that generated files are ordered in `fossil update --verbose` mode. set UPDATE_TEST 0 proc test_update_setup {desc} { global UPDATE_TEST incr UPDATE_TEST fossil revert fossil update return [format "test-%02u-%s.txt" $UPDATE_TEST $desc] } # The output is in file name order, so massage $RESULT to remove initial UNCHANGED # files. Only do this if we have the expected branch information. proc test_update {testname message changes {fossil_args ""}} { fossil update --verbose {*}$fossil_args if { [regsub {\n-{79}\nupdated-from: [0-9a-z]{40} .*} $::RESULT {} test_result ] } { regsub {^(?:UNCHANGED [-a-z0-9.]+\n)*} $test_result {} test_result } else { set test_result $::RESULT } test "update-message-$testname" {$message == $test_result} | > | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | # that generated files are ordered in `fossil update --verbose` mode. set UPDATE_TEST 0 proc test_update_setup {desc} { global UPDATE_TEST incr UPDATE_TEST fossil revert fossil clean fossil update return [format "test-%02u-%s.txt" $UPDATE_TEST $desc] } # The output is in file name order, so massage $RESULT to remove initial UNCHANGED # files. Only do this if we have the expected branch information. proc test_update {testname message changes {fossil_args ""}} { fossil update --verbose {*}$fossil_args if { [regsub {\n-{79}\nupdated-from: [0-9a-z]{40} .*} $::RESULT {} test_result ] } { regsub {^(?:UNCHANGED [-a-z0-9.]+\n)*} $test_result {} test_result } else { set test_result $::RESULT } test "update-message-$testname" {$message == $test_result} fossil changes --differ test "update-changes-$testname" {$changes == $::RESULT} } # Use a sequence number for file content that is not important for the test. set UPDATE_SEQ_NO 0 proc write_seq_to_file {fname} { global UPDATE_SEQ_NO |
︙ | ︙ | |||
86 87 88 89 90 91 92 | write_seq_to_file $fname fossil add $fname test_update $testname $message $changes -expectError set testname "add-overwrites" set fname [test_update_setup $testname] set message "ADD $fname - overwrites an unmanaged file, original copy backed up locally" | | | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | write_seq_to_file $fname fossil add $fname test_update $testname $message $changes -expectError set testname "add-overwrites" set fname [test_update_setup $testname] set message "ADD $fname - overwrites an unmanaged file, original copy backed up locally" set changes "EXTRA $fname-original" write_seq_to_file $fname fossil add $fname fossil commit -m "Add $fname" fossil up previous write_seq_to_file $fname test_update $testname $message $changes -expectError |
︙ | ︙ | |||
180 181 182 183 184 185 186 187 188 189 190 191 192 193 | fossil commit -m "Add $fname" write_file $fname "top\ncenter\n" fossil mv --hard $fname "$fname.renamed" fossil commit -m "Update and rename $fname" fossil up previous write_file $fname "center\nbelow\n" test_update $testname $message $changes set testname "merge-standard" set fname [test_update_setup $testname] set message "MERGE $fname" set changes "EDITED $fname" write_file $fname "center\n" fossil add $fname | > > > > > > > > > > > > > > > > | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | fossil commit -m "Add $fname" write_file $fname "top\ncenter\n" fossil mv --hard $fname "$fname.renamed" fossil commit -m "Update and rename $fname" fossil up previous write_file $fname "center\nbelow\n" test_update $testname $message $changes # Rename in current checkout with extra files in target. # Based on https://fossil-scm.org/forum/forumpost/2753239f00 set testname "merge-renamed-current" set fname [test_update_setup $testname] set warning "UPDATE $fname.extra\nUNCHANGED $fname.renamed" set changes "RENAMED $fname -> $fname.renamed" write_seq_to_file $fname write_seq_to_file "$fname.extra" fossil add $fname "$fname.extra" fossil commit -m "Add $fname and $fname.extra" write_seq_to_file "$fname.extra" fossil commit -m "Update $fname.extra" fossil up previous fossil mv --hard $fname "$fname.renamed" test_update $testname $warning $changes set testname "merge-standard" set fname [test_update_setup $testname] set message "MERGE $fname" set changes "EDITED $fname" write_file $fname "center\n" fossil add $fname |
︙ | ︙ |