Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display annotated "blame" version of a file #5

Closed
GoogleCodeExporter opened this issue Nov 17, 2015 · 95 comments
Closed

Display annotated "blame" version of a file #5

GoogleCodeExporter opened this issue Nov 17, 2015 · 95 comments

Comments

@GoogleCodeExporter
Copy link

Annotate the lines of a file with the revision they came from using the blame 
algorithm.

JGit blame is not identical to git-core's blame algorithm. Its a close 
approximation, but there are some differences in how JGit tracks the scoreboard 
and what annotations it can find.

Use /+blame/revision/path as the URL.

Because annotation is slow, results might want to be cached, and the page might 
want to use AJAX to feed down hunks of blame as they are discovered by the 
algorithm. This would be like the incremental blame display visible in git 
gui's blame window.

Original issue reported on code.google.com by dborowitz@google.com on 11 Nov 2012 at 11:25

@GoogleCodeExporter
Copy link
Author

I thought about this a bit over the holiday and got a bit frustrated by the 
fact that JGit has no way to cache common blame info between successive 
revisions of the same blob, let a lone across multiple requests. Obviously all 
blame information for deadbeef^:foo is identical to deadbeef:foo except for 
what was actually modified by foo. Caching one revision's worth of blame is an 
obvious optimization, but someone clicking back through the blame history one 
revision at a time would be recomputing huge chunks of identical blame data.

Fixing this, I think, would require substantial changes to JGit's blame 
internals.

Original comment by dborowitz@google.com on 26 Dec 2012 at 7:37

@GoogleCodeExporter
Copy link
Author

Chromium wants this sooner rather than later. Incremental caching and AJAX 
support may not be blockers.

Original comment by dborowitz@google.com on 23 Jan 2014 at 9:50

@GoogleCodeExporter
Copy link
Author

For our timeline, it would be wonderful to have the first pass on this around 
Valentine's day. We just need something to show to the other Chrome devs so we 
can focus on other aspects of the git migration. Is that at all feasible? If 
not, is there a different date you can give us that will let us put our minds 
and schedules at ease?

Original comment by agable@chromium.org on 27 Jan 2014 at 7:29

@GoogleCodeExporter
Copy link
Author

Got a rough version of this working today, but found a bug in upstream JGit's 
blame implementation that may make the results...unsatisfying:

$ ~/c/jgit/org.eclipse.jgit.pgm/target/jgit blame -L 25,35 
61dcc102242e00d3b0061405d5c909564ebbd819 
gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java
d2fa1fdb (Shawn O. Pearce 2012-06-05 08:49:52 -0700 25) import static 
org.eclipse.jgit.transport.ReceiveCommand.Result.REJECTED_OTHER_REASON;
06cb1d25 (Dave Borowitz   2012-02-29 11:39:00 -0800 26) 
c545c090 (Shawn O. Pearce 2012-07-27 16:38:55 -0700 27) import 
com.google.common.base.Function;
e6298f72 (Shawn O. Pearce 2012-07-26 12:36:55 -0700 28) import 
com.google.common.base.Predicate;
         (                                          29) import com.google.common.base.Splitter;
0795c58a (Shawn Pearce    2013-02-24 15:13:27 -0800 30) import 
com.google.common.base.Strings;
         (                                          31) import com.google.common.collect.ArrayListMultimap;
         (                                          32) import com.google.common.collect.BiMap;
         (                                          33) import com.google.common.collect.HashBiMap;
5972e244 (Bruce Zu        2013-05-28 11:12:16 +0800 34) import 
com.google.common.collect.HashMultimap;

Original comment by dborowitz@google.com on 29 Jan 2014 at 1:32

@GoogleCodeExporter
Copy link
Author

Submitted: 
https://gerrit-review.googlesource.com/#/q/project:gitiles+topic:blame,n,z

JGit bug still exists so results may not be totally accurate, but you can get 
some idea of the UI. Should be live on *.googlesource.com later this week.

Original comment by dborowitz@google.com on 30 Jan 2014 at 12:50

@GoogleCodeExporter
Copy link
Author

This might be the upstream JGit bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=374382

