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

Bug 328745

Summary: Need an equivalent releng tool for git
Product: [Technology] EGit Reporter: Paul Webster <pwebster>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: VERIFIED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, bluesoldier, caniszczyk, daniel_megert, david_williams, dj.houghton, gunnar, irbull, john.arthorne, kim.moir, mkempka, ob1.eclipse, thatnitind, tomasz.zarna
Version: 0.10.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 343320, 357061    
Bug Blocks: 345668    
Attachments:
Description Flags
Skeletal EGit release wizard
none
Skeletal EGit release wizard v03 none

Description Paul Webster CLA 2010-10-26 13:23:43 EDT
Bug 289838 has provide a git fetch-factory, and we've got 2 bash scripts that can update a map file: See http://wiki.eclipse.org/E4/Git

This is for the work to provide a releng tool that works with EGit.

PW
Comment 1 Chris Aniszczyk CLA 2010-10-26 15:11:58 EDT
In the egit-pde repo, we have a org.eclipse.egit.relengtools plug-in that functionality can be added to. At the moment, Gunnar only had some code there to handle updating copyrights.
Comment 2 Paul Webster CLA 2010-10-26 15:19:19 EDT
Created attachment 181762 [details]
Skeletal EGit release wizard

This is a skeletal releng tool.  It supports picking a map project, selecting map file entries/projects to update, and replacing lines in the mapfile with the new tag entry.

Equvalent EGit or JGit steps that I need before I can finish the algorithm (based on bash files):

1) find the git repo for a project

2) git tag $BUILD_TAG :tag the repo with the tag

3) git rev-list HEAD -- <project> :to get the last commit that effected that project

4) git tag --contains $LAST_COMMIT :to get the list of tags that contain the commit

5) git log  ${LATEST_SUBMISSION}..${BUILD_TAG} :so I can scan for bug numbers for the build notes.

PW
Comment 3 Paul Webster CLA 2010-10-26 15:35:20 EDT
Created attachment 181771 [details]
Skeletal EGit release wizard v03

Same as the last patch, but includes the Build Notes page and the operation (that currently does nothing).

PW
Comment 4 Paul Webster CLA 2010-10-29 13:57:14 EDT
Pushed first change: http://egit.eclipse.org/r/#change,1826

Running CTRL+3 Show Info with org.eclipse.e4.core.deeplink and org.eclipse.e4.core.deeplink.handler will show the failures in the algorighm I have coded so far.

repo under test:
git://git.eclipse.org/gitroot/e4/org.eclipse.e4.deeplink.git

All of the relevent code is in org.eclipse.egit.relengtools/src/org/eclipse/egit/relengtools/internal/ShowInfoHandler.java in runTest().

PW
Comment 5 Paul Webster CLA 2010-11-10 11:30:31 EST
(In reply to comment #4)
> Pushed first change: http://egit.eclipse.org/r/#change,1826

I still can't get the jGit API to work correctly (as per the test handler).  Chris, any luck?

PW
Comment 6 Paul Webster CLA 2010-11-22 12:33:09 EST
I still can't get the JGit algorithms described in http://egit.eclipse.org/r/#patch,sidebyside,1826,2,org.eclipse.egit.relengtools/src/org/eclipse/egit/relengtools/internal/ShowInfoHandler.java to work correctly.

Both of these still don't work:
3) git rev-list HEAD -- <project> :to get the last commit that effected that
project

4) git tag --contains $LAST_COMMIT :to get the list of tags that contain the
commit


PW
Comment 7 Gunnar Wagenknecht CLA 2010-11-23 03:03:07 EST
Are you still trying to find out if the qualifier needs to be increased?
Comment 8 Paul Webster CLA 2010-11-23 06:51:50 EST
(In reply to comment #7)
> Are you still trying to find out if the qualifier needs to be increased?

Yes, those are the steps I need to find a way to do with jgit, so I can determine if a bundles tag needs increasing.

PW
Comment 9 Paul Webster CLA 2011-01-18 07:43:05 EST
I still can't get the algorithm described in 
http://egit.eclipse.org/r/#patch,sidebyside,1826,2,org.eclipse.egit.relengtools/src/org/eclipse/egit/relengtools/internal/ShowInfoHandler.java
to work correctly.

PW
Comment 10 Paul Webster CLA 2011-02-10 10:47:37 EST
(In reply to comment #6)
> Both of these still don't work:
> 3) git rev-list HEAD -- <project> :to get the last commit that effected that
> project
> 
> 4) git tag --contains $LAST_COMMIT :to get the list of tags that contain the
> commit


