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

Bug 343320

Summary: Releng tool review page
Product: [Technology] EGit Reporter: Andrew Niefer <aniefer>
Component: RelengAssignee: Project Inbox <egit.releng-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, gunnar, john.arthorne, kim.moir, markus.kell.r, pwebster, remy.suen, tomasz.zarna
Version: 0.12   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
URL: http://egit.eclipse.org/r/#change,4180
Whiteboard:
Bug Depends on:    
Bug Blocks: 328745    
Attachments:
Description Flags
Screenshot of 'Changed Projects' page
none
patch to add ProjectComparePage
none
patch v2 none

Description Andrew Niefer CLA 2011-04-19 18:12:38 EDT
For the releng tool we should add a page to review the list of commits that we are releasing.

General idea is for each project, get a list of commits using Git#log with a range from the previous tag to the most recent commit.

The page would be a list of changed IProjects, and below a list of the commits for the selected IProject in the list.

There is a CommitGraphTable class that could perhaps show the commit list?

I'm hoping someone with more UI experience than me could get this started.
Comment 1 Remy Suen CLA 2011-08-12 13:25:14 EDT
(In reply to comment #0)
> The page would be a list of changed IProjects, and below a list of the commits
> for the selected IProject in the list.

Does it make sense to restrict it to a list of projects? There may be other files that aren't in a project in the list of commits (like the recent .gitignore poking that we've done).
Comment 2 Andrew Niefer CLA 2011-08-12 13:31:15 EDT
The point of the release tool is to tag and update the map files.  Since these are consumed by the build process which in turn works at the project level, I'm not sure these extra commits are interesting in general.