Doesn't look like anybody has attempted to fix it, but at least there's a 
better description than "blame doesn't work sometimes."

Original comment by dborowitz@google.com on 3 Feb 2014 at 11:49

@GoogleCodeExporter
Copy link
Author

Original comment by benhenry@chromium.org on 5 Feb 2014 at 6:33

@GoogleCodeExporter
Copy link
Author

This is awesome.  I notice that the left column links on a blame page go to a 
blame from that revision.  Is this on purpose?  It might be more intuitive for 
the most prominent link to go to the actual revision, rather than the blame.  

For me, it's pretty rare that I'd want to redo the blame at the revision 
identified in the original blame.  Frequently I will need to do a blame on the 
parent of that revision though, if the identified commit was just a refactor or 
rename.

Original comment by ilevy@chromium.org on 7 Feb 2014 at 10:44

@GoogleCodeExporter
Copy link
Author

ilevy: 
https://chromium.googlesource.com/chromium/src/+blame/e3a928b81366df875af873614f
0703f7733f0050/DEPS shows an example of blame links that take us to blame for 
those revisions on this file.  To get to the corresponding revision data, I 
simply scroll to the top of the page and then click the revision.

If each line took me to the basic revision info, reblaming on that revision in 
the same file would require going through the tree of files to find the file 
again, and then blame from there (painful).  Or changing the URL by hand (no 
good).

Comparing the number of clicks between the cases, the greater cost would be on 
those who are actively investigating blame data in a file going back previous 
revisions.  Also, the user has signaled their interest in blame data for that 
file at that revision by finding that file in the web interface already.  
Forcing people to do that over and over again as they go further and further 
back seems bad.

Original comment by cmp@chromium.org on 7 Feb 2014 at 10:54

@GoogleCodeExporter
Copy link
Author

The decision to link to /+blame was somewhat arbitrary. I was on the fence 
between going to the ref (with the downsides cmp mentioned), the file contents, 
or the blame.

Original comment by dborowitz@google.com on 7 Feb 2014 at 11:13

@GoogleCodeExporter
Copy link
Author

On a chromium-dev thread, szager suggested I post this here (see 
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/XUHR_iq5m1I/oq4iaji0
NI4J). Perhaps it's the same as to cmp's comment (I'm not sure). Also, the 
performance was slow (nearly 2 minutes to blame this file).

If needed, I'm happy to sit with anyone and show them the workflow that I use 
to track down code.


Just saw this update, nice to see that work is going on this tool. To try it 
out, I picked a recent example that git users couldn't track down and which we 
were investigating because of a bug. Let's say I want to look at 
RenderViewImpl::OnMessageReceived, and the 
"GetContentClient()->SetActiveURL(main_frame->document().url());" line near the 
top and see the cl which added it. Currently using ViewVC my steps are:
1) go to src.chromium.org/viewvc/, find the file
2) 2s later 
http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_view_imp
l.cc?revision=254479 loads, click on "show annotations"
3) 20s later the page loads, I see that line with a link 
http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/render_view_imp
l.cc?r1=163060&r2=163061&. It's a cl from me moving code into a namespace. 
However the link is helpful in that it has a side-by-side diff and the left 
side has a link to the previous revision before this change, so I click on that 
link.
4) I go through the above line 4 more times because that line changed by a 
bunch of people. The total network load time is 35s. There's a bug in viewvc 
when the change is before a file rename, since it tries to generate a url with 
the old filename and that fails. However that bug is easy to workaround by 
correcting the filename in the url, which I know since it's what I started 
with. I finally get to the original cl that added this: 
http://src.chromium.org/viewvc/chrome?revision=11337&view=revision

This process was more convoluted than normal, because that line had 5-6 changes 
to it. However even then, it takes me about a minute or two to do this tracking.

