threads / discuss / 1190

Re: qgit-0.7

Subject: Re: qgit-0.7

## tl;dr

2 messages between Jul 10, 2005 and Jul 10, 2005.

replies: 1people: 2as markdown or json

Marco Costalba· Jul 10, 2005, 12:25 UTC · lore
Ingo Molnar wrote:
Show 7 quoted lines
>
>the bad news: except for annotations. I started qgit in the current 
>kernel GIT repository, and clicked on the following commit:
>
>  5bbcfd9000887c0da7d57cc7b3ac869fc0dd5aa9
>
>then i clicked on sched.c to see the annotated file. 

Interesting enough sched.c is one of the files I used as my internal test of annotate function.

I test again annotate with commit 5bbcfd9000887c0da7d57cc7b3ac869fc0dd5aa9 but
 my numbers are:
123 revisions in history list
4 seconds to show file content of rev 5bbcfd9000887c0da7d57cc7b3ac869fc0dd5aa9
16 seconds after annotate is shown
No 'Merge' string found

And no freeze at all on my box also because of some calls to main event loop (qApp->processEvents()) scattered along the heaviest routines.

So I cannot reproduce the bug. Please can you be so kind to apply this:
--- a/src/annotate.cpp
+++ b/src/annotate.cpp
@@ -198,7 +198,7 @@ void Annotate::getReachability(ReachList
 			}
 		}
 	}
-	//printReachList(rl);
+	printReachList(rl);
 }
 
 QString Annotate::getRoot(SRef sha, const ReachList& rl) {


and send me the output?


>
>then the annotations were plain wrong. Almost all lines are attributed 
>to Tony Luck, while much of the file comes from the initial repository.  
>So something's quite fishy here. 

This is just a choice, peraphs wrong ;-). Because it is possible to call
annotate at any time, also while loading, snapshotting the history,
 there is no a univoque meaning of "Inital import" so I choose first rev in list's author
instead. But anyway, this is the patch (above the first one)

--- a/src/annotate.cpp
+++ b/src/annotate.cpp
@@ -273,7 +273,7 @@ QStringList Annotate::getFirstAnnotation
 	QString fileSHA = rf.filesSHA[pos];
 	git->getFile(fileSHA, NULL, true); // calls mainExec and event loop
 	int lineNum = git->mainBuffer.contains('\n');
-	QString author = getAuthor(shaHist[idx], shaHist);
+	QString author = "Initial import";
 	QStringList first;
 	first.insert(first.begin(), lineNum, author);
 	return first;



Also, a number of lines were attributed 
>to 'merge', which isnt very informative.
>

This is not a choice but a bad behaviour. 'Merge' is used as author name
as a mark to help unify() routine to join 2 branches annotations and
should be substituted by second branch author if everything it is ok.
This is not your case ;-).


Marco






		
__________________________________ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 
Ingo Molnar· Jul 10, 2005, 13:43 UTC · re: Marco Costalba · lore
* Marco Costalba <mcostalba@yahoo.it> wrote:
> So I cannot reproduce the bug. [...]

weird - i cannot reproduce it either anymore, and annotate works now as advertised - it's fast and accurate as far as i checked. But i synced to the latest tree meanwhile. Perhaps i had an inconsistent tree?

(i'll keep an eye on this, i've uncommented that printout, so if it ever happens again i'll have the data.)

now that everything is working fine, may i suggest improvements? :-) Firstly, now i'm listed as the author for most portions of sched.c, which is accurate for a fair portion of that, but is only done by qgit because i happened to be the author of the first commit. So it would be more accurate to denote version 1's author as empty (or with some other, nonintrusive string that shows that this file came here due to the initial commit)? We dont know the full history yet, because the current DB's history starts at 2.6.12-rc2, with a full sched.c file. (I think an empty author field would reflect version #1's authorship most accurately, and would be the visually least intrusive.)

	Ingo

← back to recent threads