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

Bug 351727

Summary: [git] simplify map files updates.
Product: [Eclipse Project] Platform Reporter: Paul Webster <pwebster>
Component: RelengAssignee: Platform-Releng-Inbox <platform-releng-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, aniefer, daniel_megert, gheorghe, john.arthorne, kim.moir, Mike_Wilson, tjwatson
Version: 4.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
patch git-map.sh
none
patch git-submission.sh
none
Update to include both map files none

Description Paul Webster CLA 2011-07-11 11:40:15 EDT
Created attachment 199422 [details]
patch git-map.sh

Once we've spelled out the paths in each repo for git projects in the map file, we can simplify our map file-tagging script.

You need 

1) a root directory that contains all of the repos you want to update map files for.  They should be up to date, have no changes, and have the correct branch already checked out.

2) the full path to your org.eclipse.releng project

3) the URLs for the git repos you want to update.  It translates the URL to a directory by removing the starting path and then the .git from the end of the URL

As it executes, it:

1) tags the last commit on the branch with the UTC time for that commit: v20110707-1523

2a) if the last commit to touch a project is contained by the map file tag, it outputs a status message.

2b) if the last commit to touch a project is not contained by the tag from the map file, it will tag the last project commit with its UTC time, and then generate a 'sed' command on stdout that will update the new tag in the map file.

3) it generates a push-tags command per repo so any tagging done will be pushed.


ex:
git-map.sh \
/opt/pwebster/git/eclipse \
/opt/pwebster/workspaces/gitMigration/org.eclipse.releng \
git://git.eclipse.org/gitroot/platform/eclipse.platform.runtime.git \
git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git >maps.txt
grep -v ^OK maps.txt >run.txt
# inspect what needs to be done, then
/bin/bash run.txt
Comment 1 Paul Webster CLA 2011-07-11 12:47:51 EDT
Created attachment 199430 [details]
patch git-submission.sh

Update the script to generate releng updates, based on the same setup as used by git-map.sh

You need:

1) a root directory that contains all of the repos you want report a build submission for.

2) the URLs for the specific git repos you want to report.  It translates the URL to a directory by removing the starting path and then the .git from the end of the URL

3) for each URL, the last build tag and the current build tag.

It will output the bug number + title for any commit with a comment that has Bug #### or bug ####.  It will also output the list of projects touched by the new commits for this build.

ex:
git-submission.sh \
/opt/pwebster/git/eclipse \
git://git.eclipse.org/gitroot/platform/eclipse.platform.runtime.git  \
v20110620 v20110707-1523 \
git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git \
I20110628-0800 v20110705-2054

Output:
The build contains the following changes:
+ Bug 287841 - [RCP] Move org.eclipse.ui.update.findAndInstallUpdates command definition from IDE to update UI (FIXED)
+ Bug 295622 - Job not threadsafe (FIXED)
+ Bug 312136 - Incorrect @GuardedBy comments (FIXED)
+ Bug 350377 - [Browser] Default browser detection should use environment variables (FIXED)

The following projects have changed:
com.google.code.atinject.tck
org.eclipse.core.jobs
org.eclipse.e4.core.contexts
org.eclipse.e4.core.di
org.eclipse.e4.core.di.extensions
org.eclipse.e4.core.services
org.eclipse.e4.core.tests
org.eclipse.e4.core.tests.services
org.eclipse.ui.browser
org.eclipse.ui.ide
Comment 2 Paul Webster CLA 2011-07-14 15:29:27 EDT
Created attachment 199699 [details]
Update to include both map files

At the end of git-map.sh it will output a useful line to then run the git-submission.sh script.  ex:

git-submission.sh /opt/pwebster/git/R42  git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git v20110712-1859 v20110714-1639 > report.txt

PW
Comment 3 Paul Webster CLA 2011-07-21 13:39:44 EDT
OLD_TAG=$( git log -1 --pretty=oneline --decorate | grep "[ (][vI][0-9]" \
| head -1 | sed 's/^[^(]* (.*\([vI][0-9][0-9][0-9][0-9]\)/\1/g'   | sed 's/[,)].*$//g' ) 

Need to update the git-map.sh file to calculate a better OLD_TAG

PW
Comment 4 Alexander Kurtakov CLA 2016-12-05 07:43:59 EST
map files are no longer used. Git submodules are in charge now.