I tried to do this with the git tool.
1) I click "blame" on 
https://chromium.googlesource.com/chromium/src/+/master/content/renderer/render_
view_impl.cc
2) 108s later, I look for SetActiveURL and see that first change from me. It 
has a link on the left to 
https://chromium.googlesource.com/chromium/src/+blame/a80af12efcba198f4beda21c1d
88c63f04c4dc41/content/renderer/render_view_impl.cc
3) 60s later, it takes me to 
https://chromium.googlesource.com/chromium/src/+blame/a80af12efcba198f4beda21c1d
88c63f04c4dc41/content/renderer/render_view_impl.cc, i.e. the same link where I 
came from. At this point, I can't do anything.


Original comment by jam@chromium.org on 4 Mar 2014 at 12:20

@GoogleCodeExporter
Copy link
Author

jam@ also wrote at the end of his message on chromium-dev:
> So it seems that the tool needs more work to find changes as it
> could only go one step backwards. Having it match viewvc to go
> back multiple changes is needed as this information is often
> crucial in figuring out why a piece of code is the way it is
> when refactoring.
> 
> Hopefully these steps are useful to the team working on this
> tool in figuring out how to get this sort of investigation to
> work.

Original comment by cmp@chromium.org on 4 Mar 2014 at 3:54

@GoogleCodeExporter
Copy link
Author

pkasting@ wrote:

There are a couple problems here:
(1) Because git hashes aren't sequential in nature and the view here displays a 
"rounded" last modified time, we have displays like:

12507e3 dpranke@chromium.org - 1 year, 4 months ago  ...
1f7d4b9 torne@chromium.org - 1 year, 4 months ago  ...

It's not possible to glance at this and tell which change came last.  The 
easiest fix I can think for this would be to change the "1 year, 4 months ago" 
string to a timestamp:

12507e3 dpranke@chromium.org - 12 Dec 2012 18:30 PST  ...
1f7d4b9 torne@chromium.org - 19 Dec 2012 4:27 PST  ...

(2) Clicking on one of these blame lines sends you to an annotated version of 
the file as of that commit.  ViewVC's behavior, which is vastly more useful, 
takes you to the diff from the selected commit against the previous file 
version (from which you can get to the full file as of either version).  With 
this UI, I don't see a trivial mechanism to compute that diff.

To me both of these would be seriously detrimental to my workflow.  It would be 
nice to address both before the switch.

Original comment by cmp@chromium.org on 4 Mar 2014 at 3:56

@GoogleCodeExporter
Copy link
Author

