Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch enhancedUndo Through [1a4bcadde0] Excluding Merge-Ins
This is equivalent to a diff from 2c741dec46 to 1a4bcadde0
|
2015-07-08
| ||
| 16:25 | Update the built-in SQLite to the 3.8.11 alpha that includes the pcache1 preallocation enhancement. check-in: 8fb4269a31 user: drh tags: trunk | |
|
2015-07-06
| ||
| 21:56 | Small grammar fix in comment. check-in: 45c7dbb81e user: mistachkin tags: enhancedUndo | |
|
2015-07-04
| ||
| 06:05 | Merge updates from trunk. check-in: 1a4bcadde0 user: mistachkin tags: enhancedUndo | |
| 06:03 | Update 'all clean' command with the --disable-undo and --no-prompt options. check-in: 3e22d93b68 user: mistachkin tags: enhancedUndo | |
| 06:01 | Update and tweak help text. check-in: 2c741dec46 user: mistachkin tags: trunk | |
| 05:47 | added missing "all cache" docs. check-in: 2f0533fe4a user: stephan tags: trunk | |
Changes to src/allrepo.c.
| ︙ | |||
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | + + |
useCheckouts = find_option("ckout","c",0)!=0;
}else if( strncmp(zCmd, "clean", n)==0 ){
zCmd = "clean --chdir";
collect_argument(&extra, "allckouts",0);
collect_argument_value(&extra, "case-sensitive");
collect_argument_value(&extra, "clean");
collect_argument(&extra, "dirsonly",0);
collect_argument(&extra, "disable-undo",0);
collect_argument(&extra, "dotfiles",0);
collect_argument(&extra, "emptydirs",0);
collect_argument(&extra, "force","f");
collect_argument_value(&extra, "ignore");
collect_argument_value(&extra, "keep");
collect_argument(&extra, "no-prompt",0);
collect_argument(&extra, "temp",0);
collect_argument(&extra, "verbose","v");
collect_argument(&extra, "whatif",0);
useCheckouts = 1;
}else if( strncmp(zCmd, "dbstat", n)==0 ){
zCmd = "dbstat --omit-version-info -R";
showLabel = 1;
|
| ︙ |
Changes to src/checkin.c.
| ︙ | |||
642 643 644 645 646 647 648 | 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 | - + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + | ** values for --clean, --ignore, and --keep are determined by the ** (versionable) clean-glob, ignore-glob, and keep-glob settings. ** Files and subdirectories whose names begin with "." are automatically ** ignored unless the --dotfiles option is used. ** ** The --verily option ignores the keep-glob and ignore-glob settings ** and turns on --force, --dotfiles, and --emptydirs. Use the --verily |
| ︙ | |||
732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 | 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 | + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - + + |
pKeep = glob_create(zKeepFlag);
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();
locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
db_prepare(&q,
"SELECT %Q || x FROM sfile"
" WHERE x NOT IN (%s)"
" ORDER BY 1",
g.zLocalRoot, fossil_all_reserved_names(0)
);
if( file_tree_name(g.zRepositoryName, &repo, 0, 0) ){
db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
}
db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
while( db_step(&q)==SQLITE_ROW ){
const char *zName = db_column_text(&q, 0);
if( glob_match(pKeep, zName+nRoot) ){
if( verboseFlag ){
fossil_print("KEPT file \"%s\" not removed (due to --keep"
" or \"keep-glob\")\n", zName+nRoot);
}
continue;
}
|
| ︙ | |||
801 802 803 804 805 806 807 | 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 | - + + - - - - + + + + + + + + - - |
if( verboseFlag ){
fossil_print("KEPT directory \"%s\" not removed (due to --keep"
" or \"keep-glob\")\n", zName+nRoot);
}
continue;
}
if( !allDirFlag && !dryRunFlag && !glob_match(pClean, zName+nRoot) ){
|
| ︙ |
Changes to src/undo.c.
| ︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + + + + + + + + + | ******************************************************************************* ** ** This file implements the undo/redo functionality. */ #include "config.h" #include "undo.h" |
| ︙ | |||
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 333 334 335 336 337 338 339 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
/*
** Save the current content of the file zPathname so that it
** will be undoable. The name is relative to the root of the
** tree.
*/
void undo_save(const char *zPathname){
if( undo_maybe_save(zPathname, -1)!=UNDO_SAVED_OK ){
fossil_panic("failed to save undo information for path: %s",
zPathname);
}
}
/*
** Possibly save the current content of the file zPathname so
** that it will be undoable. The name is relative to the root
** of the tree. The limit argument may be used to specify the
** maximum size for the file to be saved. If the size of the
** specified file exceeds this size limit (in bytes), it will
** not be saved and an appropriate code will be returned.
**
** WARNING: Please do NOT call this function with a limit
** value less than zero, call the undo_save()
** function instead.
**
** The return value of this function will always be one of the
** following codes:
**
** UNDO_SAVED_OK: The specified file was saved succesfully.
**
** UNDO_INACTIVE: The specified file was NOT saved, because the
** "undo subsystem" is not active. This error
** may indicate that a call to undo_begin() is
** missing.
**
** UNDO_TOOBIG: The specified file was NOT saved, because it
** exceeded the specified size limit. It is
** impossible for this value to be returned if
** the specified size limit is less than zero
** (i.e. unlimited).
*/
int undo_maybe_save(const char *zPathname, i64 limit){
char *zFullname;
|
| ︙ | |||
359 360 361 362 363 364 365 366 367 368 369 370 371 372 | 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | + + + | ** Undo the changes to the working checkout caused by the most recent ** of the following operations: ** ** (1) fossil update (5) fossil stash apply ** (2) fossil merge (6) fossil stash drop ** (3) fossil revert (7) fossil stash goto ** (4) fossil stash pop ** ** The "fossil clean" operation can also be undone; however, this is ** currently limited to files that are less than 10MiB in size. ** ** If FILENAME is specified then restore the content of the named ** file(s) but otherwise leave the update or merge or revert in effect. ** The redo command undoes the effect of the most recent undo. ** ** If the -n|--dry-run option is present, no changes are made and instead ** the undo or redo command explains what actions the undo or redo would |
| ︙ |
Added test/clean.test.