git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: faster egit history page and a pure java "gitk"

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 25, 2008, 04:43 UTC
Message-ID
<20080325044308.GA4759@spearce.org>
In-Reply-To
<47E7ADA3.2060906@intelinet.com.br>
"Roger C. Soares" <rogersoares@intelinet.com.br> wrote:
Show 18 quoted lines
> Shawn O. Pearce escreveu:
> >OK, so I decided a few weeks back that the history page was not fast
> >enough.  I think I've spent the past 3 weeks writing true revision
> >machinary for jgit, and now connecting it up to a UI visualizer.
> >
> >  git://repo.or.cz/egit/spearce.git plotter
> >
> >The history page has been completely replaced.  I saw Roger has
> >some patches against the current history page.  :-|
> 
> Hi Shawn. This is awesome, I can't wait to see this integrated in the 
> main repo :)
> 
> I don't spend much time working on egit so I usually take a while to 
> make small things, but I can certainly merge my patches on top of yours.
> 
> Robin, how should I proceed, resend all my patches from the weekend on 
> top of Shawn's tree?

I just pushed a newer version out that contains support for showing commits using a bold font if the commit has the highlightFlag set on it. I assume you were trying to work on a feature like gitk has where you can type in a string and have gitk bold all of the commits that contain that string in the message, right?

If you look at the newer internal.history.GitHistoryPage class there is a historyFlag available as an instance member. We also have an SWTCommitList allocated in the inputSet() method. The SWTCommitList has an applyFlag method that accepts a RevFilter and adds the passed RevFlag onto any commit that matches the filter.

There are a lot of RevFilter implementations, take a look at the revwalk.filter package, or see the command line parsing code in RevWalkTextBuiltin. We have ones for author, committer, message...

So a good part of the code is there to do a bold/unbold thing. There's also indexOf and lastIndexOf methods on SWTCommitList that can search for the highlightFlag in either direction from a given row index, making a prev/next feature pretty easy.

I decided to leave some low hanging fruit. There's bigger and more complex issues still lurking in the revwalk/treewalk features.

-- 
Shawn.
Previous: Robin RosenbergNext: Roger C. Soares
Message 4 of 16 in “faster egit history page and a pure java "gitk"”
  1. Shawn O. PearceMar 24, 2008
  2. Roger C. SoaresMar 24, 2008
  3. Robin RosenbergMar 24, 2008
  4. Shawn O. PearceMar 25, 2008
  5. Roger C. SoaresMar 25, 2008
  6. Robin RosenbergMar 24, 2008
  7. Shawn O. PearceMar 25, 2008
  8. Robin RosenbergMar 24, 2008
  9. Shawn O. PearceMar 25, 2008
  10. Roger C. SoaresMar 25, 2008
  11. Shawn O. PearceMar 25, 2008
  12. Shawn O. PearceMar 25, 2008
  13. Roger C. SoaresMar 25, 2008
  14. Robin RosenbergMar 25, 2008
  15. Roger C. SoaresMar 26, 2008
  16. Shawn O. PearceMar 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.