Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch andygoth-changes Excluding Merge-Ins
This is equivalent to a diff from bc5a67d1 to 45e2e3e9
2016-11-07
| ||
00:33 | Integrate andygoth-changes, try two ... (check-in: e7764947 user: andygoth tags: trunk) | |
00:20 | Correct SELECT to not exclude added files, i.e. files not present in the blob table ... (Closed-Leaf check-in: 45e2e3e9 user: andygoth tags: andygoth-changes) | |
2016-11-06
| ||
23:45 | Integrate andygoth-changes for broader testing and comment. This change should be fully backward-compatible, unless of course a script depends on the help text never changing or new options never being added. All existing options and defaults should work identically to before. I had planned to update the ls command to use the same backend as changes/status, but that work will have to wait until we decide if the ls options should be redesigned. The SCAN_MTIME, SCAN_SIZE, C_MTIME, and C_SIZE flags are currently unused and can be removed, but their presence harms nothing, and they should be useful for a basis for an updated ls command, though they may need modification to address confusion between commit time, on-disk mtime, checked-in size, and on-disk size. ... (check-in: 7c8cc2ad user: andygoth tags: trunk) | |
23:40 | Correct SQL syntax error on "fossil changes -merge" which is not supposed to display any files yet still tries to run the file query even though it says only "ORDER BY pathname" with no SELECT ... (check-in: 61da7752 user: andygoth tags: andygoth-changes) | |
23:35 | Merge trunk ... (check-in: 74a5873c user: andygoth tags: andygoth-changes) | |
23:31 | Correct internal contradiction in updated ls documentation to match actual behavior. This is too complicated. ... (check-in: bc5a67d1 user: andygoth tags: trunk) | |
23:25 | Document actual behavior of ls command. I'm questioning whether it's worth maintaining backward compatibility with this highly non-orthogonal collection of options whose behaviors all affect each other with varying degrees of nuance. ... (check-in: 0a4310b3 user: andygoth tags: trunk) | |
Changes to src/add.c.
︙ | |||
224 225 226 227 228 229 230 | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | - + | zRepo = blob_str(&repoName); } if( filenames_are_case_sensitive() ){ xCmp = fossil_strcmp; }else{ xCmp = fossil_stricmp; } |
︙ | |||
305 306 307 308 309 310 311 | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | - + | } if( zIgnoreFlag==0 ){ zIgnoreFlag = db_get("ignore-glob", 0); } if( db_get_boolean("dotfiles", 0) ) scanFlags |= SCAN_ALL; vid = db_lget_int("checkout",0); db_begin_transaction(); |
︙ | |||
347 348 349 350 351 352 353 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | - + | forceFlag = 1; }else if( cReply!='y' && cReply!='Y' ){ blob_reset(&fullName); continue; } } db_multi_exec( |
︙ | |||
472 473 474 475 476 477 478 | 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | - + - + | }else{ #if FOSSIL_ENABLE_LEGACY_MV_RM removeFiles = db_get_boolean("mv-rm-files",0); #else removeFiles = FOSSIL_MV_RM_FILE; #endif } |
︙ | |||
668 669 670 671 672 673 674 | 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 | - + | /* step 1: ** Populate the temp table "sfile" with the names of all unmanaged ** files currently in the check-out, except for files that match the ** --ignore or ignore-glob patterns and dot-files. Then add all of ** the files in the sfile temp table to the set of managed files. */ |
︙ |
Changes to src/checkin.c.
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 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 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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 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 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - + - - - - + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - + - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + | ** from the local repository. */ #include "config.h" #include "checkin.h" #include <assert.h> /* ** Change filter options. */ enum { /* Zero-based bit indexes. */ CB_EDITED , CB_UPDATED , CB_CHANGED, CB_MISSING , CB_ADDED, CB_DELETED, CB_RENAMED, CB_CONFLICT, CB_META , CB_UNCHANGED, CB_EXTRA, CB_MERGE , CB_RELPATH, CB_CLASSIFY, CB_MTIME , CB_SIZE , CB_FATAL, CB_COMMENT, /* Bitmask values. */ C_EDITED = 1 << CB_EDITED, /* Edited, merged, and conflicted files. */ C_UPDATED = 1 << CB_UPDATED, /* Files updated by merge/integrate. */ C_CHANGED = 1 << CB_CHANGED, /* Treated the same as the above two. */ C_MISSING = 1 << CB_MISSING, /* Missing and non- files. */ C_ADDED = 1 << CB_ADDED, /* Added files. */ C_DELETED = 1 << CB_DELETED, /* Deleted files. */ C_RENAMED = 1 << CB_RENAMED, /* Renamed files. */ C_CONFLICT = 1 << CB_CONFLICT, /* Files having merge conflicts. */ C_META = 1 << CB_META, /* Files with metadata changes. */ C_UNCHANGED = 1 << CB_UNCHANGED, /* Unchanged files. */ C_EXTRA = 1 << CB_EXTRA, /* Unmanaged files. */ C_MERGE = 1 << CB_MERGE, /* Merge contributors. */ C_FILTER = C_EDITED | C_UPDATED | C_CHANGED | C_MISSING | C_ADDED | C_DELETED | C_RENAMED | C_CONFLICT | C_META | C_UNCHANGED | C_EXTRA | C_MERGE, /* All filter bits. */ C_ALL = C_FILTER & ~(C_EXTRA | C_MERGE),/* All managed files. */ C_DIFFER = C_FILTER & ~(C_UNCHANGED | C_MERGE),/* All differences. */ C_RELPATH = 1 << CB_RELPATH, /* Show relative paths. */ C_CLASSIFY = 1 << CB_CLASSIFY, /* Show file change types. */ C_DEFAULT = (C_ALL & ~C_UNCHANGED) | C_MERGE | C_CLASSIFY, C_MTIME = 1 << CB_MTIME, /* Show file modification time. */ C_SIZE = 1 << CB_SIZE, /* Show file size in bytes. */ C_FATAL = (1 << CB_FATAL) | C_MISSING, /* Fail on MISSING/NOT_A_FILE. */ C_COMMENT = 1 << CB_COMMENT, /* Precede each line with "# ". */ }; /* ** Create a TEMP table named SFILE and add all unmanaged files named on ** the command-line to that table. If directories are named, then add ** all unmanaged files contained underneath those directories. If there ** are no files or directories named on the command-line, then add all ** unmanaged files anywhere in the checkout. */ static void locate_unmanaged_files( int argc, /* Number of command-line arguments to examine */ char **argv, /* values of command-line arguments */ unsigned scanFlags, /* Zero or more SCAN_xxx flags */ Glob *pIgnore /* Do not add files that match this GLOB */ ){ Blob name; /* Name of a candidate file or directory */ char *zName; /* Name of a candidate file or directory */ int isDir; /* 1 for a directory, 0 if doesn't exist, 2 for anything else */ int i; /* Loop counter */ int nRoot; /* length of g.zLocalRoot */ db_multi_exec("CREATE TEMP TABLE sfile(pathname TEXT PRIMARY KEY %s," " mtime INTEGER, size INTEGER)", filename_collation()); nRoot = (int)strlen(g.zLocalRoot); if( argc==0 ){ blob_init(&name, g.zLocalRoot, nRoot - 1); vfile_scan(&name, blob_size(&name), scanFlags, pIgnore, 0); blob_reset(&name); }else{ for(i=0; i<argc; i++){ file_canonical_name(argv[i], &name, 0); zName = blob_str(&name); isDir = file_wd_isdir(zName); if( isDir==1 ){ vfile_scan(&name, nRoot-1, scanFlags, pIgnore, 0); }else if( isDir==0 ){ fossil_warning("not found: %s", &zName[nRoot]); }else if( file_access(zName, R_OK) ){ fossil_fatal("cannot open %s", &zName[nRoot]); }else{ db_multi_exec( "INSERT OR IGNORE INTO sfile(pathname) VALUES(%Q)", &zName[nRoot] ); } blob_reset(&name); } } } /* |
︙ | |||
169 170 171 172 173 174 175 | 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | + - - + + - - - - + + + + - - + + - - - - - - + + + + + + - - - - - + + + + - - - - + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - - - - + + + + - - - - - - + + + + + - - - + - - - + - - + - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + | int absPathOption = find_option("abs-paths", 0, 0)!=0; int relPathOption = find_option("rel-paths", 0, 0)!=0; if( absPathOption ){ relativePaths = 0; } if( relPathOption ){ relativePaths = 1; } return relativePaths; } /* |
︙ | |||
506 507 508 509 510 511 512 | 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | fossil_print("%s%s\n", type, zPathname); } free(zFullName); } db_finalize(&q); } |
︙ | |||
586 587 588 589 590 591 592 | 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 | - + + - - - + - + + + - + - - - - - - - - - - - - - - - - - - + - + + + - - + - + - | ** --ignore <CSG> ignore files matching patterns from the argument ** --rel-paths Display pathnames relative to the current working ** directory. ** ** See also: changes, clean, status */ void extras_cmd(void){ |
︙ | |||
788 789 790 791 792 793 794 | 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 | - + - - + + - + - + + | pClean = glob_create(zCleanFlag); nRoot = (int)strlen(g.zLocalRoot); g.allowSymlinks = 1; /* Find symlinks too */ if( !dirsOnlyFlag ){ Stmt q; Blob repo; if( !dryRunFlag && !disableUndo ) undo_begin(); |
︙ | |||
1079 1080 1081 1082 1083 1084 1085 | 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 | - + | blob_appendf(&prompt, "%s%s", p->azTag[i], p->azTag[i+1] ? ", " : ""); } } blob_appendf(&prompt, "\n#\n"); } } |
︙ |
Changes to src/descendants.c.
︙ | |||
214 215 216 217 218 219 220 | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | - - + + | i64 *pMTime /* Write result here */ ){ static int prevVid = -1; static Stmt q; if( prevVid!=vid ){ prevVid = vid; |
︙ |
Changes to src/main.c.
︙ | |||
1190 1191 1192 1193 1194 1195 1196 | 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 | - + - + - - + + | static int repo_list_page(void){ Blob base; int n = 0; assert( g.db==0 ); blob_init(&base, g.zRepositoryName, -1); sqlite3_open(":memory:", &g.db); |
︙ |
Changes to src/stash.c.
︙ | |||
205 206 207 208 209 210 211 | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - + - + | Stmt q; db_prepare(&q, "SELECT rid, isRemoved, isExec, isLink, origname, newname, delta" " FROM stashfile WHERE stashid=%d", stashid ); vid = db_lget_int("checkout",0); |
︙ |
Changes to src/vfile.c.
︙ | |||
453 454 455 456 457 458 459 460 461 462 463 464 465 466 | 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | + + | #if INTERFACE /* ** Values for the scanFlags parameter to vfile_scan(). */ #define SCAN_ALL 0x001 /* Includes files that begin with "." */ #define SCAN_TEMP 0x002 /* Only Fossil-generated files like *-baseline */ #define SCAN_NESTED 0x004 /* Scan for empty dirs in nested checkouts */ #define SCAN_MTIME 0x008 /* Populate mtime column */ #define SCAN_SIZE 0x010 /* Populate size column */ #endif /* INTERFACE */ /* ** Load into table SFILE the name of every ordinary file in ** the directory pPath. Omit the first nPrefix characters of ** of pPath when inserting into the SFILE table. ** |
︙ | |||
496 497 498 499 500 501 502 | 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 | - - - + + + + + + + + | if( glob_match(pIgnore2, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; blob_resize(pPath, origSize); } if( skipAll ) return; if( depth==0 ){ db_prepare(&ins, |
︙ | |||
537 538 539 540 541 542 543 544 545 546 547 548 549 550 | 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 | + + + + + + | }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK) ? (file_wd_isfile_or_link(zPath)) : (pEntry->d_type==DT_REG) ){ #else }else if( file_wd_isfile_or_link(zPath) ){ #endif if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){ db_bind_text(&ins, ":file", &zPath[nPrefix+1]); if( scanFlags & SCAN_MTIME ){ db_bind_int(&ins, ":mtime", file_mtime(zPath)); } if( scanFlags & SCAN_SIZE ){ db_bind_int(&ins, ":size", file_size(zPath)); } db_step(&ins); db_reset(&ins); } } fossil_path_free(zUtf8); blob_resize(pPath, origSize); } |
︙ |