Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345980 - [Client] Git log: Make git log consumable by git status page.
Summary: [Client] Git log: Make git log consumable by git status page.
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Malgorzata Janczarska CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 345981 (view as bug list)
Depends on: 348551
Blocks: 345978 345981
  Show dependency tree
 
Reported: 2011-05-16 12:30 EDT by libing wang CLA
Modified: 2011-09-01 11:43 EDT (History)
1 user (show)

See Also:
Szymon.Brandys: review+


Attachments
small changes to explorer (2.87 KB, patch)
2011-06-07 08:36 EDT, Malgorzata Janczarska CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description libing wang CLA 2011-05-16 12:30:02 EDT
Please refer to bug 345978
Comment 1 Szymon Brandys CLA 2011-06-06 10:18:43 EDT
I thought bug 345978 was deferred. I'll check tomorrow how much time is
needed to fix bug 345980 and bug 345981 and let you know.
Comment 2 Szymon Brandys CLA 2011-06-07 03:32:38 EDT
Gosia has cycles to look at it.
Comment 3 Malgorzata Janczarska CLA 2011-06-07 08:36:52 EDT
Created attachment 197491 [details]
small changes to explorer

If you don't need a git log view with its actions this functionality for very close to be working, only minor changes included in the attachment are necessary to made.

This is what you should do to make it work

1. Add a parent div to your page (I assume its id is "parentID")
2. Add git.css to your style sheet (this will require adding line "@import "css/git.css";" to git-status.css)
3. Import 'orion/git/git-commit-navigator' (I assume it's defined as "mGitCommitNavigator")
4. Create navigator:

		var navigator = new mGitCommitNavigator.GitCommitNavigator(serviceRegistry, null, null, "parentID");	
		
	All you need here is service registry
5. Populate your navigator with data.
	Assuming you have your a Branch json defined as "Branch" it should be enough to call:
	
		navigator.loadCommitsList(Branch.CommitLocation + "?page=1");
		
	You can call it whenever you need to change the commit list.
	As you see the commit list is pageable, but the page size is fixed. I will have to file another bug to change the page size, because our default page size may be too large for your needs.
	
	Calling above won't mark you the incoming/outgoing changes. To do this you have to call
	
	navigator.renderer.setOutgoingCommits(CommitsInJsonData); or navigator.renderer.setIncomingCommits(CommitsInJsonData);
	
	_before_ you call loadCommitsList. To get the commit list you can use gitService.getLog function, for instance full code to display git log with outgoing changes marked would be:
	
	gitService.getLog(Remote.CommitLocation, "HEAD", function(scopedCommitsJsonData, secondArg) {
              navigator.renderer.setOutgoingCommits(scopedCommitsJsonData);
              navigator.loadCommitsList(Branch.CommitLocation + "?page=1");
       });
       
      where Remote is the json representation of the Remote assigned to this branch. To obtain it you may refer to Branch.RemoteLocation.
      Marking incoming changes will be described wider in Bug 345981.
Comment 4 libing wang CLA 2011-06-07 09:25:40 EDT
Gosia/Szymon :thanks for the detailed guidance.
Seems promising. I will give it a try .
I also opened Bug 348558 to get the RemoteLocation from git status response.
Comment 5 Malgorzata Janczarska CLA 2011-06-07 10:56:44 EDT
I've pushed the changes. Libing if you have problems with it reopen.
Comment 6 Malgorzata Janczarska CLA 2011-06-07 10:57:43 EDT
*** Bug 345981 has been marked as a duplicate of this bug. ***