Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch annotatecmd_fix Excluding Merge-Ins
This is equivalent to a diff from c80ee413ab to c7c4279f13
2011-10-19
| ||
19:54 | Merge in the annotatecmd_fix branch. check-in: e161670939 user: drh tags: trunk | |
2011-10-18
| ||
23:37 | When editing the properties of a check-in and comparing the old and new comment text, ignore leading and trailing whitespace and the differences between \r\n and \n. Hopefully this will reduce the number of unwanted comment edits. check-in: 48928829e2 user: drh tags: trunk | |
20:55 | Adding a boolean setting to choose the use of 'targets' in the anchors href. Default enabled. Related to the thread starting at http://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg06588.html check-in: d29df2f0a2 user: viriketo tags: targets_setting | |
19:49 | Bringing the changes I had in [4bae75a08e] to a trunk-derived branch. check-in: ef5d2176f9 user: viriketo tags: annotate_links | |
19:45 | Should fix ticket [f0f9aff371f2]. Until now, the annotate_cmd was taking the last (or any?) checkin that had the artifact to be annotated, totally unrelated to what version is checked out. I made annotate_cmd respect the checkout, and annotate only from the past until the checked out version. This makes the command slower, but at least does... Closed-Leaf check-in: c7c4279f13 user: viriketo tags: annotatecmd_fix | |
2011-10-17
| ||
23:12 | Fix typo in warning message. check-in: c80ee413ab user: drh tags: trunk | |
16:01 | Fixed an incorrect const qualifier (caught by clang). check-in: fda7c2c63d user: stephan tags: trunk | |
Changes to src/descendants.c.
200 200 ** direct ancestor as the largest generation number. 201 201 */ 202 202 void compute_direct_ancestors(int rid, int N){ 203 203 Stmt ins; 204 204 Stmt q; 205 205 int gen = 0; 206 206 db_multi_exec( 207 - "CREATE TEMP TABLE ancestor(rid INTEGER, generation INTEGER PRIMARY KEY);" 207 + "CREATE TEMP TABLE IF NOT EXISTS ancestor(rid INTEGER, generation INTEGER PRIMARY KEY);" 208 + "DELETE FROM ancestor;" 208 209 "INSERT INTO ancestor VALUES(%d, 0);", rid 209 210 ); 210 211 db_prepare(&ins, "INSERT INTO ancestor VALUES(:rid, :gen)"); 211 212 db_prepare(&q, 212 213 "SELECT pid FROM plink" 213 214 " WHERE cid=:rid AND isprim" 214 215 );
Changes to src/diff.c.
1066 1066 ** --log List all versions analyzed 1067 1067 ** --filevers Show file version numbers rather than check-in versions 1068 1068 */ 1069 1069 void annotate_cmd(void){ 1070 1070 int fnid; /* Filename ID */ 1071 1071 int fid; /* File instance ID */ 1072 1072 int mid; /* Manifest where file was checked in */ 1073 + int cid; /* Checkout ID */ 1073 1074 Blob treename; /* FILENAME translated to canonical form */ 1074 1075 char *zFilename; /* Cannonical filename */ 1075 1076 Annotator ann; /* The annotation of the file */ 1076 1077 int i; /* Loop counter */ 1077 1078 const char *zLimit; /* The value to the --limit option */ 1078 1079 int iLimit; /* How far back in time to look */ 1079 1080 int showLog; /* True to show the log */ ................................................................................ 1095 1096 if( fnid==0 ){ 1096 1097 fossil_fatal("no such file: %s", zFilename); 1097 1098 } 1098 1099 fid = db_int(0, "SELECT rid FROM vfile WHERE pathname=%Q", zFilename); 1099 1100 if( fid==0 ){ 1100 1101 fossil_fatal("not part of current checkout: %s", zFilename); 1101 1102 } 1102 - mid = db_int(0, "SELECT mid FROM mlink WHERE fid=%d AND fnid=%d", fid, fnid); 1103 + cid = db_lget_int("checkout", 0); 1104 + if (cid == 0){ 1105 + fossil_fatal("Not in a checkout"); 1106 + } 1107 + if( iLimit<=0 ) iLimit = 1000000000; 1108 + compute_direct_ancestors(cid, iLimit); 1109 + mid = db_int(0, "SELECT mlink.mid FROM mlink, ancestor " 1110 + " WHERE mlink.fid=%d AND mlink.fnid=%d AND mlink.mid=ancestor.rid" 1111 + " ORDER BY ancestor.generation ASC LIMIT 1", 1112 + fid, fnid); 1103 1113 if( mid==0 ){ 1104 1114 fossil_panic("unable to find manifest"); 1105 1115 } 1106 1116 if( fileVers ) annFlags |= ANN_FILE_VERS; 1107 1117 annotate_file(&ann, fnid, mid, 0, iLimit, annFlags); 1108 1118 if( showLog ){ 1109 1119 for(i=0; i<ann.nVers; i++){