Re: pkasting's (2), there's some discussion here about whether the link should 
go to:
- the blame for the file at that revision (my comment)
- the diff for the file at that revision (pkasting's comment)
- the content of the file at that revision (ilevy's comment)

All I know is that the current UI doesn't make it easy to jump between these 
modes from each other.  It would be nice to have links at the top of each 
modes' page that allowed getting to the other modes easily.

For example: on 
https://chromium.googlesource.com/chromium/src/+blame/master/OWNERS, show:
[link]file history[/link] [link]raw[/link] [link]diff[/link] blame

And on https://chromium.googlesource.com/chromium/src/+/master/OWNERS, show:
[link]file history[/link] raw [link]diff[/link] [link]blame[/link]

etc

Dave, is that doable?

Original comment by cmp@chromium.org on 4 Mar 2014 at 4:02

@GoogleCodeExporter
Copy link
Author

Thanks all for the concrete suggestions. I'll take a look at some other
tools, rethink the top bar, and get back to you.

Original comment by dborowitz@google.com on 4 Mar 2014 at 4:04

@GoogleCodeExporter
Copy link
Author

Here's one more issue I found, from email:

"When trying to use gitiles' blame on the internal, pre-launch Chromium source 
tree, I found that the line height in the "blame" column is not identical to 
the line height in the "source" column, so that as you scroll down, the blame 
lines rapidly get out-of-sync with the source lines, and at the bottom of the 
page, you can see a discontinuity in the horizontal line that appears under the 
two columns.

"This makes blame pretty much useless, because it's not clear where you should 
click to actually see the blame for a particular line of code."

Also, regarding comment 14's three options:
* I don't see how "content of the file at that revision" is more useful than 
"blame of the file at that revision".  Showing the blame annotations is 
strictly more info, so it seems strictly more likely to be useful.  That 
suggests not doing option 3.
* That said, I'm not sure what use cases are addressed by showing the blame of 
the file at the chosen revision.  If you show the diff as I suggested, you can 
immediately distinguish between "yep, this is the change I was looking for" and 
"no, this just reordered comments/fixed a typo/fixed line endings/etc., I need 
to keep looking".  If you show the blame, you have to click through to the diff 
right away to determine this.  So it seems to me like showing the diff is much 
better.  Certainly while I've been doing hours of version control spelunking 
over the past few days (trying to assign owners for all 1000 Chrome 
command-line flags), I've wanted the diff every time.  But maybe I'm missing 
some use case.

Original comment by pkasting@chromium.org on 5 Mar 2014 at 11:26

@GoogleCodeExporter
Copy link
Author

Peter, re: your comment, the current gitiles view doesn't have links at the top 
of the page to the other views of the file (so one can't easily go from blame 
to diff, diff to content, content to blame, etc).  I believe that will change 
and those links will get added, then more options open up.

Going on in your comment, you say the goal is to determine if this is revision 
that the user is looking for.  Once the UI makes it easy to jump between 
content/diff/blame for a file, I believe using "diff" for the default view 
should be the best choice.

For the sake of the bug and the record, I will document the essential steps we 
want to support as I'm aware of them:
1. find file in repo
2. blame on file
3. find line you want to know about and revision where line was changed
4. click on revision
5. see diff, this revision is not the right revision
6. go to blame view of this file at revision's parent
7. repeat from step 3 until step 5 finds a revision that is the right revision

Re: step 6: This feature is currently missing.  When viewing a file in 
content/diff/blame view, there should be a link to a previous revision for that 
file.  I know that we can edit the URL to do this, but we need the page to 
contain the link to consider this feature presented.  Expanding on comment 12, 
jam@ had commented that this feature was missing when he tried to use this tool.

Original comment by cmp@chromium.org on 12 Mar 2014 at 3:14

@GoogleCodeExporter
Copy link
Author

For the record, the steps Chase outlines in c#17 are exactly what the gerrit 
and Chrome Infra teams agreed was the right way to proceed in a weekly meeting 
yesterday.

Original comment by benhe...@google.com on 12 Mar 2014 at 3:40

@GoogleCodeExporter
Copy link
Author

FYI the bug in upstream JGit should soon be fixed:
https://git.eclipse.org/r/24916

Original comment by dborowitz@google.com on 13 Apr 2014 at 7:38

@GoogleCodeExporter
Copy link
Author

https://gerrit-review.googlesource.com/56202 adds a bunch of links to the blame 
page.

I think it's pretty ugly, someone with a better eye for CSS feel free to take a 
look ;)

Original comment by dborowitz@google.com on 21 Apr 2014 at 10:43

@GoogleCodeExporter
Copy link
Author

Added link to the parent blame view when viewing a single file diff:
https://gerrit-review.googlesource.com/56229

Original comment by dborowitz@google.com on 22 Apr 2014 at 12:25

@GoogleCodeExporter
Copy link
Author

Great to see the improvements landing, thank you for incorporating them. I 
think these aren't pushed yet to the server on chromium.googlesource.com right? 
Please let me know when they are so I can test it, or if there's an internal 
canary server that works too.

Original comment by jam@chromium.org on 22 Apr 2014 at 2:55

@GoogleCodeExporter
Copy link
Author

Not live on gogolesource.com, I wanted to get a round or two of feedback before 
going through that push process. Take a look at this change series, which you 
can fetch and run your own test server:
https://gerrit-review.googlesource.com/56229

Or, any Googlers, ping me on IM and I'll give you an internal test server URL.

Original comment by dborowitz@google.com on 22 Apr 2014 at 4:29

@GoogleCodeExporter
Copy link
Author

I tried out the link you sent me over IM. I may be missing something, but I 
don't see how it's possible (and easy) to see previous blames of a piece of 
code. Please see my description in comment 11 and let me know how to do the 
equivalent.

Original comment by jam@chromium.org on 22 Apr 2014 at 4:45

@GoogleCodeExporter
Copy link
Author

Did you hover over the revision and not get the "[commit] [diff] [blame]" popup?

Original comment by mmoss@chromium.org on 22 Apr 2014 at 4:54

@GoogleCodeExporter
Copy link
Author

@mmoss: yep, I had. I clicked on "commit", and that takes me to the parent 
commit. Then I see a "parent    1b12cf346932031c6da0a9114b100824f466e80a[diff]". I 
clicked on "1b12cf346932031c6da0a9114b100824f466e80a", but then I have to find 
the path of the file I was interested in again (by clicking "content", then 
"renderer", then "render_view_impl.cc"). Note that this step doesn't have to be 
done with viewvc, i.e. i can blame the parent revision directly. Anyways, after 
I found the file, I clicked annotate and it showed a revision from 3 years ago. 
i.e. it appears to have skipped a bunch of changes to that one line.

Please see my example in comment 5, and reproduce the steps but on gitiles to 
show the starting cl.

Original comment by jam@chromium.org on 22 Apr 2014 at 5:07

@GoogleCodeExporter
Copy link
Author

I didn't mean that multi-line worked in viewvc, since I rarely use that anymore 
and wouldn't really know. I just meant that it does work in the normal gitiles 
file view (e.g. 
https://chromium.googlesource.com/chromium/src.git/+/master/.DEPS.git), and I 
think that's sufficient, and makes it OK if it doesn't work in the blame view.

Original comment by mmoss@chromium.org on 24 Apr 2014 at 6:41

@GoogleCodeExporter
Copy link
Author

As for the timezones, yes that's useful for git to know about that, but I don't 
think it's useful for the web UI, which should show commits all in the same 
timezone for easier comparison. As for which timezone to use, I'm sure people 
would prefer their local timezone (which might imply client-side rendering), 
but as long as the timestamps are easy to compare, without the additional 
hassle of offsets calculations, it probably doesn't matter all that much, so 
maybe should just use GMT.

Original comment by mmoss@chromium.org on 24 Apr 2014 at 6:47

@GoogleCodeExporter
Copy link
Author

Ah, ok, I don't want to break that, but like I said we can use the same syntax 
highlighter with a <li> instead of a table for the non-blame file view.

Original comment by dborowitz@google.com on 24 Apr 2014 at 6:48

@GoogleCodeExporter
Copy link
Author

I've found non-local timezones (including GMT) to be painful to deal with.  
Using local timezone would be better.  Any chance we can get the client's TZ 
and use that during server-side rendering?

Original comment by cmp@chromium.org on 24 Apr 2014 at 7:13

@GoogleCodeExporter
Copy link
Author

Sure, just ask the Chrome guys to add the user's timezone to the HTTP request 
headers.

Original comment by sop@google.com on 24 Apr 2014 at 7:14

@GoogleCodeExporter
Copy link
Author

Assuming account data was easy to store and pass to gitiles, I was thinking my 
account could have a configurable TZ pref that gitiles can use.

Original comment by cmp@chromium.org on 24 Apr 2014 at 7:18

@GoogleCodeExporter
Copy link
Author

As a first pass, I'd rather just see it consistently in UTC. We can always 
layer localization on that, maybe a server-side pref, or maybe just some 
javascript or Chrome extension that automatically rewrites timestamps based on 
the browser's timezone, but this shouldn't depend it or be delayed by it.

Original comment by mmoss@chromium.org on 24 Apr 2014 at 7:36

@GoogleCodeExporter
Copy link
Author

@mmoss: sounds very reasonable. as a data point, viewvc just displays UTC. I 
think the exact time isn't so important as much as the relative ordering.

I would caution against falling back to chrome extensions to fix up UI. Not 
everyone will have it installed (and even then, not on all chrome profiles). 
Also it's not available on mobile devices or other browsers.

Original comment by jam@chromium.org on 24 Apr 2014 at 7:40

@GoogleCodeExporter
Copy link
Author

People who want UTC, do you want UTC in log and commit views as well?

Original comment by dborowitz@google.com on 24 Apr 2014 at 7:42

@GoogleCodeExporter
Copy link
Author

Yeah, I was just throwing extension out as an option, though if anything, it 
would more likely be a stopgap. Since we can add the handling to the page or 
server, that's probably where it should be (eventually).

Original comment by mmoss@chromium.org on 24 Apr 2014 at 7:47

@GoogleCodeExporter
Copy link
Author

Yeah, consistent TZ would be nice for log view too. Commit view doesn't seem as 
important, since you wouldn't be comparing times. Maybe you'd want it there for 
global consistency, or just because you're reusing template components, but 
definitely not a priority.

Original comment by mmoss@chromium.org on 24 Apr 2014 at 7:58

@GoogleCodeExporter
Copy link
Author

There's been lots of feedback above, so I'll be brief:

Hover versus non-hover: I like the non-hover variant better.  You can omit the 
[Diff] link if you make the date + name link go there, and fix the issue I have 
right now where I can't actually click that link (presumably because of the div 
you mentioned?).  I would avoid abbreviating [Commit] or [Blame].

Timezones: As long as everything is displayed in some consistent timezone, it 
doesn't matter what timezone it is.  UTC is fine.  User's local time is fine.  
Showing things with their original offsets, so you have effectively "3 PM + 8 
hours" for one commit and "4 PM + 0 hours" for another, is bad.

Frames: I agree with John that this should use the full page width.  This will 
be especially important for Blink code which has no line length limit.

Find in page: I agree that it would be better to break multi-line selection in 
the blame view than to break the browser's find-in-page.

Thanks for working on all this stuff.  It's great to see such responsiveness, 
and for things to be making progress.  Much appreciated.

Original comment by pkasting@chromium.org on 24 Apr 2014 at 8:21

@GoogleCodeExporter
Copy link
Author

Not quite ready for review but here's a new layout I hacked up on the plane, 
with server-side syntax highlighting and a table layout.

$ time curl -so /dev/null 
http://localhost:8080/chromium/src/+blame/master/content/renderer/render_view_im
pl.cc
curl -so /dev/null   0.01s user 0.01s system 2% cpu 0.416 total

Full page starts rendering immediately and is finished after maybe a second on 
my MBA.

Original comment by dborowitz@google.com on 28 Apr 2014 at 12:57

Attachments:

@GoogleCodeExporter
Copy link
Author

LGTM with a couple nits. Would it be possible to separate the timestamps from 
the author info, and have all the fields align vertically? It's hard to scan 
them quickly, and thus do quick comparisons, when they run on with the email 
addresses. And can we get rid of the +0000 and just let people assume UTC?

Original comment by mmoss@chromium.org on 28 Apr 2014 at 3:54

@GoogleCodeExporter
Copy link
Author

It's a table, aligning the columns will be no problem :)

For the timezone issue I filed a new bug:
https://code.google.com/p/gitiles/issues/detail?id=48

I don't consider that bug to be blocking this one; if we change the timezone 
format used by absolute timestamps everywhere on the server, blame should pick 
it up automatically.

Original comment by dborowitz@google.com on 28 Apr 2014 at 4:56

@GoogleCodeExporter
Copy link
Author

New screenshot attached.

I'm going to go ahead and submit this so we can get it in a googlesource.com 
release ASAP. Nits on the CSS still welcome, they'll just go in a followup.

Original comment by dborowitz@google.com on 28 Apr 2014 at 6:14

Attachments:

@GoogleCodeExporter
Copy link
Author

Cool, this is a big improvement over today!

My primary suggestion would be to make the commit link be on the hash fragment 
instead of the committer email.  Making the email a link suggests it will be a 
"mailto:" link, whereas making the hash a link suggests clicking it will go to 
that commit.

It might also be the case that this would make more sense ordered as:

pkasting@chomium.org 2014-04-28 12:17:38 8976ab2 [diff] [blame]

...i.e. with the hash moved to the right.  This puts all three links in close 
proximity.  I'm less confident of this suggestion.

Original comment by pkasting@chromium.org on 28 Apr 2014 at 7:19

@GoogleCodeExporter
Copy link
Author

Thanks, agree this looks much better. +1 to Peter's nit re which is the link.

Original comment by jam@chromium.org on 28 Apr 2014 at 7:47

@GoogleCodeExporter
Copy link
Author

I think Peter's onto something with the idea of moving the revision to the 
right of the timestamp but defer to others' opinions.

Original comment by cmp@google.com on 28 Apr 2014 at 7:50

@GoogleCodeExporter
Copy link
Author

FWIW, hard to tell in that screenshot, but the SHA-1 is currently a link as 
well. I will go ahead and unlink the author, and move the SHA-1 to the right. 
This is a minor deviation from the output of "git blame" but makes sense in a 
Gitiles context given the extra links.

Original comment by dborowitz@google.com on 28 Apr 2014 at 7:53

@GoogleCodeExporter
Copy link
Author

This is live in one US datacenter and rolling out to others:
https://us1-mirror-chromium.googlesource.com/chromium/src/+blame/808d10c70ad4a45
3ef1830046ff26e8d3dd68e24/content/renderer/render_view_impl.cc

There are a couple other tweaks in the pipeline 
(https://gerrit-review.googlesource.com/56536) but if it's ok with you guys I'd 
kind of like to close this bug :)

Original comment by dborowitz@google.com on 29 Apr 2014 at 12:31

@GoogleCodeExporter
Copy link
Author

Thanks Dave, all your improvements have fixed the performance issues and the UI 
now is very usable for the scenarios we gave :)