But, the Git history view has buttons to filter the commit list based on the current selection, the parent, or the entire repo.  Perhaps this would be useful here, by default the list is filtered on the project list, and the user can change to view all the commits.
Comment 3 Dani Megert CLA 2011-08-15 08:17:06 EDT
Isn't what you want tho show the same (or at least similar) to the page you get in the Releng tool when you use Team > Release... and check 'Only release projects that changed since the last release' (see attached screenshot)?
Comment 4 Dani Megert CLA 2011-08-15 08:18:19 EDT
Created attachment 201491 [details]
Screenshot of 'Changed Projects' page
Comment 5 Andrew Niefer CLA 2011-08-15 15:37:10 EDT
(In reply to comment #3)
> Isn't what you want tho show the same (or at least similar) to the page you get
> in the Releng tool when you use Team > Release... and check 'Only release
> projects that changed since the last release' (see attached screenshot)?

Yes this is what we want, The changeset view might be more natural for git.  I thought it might be less work to just reuse the history view, but if we can use the existing ProjectComparePage, that would be good.  I don't know how much of that is CVS specific.   egit.ui does have a ISynchronizeParticipant implementation GitModelSynchronizeParticipant if that helps.
Comment 6 Dani Megert CLA 2011-08-17 05:16:47 EDT
(In reply to comment #5)
> (In reply to comment #3)
> > Isn't what you want tho show the same (or at least similar) to the page you get
> > in the Releng tool when you use Team > Release... and check 'Only release
> > projects that changed since the last release' (see attached screenshot)?
> 
> Yes this is what we want, The changeset view might be more natural for git. 
The view can be toggled on that page. Not sure whether it is easier to implement in Git but in CVS there are currently problems with the change set view but those are inside the CVS implementation, see e.g. bug 84866.
 
> I thought it might be less work to just reuse the history view, but if we can 
> use the existing ProjectComparePage, that would be good.  I don't know how 
> much of that is CVS specific.   egit.ui does have a ISynchronizeParticipant
> implementation GitModelSynchronizeParticipant if that helps.
It depends on two things:
- does the releng page only use APIs and not internal code
- does EGit implement the releveant Team APIs.

Having it in the 'ProjectComparePage' allows to combine CVS and Git, so that one can the the release in one go.
Comment 7 Andrew Niefer CLA 2011-08-18 16:25:19 EDT
Created attachment 201747 [details]
patch to add ProjectComparePage

Here is the first attempt I made at this, it is the ProjectComparePage copied from org.eclipse.releng.tools and modified for Git.

I can't say much for it other than there are no compile errors.  Currently, it results in an NPE because the page is being created before the wizard has any projects set on it
Comment 8 Dani Megert CLA 2011-08-19 02:50:00 EDT
I'll look into it when I'm fully up to speed with Git. I hope this is by end of next week.
Comment 9 Andrew Niefer CLA 2011-08-19 16:03:52 EDT
Created attachment 201835 [details]
patch v2

Patch v2.

With this patch we manage to actually collect some synchronization data which seems correct. (PatchComparePage#getOutOfSyncProjects).  The only problem is that the view when it comes up shows no changes.
Comment 10 Tomasz Zarna CLA 2011-08-29 09:03:51 EDT
The view is empty, because according to the synchronization scope[1] all the changes founded by the subscriber are out of scope[2]. The problem here is that the scope manager is initially created[3] with an empty resource mapping. It should be either updated before trying to collect the changes -- PatchComparePage.getOutOfSyncProjects, or if that's not possible we should consider using a different subscriber which allows that.

btw, EGit's focal point for sync'ing is GitModelSynchronize.launch(GitSynchronizeDataSet, IResource[]), but it doesn't seem to fit into our wizard.

[1] org.eclipse.team.core.mapping.ISynchronizationScope
[2] org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler.isInScope(IResource)
[3] org.eclipse.egit.internal.relengtools.ProjectComparePage.createSynchronizeParticipant()
Comment 11 Dani Megert CLA 2011-08-29 10:38:04 EDT
>(In reply to comment #10)
Thanks Tomasz for the update.


Just now I realized that we talk about a separate Releng tool and not about the Platform's existing Releng tool. Wouldn't it make sense to make the Platform Releng tool aware of Git as outlined in bug 345668?
Comment 12 John Arthorne CLA 2011-08-29 10:47:32 EDT
(In reply to comment #11)
> Just now I realized that we talk about a separate Releng tool and not about the
> Platform's existing Releng tool. Wouldn't it make sense to make the Platform
> Releng tool aware of Git as outlined in bug 345668?

Our releng tool was forked to add Git support, because we didn't want a dependency on EGit/JGit in our platform releng tool at that time. I agree we can bring these changes back into our platform releng tool now. To keep things simpler, I don't think we need to support releasing to a mixture of CVS and Git projects in a single wizard. We could easily have "Release to Git" and "Release to CVS" as separate wizards, which would also make it easier to phase out the CVS dependency later when we no longer need it.
Comment 13 Tomasz Zarna CLA 2011-09-02 09:14:59 EDT
(In reply to comment #9)
> With this patch we manage to actually collect some synchronization data which
> seems correct. (PatchComparePage#getOutOfSyncProjects).

Unfortunately, fwics, this is true only for projects which have changes in their working dirs. If they are clean (nothing to commit) the method returns an empty array which is different from the result of running git-map.sh against the same set of projects. The script tags projects correctly.

I will start from fixing the above, then will have a closer look at the sync participant used in the wizard page.
Comment 14 Tomasz Zarna CLA 2011-09-07 11:45:18 EDT
Pushed an updated version of Andrew's latest patch as http://egit.eclipse.org/r/#change,4180. The sync participant seems to display meaningful data now. Haven't checked what happens beyond that page.

Missing bits:
* you still need to do "Ctrl + 3, Release" to open the wizard
* selected map is not remembered
* move the code back to Platform/Releng (comment 12)

If you don't mind I will open separate bugs for these. I think I will start from the last one.

Any comments are welcome, either here or on http://egit.eclipse.org/r/#change,4180.
Comment 15 Tomasz Zarna CLA 2011-09-08 07:02:38 EDT
(In reply to comment #14)
> * move the code back to Platform/Releng (comment 12)

I think this can be done within bug 345668.
Comment 16 Tomasz Zarna CLA 2011-09-08 07:26:35 EDT
(In reply to comment #14)
> * selected map is not remembered

It's bug 357061.
Comment 17 Tomasz Zarna CLA 2011-11-17 12:20:14 EST
I don't plan to work on this, see the last comment on bug 345668 and bug 328745, comment 22.
Comment 18 Tomasz Zarna CLA 2013-03-20 06:40:15 EDT
See bug 328745, comment 24.