We still need those 2 pieces to get moving on this.  Alternatively, someone could look at the code mentioned in comment #9 and suggest a better way (any way that worked would be better :)

PW
Comment 11 Chris Aniszczyk CLA 2011-03-02 11:32:28 EST
Your tests now pass in ShowInfoHandler Paul, sorry for the wait.

Can you please clean things up and get what you need so you can drop the shell scripts when you release?

I'd like to get this in for 0.12
Comment 12 Chris Aniszczyk CLA 2011-03-02 11:32:40 EST
http://egit.eclipse.org/r/#change,1826
Comment 13 Paul Webster CLA 2011-03-02 11:40:21 EST
(In reply to comment #11)
> Can you please clean things up and get what you need so you can drop the shell
> scripts when you release?

I'll try and get to it this week.

PW
Comment 14 Andrew Niefer CLA 2011-04-19 15:04:03 EDT
I made two changes that are in http://egit.eclipse.org/r/#change,3167

The first change is to  MapEntry/MapFile to do a better job ignoring non-GIT map entries since we don't know how to parse them in general.

The second change is to GetBugsOperation to get the bug numbers associated with each commit since the last tag.


I may have screwed up my branching and push to gerrit, not sure if the changeset will need to be abdandoned and resubmitted.
Comment 15 Paul Webster CLA 2011-04-19 15:57:59 EDT
(In reply to comment #14)
> I made two changes that are in http://egit.eclipse.org/r/#change,3167

Thanx Andrew.

Chris, does that mean that none of the other Patch1 changes were merged in from Patch2 ?

PW
Comment 16 Chris Aniszczyk CLA 2011-04-19 15:59:25 EDT
They were both rebased and combined into one commit.

They should be merged in.
Comment 17 Andrew Niefer CLA 2011-04-19 18:14:46 EDT
Missing pieces are
1) Reviewing the list of changes, see bug 343320
2) Actually tagging the projects
3) Reviewing the map file change, and commiting that change.
Comment 18 Andrew Niefer CLA 2011-04-21 15:19:12 EDT
I pushed a few more changes to gerrit.

Added a page to compare and review the map file changes.  Also code to do the actual tag.

This came through as 3 change sets
http://egit.eclipse.org/r/3205
http://egit.eclipse.org/r/3206
http://egit.eclipse.org/r/3207

I had hoped it would just all be consolidated into one.
Comment 19 Andrew Niefer CLA 2011-04-21 16:56:39 EDT
(In reply to comment #18)
> I pushed a few more changes to gerrit.
> 
> Added a page to compare and review the map file changes.  Also code to do the
> actual tag.
> 
> This came through as 3 change sets
> http://egit.eclipse.org/r/3205
> http://egit.eclipse.org/r/3206
> http://egit.eclipse.org/r/3207
> 
> I had hoped it would just all be consolidated into one.

Ok, I think I managed to squash all three of these together into
http://egit.eclipse.org/r/#change,3205
Comment 20 Chris Aniszczyk CLA 2011-04-24 15:10:18 EDT
(In reply to comment #19) 
> Ok, I think I managed to squash all three of these together into
> http://egit.eclipse.org/r/#change,3205

I separated your three changesets into one.

Please abandon 3205.
Comment 21 John Arthorne CLA 2011-07-26 10:54:17 EDT
Is there anywhere I can download the current org.eclipse.egit.relengtools plugin from? I tried this site:

http://www.eclipse.org/external/egit/pde/updates-nightly/

But it seems to contain only the .10 version from last year. I found the source code for 0.12 in your git repository but consumers having to build this manually isn't optimal.
Comment 22 Tomasz Zarna CLA 2011-11-10 06:18:13 EST
Bug 345668 in Platform/Releng for modifying the tool to work with git has been marked as WONTFIX. See the last comment there for the rationale. Does it mean this one can be closed as well?

Please note that we still need to update Copyright Checker (bug 345669). I'm not sure if it was meant to be a part of this bug.
Comment 23 Tomasz Zarna CLA 2013-03-19 15:03:27 EDT
(In reply to comment #22)
> Does it mean this one can be closed as well?

Guys? Anyone interested in having this fixed?
Comment 24 John Arthorne CLA 2013-03-19 16:24:40 EDT
I can't speak for other projects but Eclipse platform no longer uses map files so we don't need this. In practice we replaced such a tool long ago with automated tagging scripts.
Comment 25 Tomasz Zarna CLA 2013-03-20 06:38:16 EDT
See John's comment above.