Original comment by jam@chromium.org on 29 Apr 2014 at 12:39

@GoogleCodeExporter
Copy link
Author

Would it be possible to wrap really long lines? For instance, see the lines at 
the end of:
https://chromium.googlesource.com/chromium/src/+blame/36.0.1964.1/DEPS

Not a blocker, and it looks like viewvc doesn't wrap this either 
(http://src.chromium.org/viewvc/chrome/releases/36.0.1964.1/DEPS?annotate=266785
), but would be useful for files like that. Other than that, LGTM.

Original comment by mmoss@chromium.org on 29 Apr 2014 at 4:19

@GoogleCodeExporter
Copy link
Author

@mmoss, wouldn't wrapping a long line at some arbitrary point make the tool 
less useful to see a file's "true contents" ?  Besides ViewVC, what do 'svn 
blame' and 'git blame' do in those cases?

Original comment by cmp@google.com on 29 Apr 2014 at 4:38

@GoogleCodeExporter
Copy link
Author

'git blame' behavior depends on the value of GIT_PAGER. The default doesn't 
wrap, but with no pager, it does wrap (or probably more accurately, the 
terminal wraps). For gitiles, I was thinking it should be like codereview 
side-by-side view, which does wrap and which seems a lot more convenient than 
horizontal scrolling, and it's pretty obvious based on the line-numbering when 
a line is wrapped. Not a big deal either way.

