Bug 351818 - Modify GitFetchFactory so it takes a repoTag as well
Summary: Modify GitFetchFactory so it takes a repoTag as well
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 0.10.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 351819
  Show dependency tree
 
Reported: 2011-07-12 07:23 EDT by Paul Webster CLA
Modified: 2012-06-01 09:40 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2011-07-12 07:23:06 EDT
Right now, the GitFetchFactory works with map files similar to our regular map files.  It consumes entries like:

plugin@org.eclipse.ui.ide=GIT,tag=v20110705-2054,repo=git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git,path=bundles/org.eclipse.ui.ide

In our current map files, tag=v20110705-2054 is both the tag in the repo to check out and the qualifier built into the bundle.

I'd like to propose we allow them to be split apart.  My suggestion is we allow a repoTag=v20110705-2054, that would be used to checkout the working directory from the git repo and the "tag" attribute can still be used for qualifier generation.

Then we could use the repoTag in the Eclipse-SourceReferences header.

PW
Comment 1 Gunnar Wagenknecht CLA 2011-07-18 12:31:14 EDT
That does sound inconsistent with other factories. For example, CVS uses "tag" as the tag to check out. The qualifier is just inherited from the tag. It can be overridden at build time.


But I wonder if you are looking for something like

plugin@org.eclipse.ui.ide=GIT,
  repo=git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git,
  path=bundles/org.eclipse.ui.ide,
  ref=heads/master,
  qualifier=GENERATE_BASED_ON_LAST_COMMIT_TIMESTAMP

The "ref" specifies the reference to check-out (can be a tag or a branch).

The "qualifier" specifies the strategy for calculating the qualifier. Possible strategies are (IMHO):
  * generate base on commit hash
  * generate base on commit time stamp
  * use branch/tag name from ref as specified
Comment 2 Paul Webster CLA 2012-06-01 09:40:19 EDT
Digging into the PDE builder code, "tag" is used for the qualifier and checkout tag.  The fetch factory has control of the checkout, but not of the qualifier (for which PDE build will use "tag").

I think something like:

...,tag=v20120530-1505,buildInput=I20120530-1900,...

would be consistent with how PDE build expects to process things.  Then the git Fetch factory can pass "tag" through the system correct, and can derive or find buildTag and use that during its own fetch script generation.

PW