Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch annotate_noleak Excluding Merge-Ins
This is equivalent to a diff from 0cf54160 to 4860d9f2
2011-10-14
| ||
16:11 |
Merging the annotate_noleak changes, about removing an important memory leak in
the annotate operation.
It also fixes some blob behaviour in blob.c and content.c. Update: Removed from trunk. Replaced by the must simpler fix at [9929bab702f99839ee] (check-in: 409f370a user: viriketo tags: declined) | |
2011-09-13
| ||
17:18 | The Label list was not properly freed in some cases; looking at the annotate of 'win/Makefile.msc' was triggering the case. (Closed-Leaf check-in: 4860d9f2 user: viriketo tags: annotate_noleak) | |
16:43 | Getting in the changes reducing the leak on annotate. In the fossil mailing list, I received only opinions in favour of getting mallocs and frees properly paired, so I think noone will refuse the change. (check-in: 7870a89b user: viriketo tags: annotate_noleak) | |
2011-09-06
| ||
13:23 | Close A and LI tags when displaying new and deleted files in timeline. (check-in: 8d703ff9 user: dmitry tags: trunk) | |
07:33 |
Two fixes about localtime:
| |
2011-09-04
| ||
20:43 | Updating from trunk to get the latest code. (check-in: 73b6ff49 user: viriketo tags: annotate_noleak) | |
01:28 | Update the built-in SQLite to the latest 3.7.8-alpha version that contains the improved merge-sort logic. (check-in: 0cf54160 user: drh tags: trunk) | |
2011-09-02
| ||
16:19 | Do a better job of merging branches that contain lots of file renames. (check-in: 0b93b0f9 user: drh tags: trunk) | |
Changes to src/blob.c.
︙ | |||
892 893 894 895 896 897 898 | 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 | - + | ** ** pOut must be either uninitialized or the same as pIn. */ int blob_uncompress(Blob *pIn, Blob *pOut){ unsigned int nOut; unsigned char *inBuf; unsigned int nIn = blob_size(pIn); |
︙ |
Changes to src/content.c.
︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + | contentCache.nAlloc*sizeof(contentCache.a[0])); } p = &contentCache.a[contentCache.n++]; p->rid = rid; p->age = contentCache.nextAge++; contentCache.szTotal += blob_size(pBlob); p->content = *pBlob; |
︙ | |||
257 258 259 260 261 262 263 | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - + | if( nextRid==0 ){ rc = content_of_blob(rid, pBlob); }else{ int n = 1; int nAlloc = 10; int *a = 0; int mx; |
︙ |
Changes to src/db.c.
︙ | |||
209 210 211 212 213 214 215 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + | ** Prepare a Stmt. Assume that the Stmt is previously uninitialized. ** If the input string contains multiple SQL statements, only the first ** one is processed. All statements beyond the first are silently ignored. */ int db_vprepare(Stmt *pStmt, int errOk, const char *zFormat, va_list ap){ int rc; char *zSql; |
︙ |
Changes to src/deltacmd.c.
︙ | |||
75 76 77 78 79 80 81 | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - + | ** ** It works ok for pTarget and pOriginal to be the same blob. ** ** Return the length of the target. Return -1 if there is an error. */ int blob_delta_apply(Blob *pOriginal, Blob *pDelta, Blob *pTarget){ int len, n; |
︙ |
Changes to src/diff.c.
︙ | |||
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | 617 618 619 620 621 622 623 624 625 626 627 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 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 745 746 747 748 749 750 751 752 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 827 828 829 830 831 832 833 834 835 836 837 838 839 | + + + + + + + + + + + + + + - + - + + + - + - - + + - + + + + + + + + + + + + + + + - + - + + - - - + + + + + + + + + + + - + - + + + + + + + + + - - + - + + - + - + | } /************************************************************************** ** The basic difference engine is above. What follows is the annotation ** engine. Both are in the same file since they share many components. */ /* ** Linked list of strings, labels used in the annotator code. ** The elements of the list and the pointed string (str) ** will be freed once they become totally unreferenced ** (nref == 0). */ struct Label { struct Label *prev; /* previous element */ struct Label *next; /* next element */ char *str; /* The label string */ int nref; /* Number of references to the string */ }; /* ** The status of an annotation operation is recorded by an instance ** of the following structure. */ typedef struct Annotator Annotator; struct Annotator { DContext c; /* The diff-engine context */ struct AnnLine { /* Lines of the original files... */ const char *z; /* The text of the line */ short int n; /* Number of bytes (omitting trailing space and \n) */ short int iLevel; /* Level at which tag was set */ |
︙ | |||
800 801 802 803 804 805 806 807 | 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 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 | + + + + + + - + - + + - + - + + + + + + + + + + | iLimit>0 ? iLimit : 10000000 ); while( db_step(&q)==SQLITE_ROW ){ int pid = db_column_int(&q, 0); const char *zUuid = db_column_text(&q, 1); const char *zDate = db_column_text(&q, 2); const char *zUser = db_column_text(&q, 3); struct Label *l = fossil_malloc(sizeof(*l)); l->nref = 0; l->next = p->firstLabel; l->prev = 0; if (p->firstLabel) p->firstLabel->prev = l; if( webLabel ){ |
︙ | |||
851 852 853 854 855 856 857 | 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 | - + - + + + + + + + + + + + + + - + | if( P("filevers") ) annFlags |= ANN_FILE_VERS; annotate_file(&ann, fnid, mid, g.okHistory, iLimit, annFlags); if( P("log") ){ int i; @ <h2>Versions analyzed:</h2> @ <ol> for(i=0; i<ann.nVers; i++){ |
︙ | |||
912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 | 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 | + - + - + + + + + + + + + + + - + + | if( fnid==0 ){ fossil_fatal("no such file: %s", zFilename); } fid = db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q", zFilename); if( fid==0 ){ fossil_fatal("not part of current checkout: %s", zFilename); } blob_reset(&treename); mid = db_int(0, "SELECT mid FROM mlink WHERE fid=%d AND fnid=%d", fid, fnid); if( mid==0 ){ fossil_panic("unable to find manifest"); } if( fileVers ) annFlags |= ANN_FILE_VERS; annotate_file(&ann, fnid, mid, 0, iLimit, annFlags); if( showLog ){ for(i=0; i<ann.nVers; i++){ |
Changes to src/file.c.
︙ | |||
699 700 701 702 703 704 705 | 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 | - + | ** message and quit if the errFatal flag is true. If errFatal is ** false, then simply return 0. ** ** The root of the tree is defined by the g.zLocalRoot variable. */ int file_tree_name(const char *zOrigName, Blob *pOut, int errFatal){ int n; |
︙ |