Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 374144

Summary: git log gets 50 (page items) console errors when switching between remote and local
Product: [ECD] Orion Reporter: Susan McCourt <susan>
Component: GitAssignee: Project Inbox <orion.git-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: malgorzata.tomczyk, Szymon.Brandys
Version: 0.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch that comments out updateCommands none

Description Susan McCourt CLA 2012-03-13 16:52:42 EDT
I noticed today that if I have git log open on my local master branch, and then choose "switch to remote" I get 50 console errors.

Otherwise it seems to work.

The console errors indicate that an explorer tried to render the log when there was no "action scope id" specified for the contribution. This is resulting from the changes from bug 370014.  I would have thought I'd seen the problem before now, though, so something else might have changed.

I debugged enough to see that the explorer has an action scope id (as expected) but its renderer does not.  Something funny is going on, it's possible that the old tree is rendering in addition to the new one?

Observed on today's build, orion.eclipse.org

I can look into this.
Comment 1 Susan McCourt CLA 2012-03-14 15:49:39 EDT
I traced this a bit, enough to determine that there is definitely unnecessary rendering of commands going on.  I commented out line 281 (navigator.updateCommands()) in git-log.js and the problem is corrected.  

AFAICT, initTitleBar is only called by loadResource.  And loadResource will load/render a new commits list.  So I don't think updating item level commands in initTitleBar (updating actions in the old commits list) makes sense.

When debugging this, it seemed that when updateCommands was called, the navigator no longer had the GitCommitRenderer but instead had a default explorer renderer.  So it didn't know what item level scope id to render, hence all the console errors.

Maybe just removing the call to updateCommands is good enough, but I didn't trust that I understand the code enough.  There may be more additional extra work going on that could be optimized....
Comment 2 Susan McCourt CLA 2012-03-15 15:20:27 EDT
Created attachment 212748 [details]
patch that comments out updateCommands
Comment 3 John Arthorne CLA 2015-05-05 15:47:55 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html
Comment 4 John Arthorne CLA 2015-05-05 16:01:20 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:


https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html