Ticket UUID: | f0f9aff371f26b4eebb1ded3cabc70c956c6cae7 | ||
Title: | 'annotate' misses changes. | ||
Status: | Closed | Type: | Code_Defect |
Severity: | Important | Priority: | |
Subsystem: | Resolution: | Fixed | |
Last Modified: | 2011-10-19 20:16:18 | ||
Version Found In: | [047e06193b] 2011-04-13 | ||
Description & Comments: | |||
I've a branch where I'm interested on the source of this line of code, at point
2011-04-28:
const bool debugErrorToFile = true; Looking at annotate, I see: ad13e86e1e 2010-09-28 llbatlle: const bool debugErrorToFile = true; I don't trust it.. and I find a commit in the same branch, on 2011-04-08, that introduced the change. So, annotate was not showing it. I write a commit today (2011-05-05), setting back the debugErrorToFile to false. Then I test annotate again, expecting to see the very recent commit. But I get: 8c918ba0e2 2010-10-25 llbatlle: const bool debugErrorToFile = false; So, annotate is getting confused somehow. I can completely reproduce it, but I cannot give the repository as it contains private files. viriketo added on 2011-05-05 15:16:35 UTC: Notice that the diff says: + if( showClosed ){ + db_prepare(&q, + "SELECT value FROM tagxref" + " WHERE tagid=%d AND value NOT NULL " + "EXCEPT " while annotate says 74c86dd1da 2011-05-04 drh: if( showClosed ){ 518439507a 2010-08-15 drh: db_prepare(&q, <== This line 74c86dd1da 2011-05-04 drh: "SELECT value FROM tagxref" 74c86dd1da 2011-05-04 drh: " WHERE tagid=%d AND value NOT NULL " 74c86dd1da 2011-05-04 drh: "EXCEPT " viriketo added on 2011-05-05 21:43:57 UTC: viriketo added on 2011-05-05 21:48:17 UTC: viriketo added on 2011-05-05 22:00:38 UTC: I think that this makes the 'annotate' show, sometimes, "the earliest commit with that change", instead of "the last commit with that change". Other VCS show in 'annotate' the last change in every given line. This is the behaviour I'd prefer, but I barely know anything about diff algorithms, so I hope someone takes the job of implementing this usual kind of annotate. viriketo added on 2011-05-06 19:15:41 UTC: I'm trying the fossil version [9a63d1f048] 2011-05-06, which should have the changes that brought the ticket into Fixed. As I said in the initial ticket entry, I had committed const bool debugErrorToFile = false; in 2011-05-05. If I use 'annotate' on that file with the new fossil version, I get: f794dd718d 2011-03-01 llbatlle: const bool debugErrorToFile = false; which is different than before your changes, but still wrong. viriketo added on 2011-05-06 19:18:48 UTC: viriketo added on 2011-05-06 19:27:18 UTC: viriketo added on 2011-05-07 14:14:54 UTC: mid = db_int(0, "SELECT mid FROM mlink WHERE fid=%d AND fnid=%d", fid, fnid); that does not give a SINGLE result. Different checkins may have the very same file artifact, and it needs further code to decide what checkin is of interest. Then, it needs some code to choose what is of the interest of the requester. viriketo added on 2011-10-19 20:16:18 UTC: |