Original comment by mmoss@chromium.org on 29 Apr 2014 at 4:59

@GoogleCodeExporter
Copy link
Author

I'd rather not wrap.  Especially in Blink code, that leads to wrapping a lot, 
and can make reading the code trickier.

Original comment by pkasting@chromium.org on 29 Apr 2014 at 7:32

@GoogleCodeExporter
Copy link
Author

+1 for not wrapping; I would consider a web browser to be more like a pager 
than not.


Original comment by dborowitz@google.com on 29 Apr 2014 at 7:35

@GoogleCodeExporter
Copy link
Author

+1 for not wrapping. "really long lines" is the exception, so no need to 
complicate for such a corner case. As Peter mentioned, Blink code regularly is 
over 100 or 120 chars, so we wouldn't be able to pick a small number which 
would limit its usefulness.

Original comment by jam@chromium.org on 29 Apr 2014 at 7:37

@GoogleCodeExporter
Copy link
Author

Oh, I didn't mean a hard wrap limit, but just letting the browser wrap based on 
the width of the window (table), which I believe is how codereview does it as 
well. But again, not a big deal.

Original comment by mmoss@chromium.org on 29 Apr 2014 at 7:48

@GoogleCodeExporter
Copy link
Author

mmoss closed the corresponding crbug, so I'm closing this.

Original comment by dborowitz@google.com on 30 Apr 2014 at 10:08

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant