Skip to main content
Jump to: navigation, search


< E4
Revision as of 17:01, 12 August 2011 by (Talk | contribs) (Submitting for a build)

For working in git lately I've been using the latest eGit. Functionality has been increasing week over week, so I just use their latest nightly:

Some resources:

Git in e4

We have a place in e4 for git repositories.

Current Repos

A repo then follows our standard subdir convention:

  • bundles
  • features
  • examples
  • tests

When creating a repo on the server, follow these steps (Please update them if there are better steps :-)

  1. log into
  2. cd /gitroot/e4
  3. mkdir # ex: mkdir
  4. cd
  5. git init --bare

This creates a bare repo that can be cloned. Then on your work machine

  1. git clone ssh://
  2. cd
  3. mkdir bundles features examples tests
  4. add a useful .gitignore. See below
  5. copy in your plugins into bundles, features into features, test plugins into tests, etc
  6. add all of your files: git add -A
  7. commit them with a useful commit message
  8. add 2 tags. One will be initial-import. The other should be a time tag, like v20101124-0800
  9. I split the next step up into 2:
    1. git push origin master
    2. git push --tags origin

Example .gitignore


We build our git repos still using map files, checked into CVS in the /cvsroot/eclipse e4/releng module. You can generate a default map file for your initial commit from your repo root using ex:

/bin/bash git:// v20101124-0800 bundles tests features

Submitting for a build

Note: We have a policy that all commits have the associated bug number. Usually our format is: "Bug <number> - <bug title>" and then any specific comments after the title or on the next line. It's important that we only list 1 bug # per line, and at the beginning of the line. A line with "bug #" or "Bug #" without the title is also acceptable.

We have 2 scripts used for submitting for the build. One to update the map files, and one to generate the submission report for our mailing list is used to update the map files.The output is a set of commands which should be captured, reviewed and then executed to update the map files. is used to generate a build submission report. The last command output by will be a call to saving the output to "report.txt".

When submitting for a build, the git repository clones should be checked out on the branch you wish to tag.

The takes the following arguments: repoRoot relengRoot repoUrl [repoUrl]*
  • repoRoot: an absolute path to a folder containing cloned git repositories
  • relengRoot: an absolute path to the releng project containing the map files
  • repoUrl - git repository URLs to tag

The script performs the following steps:

  1. Find all the map files under relengRoot
  2. For each map file, find all entries containing "repo=repoUrl" where repoUrl is one of the passed in git repositories
  3. For each git map file entry, find the corresponding project under the git repository clone under repoRoot.
  4. Check if the last commit in the project has the current tag from the map file, if not tag and output a command to update the map file

For example, consider a git repository git:// If repoRoot=/eclipse/git then the script expects a subfolder /eclipse/git/org.eclipse.e4.deeplink which is a clone of this repository.  The releng map files are under /eclipse/workspace/e4-releng.  The command line to invoke would be:

repoRoot: /eclipse/git 
          /eclipse/git/org.eclipse.e4.deeplink  #deeplink clone
          /eclipse/git/    #search clone

relengRoot: /eclipse/workspace/e4-releng        #project containing map files

/bin/bash /eclipse/git \
                     /eclipse/workspace/e4-releng \
                     git:// \
                     git:// > maps.txt   

more maps.txt                                       #examine maps.txt
grep -v ^OK maps.txt | grep -v ^Executed > run.txt  #filter out status lines to create a runnable script
/bin/bash run.txt                                   #run the commands, the last command is a call to
more report.txt                                     #examine submission report

The script does not commit the map file changes. The map files should be reviewed and manually commited.

Back to the top