Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Subversive » Subversive - pde.build: best practices?(Looking for a way to switch between N and I builds)
Subversive - pde.build: best practices? [message #510400] Wed, 27 January 2010 12:50 Go to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Hi,

I'm trying to migrate a non-trivial build to using the
org.eclipse.team.svn.pde.build plugin.

The one thing I couldn't yet figure out is qualifier
replacement in version numbers.

Until now I always built my plugins from trunk and let
pde.build substitute the qualifier in all version numbers
by the current date. So my first attempt was to specify
"trunk" as the "tag" element in each map-entry, like

feature@my.feature=SVN,url=http://my.server/svnroot,tag=trunk,path=path/to/my/feature


However, this causes qualifier substitution to insert
the string "trunk" into all version numbers like

1.2.3.v_qualifier -> 1.2.3.v_trunk


After debugging I found this intermediate solution:

feature@my.feature=SVN,url=http://my.server/svnroot/trunk,path=path/to/my/feature


Note: no "tag" specified. Now substitution works:

1.2.3.v_qualifier -> 1.2.3.v_201001271200


This is fine, but doesn't support working with explicit
tags any more. I.e., now I'm looking for a way to easily
switch between nightly builds and integration builds:

nightly builds

  • check out from "trunk"
  • use date as qualifier

integration builds

  • check out from "tags/builds/MYBUILDTAG"
  • use "MYBUILDTAG" as qualifier


I didn't find a pattern that easily supports both kinds
of builds. Preferably I would just change the "fetchTag"
property to switch between N and I builds.

Option 1
If I include /trunk in the url I cannot append a tag,
i.e., specifying

fetchTag=SVN=tag/builds/MYBUILDTAG


would create paths like

/svnroot/trunk/tags/builds/MYMBUILDTAG/path/to/my/feature


I can't get rid of the "trunk" segment.
Option 2
If I omit "trunk" from the url, I have to specify it as
the "tag" and cannot use the date as qualifier substitution.


IMHO, the plugin should be smarter in interpreting "trunk".
E.g., if not specifying a tag would implicitly insert "trunk"
I could write a tag-less map.file ready for nightlies
and specify a "fetchTag" property for integration builds.
Remaining problem: the fetchTag would need to be a
path, of which only the last segment is the build qualifier.
(This has been discussed in https://bugs.eclipse.org/273230)

Alternatively, if the map file contains specific tags, to be
updated explicitly for each I build, then I'd like to use

fetchTag=SVN=trunk


for nightlies and expect that this creates a path containing
trunk, but still uses the date as the qualifier.
(also this solution requires the tag for I builds to be
a multi-segment path, which it can't currently).

Finally, I saw in the code some mentioning of "tagPath".
Did someone start splitting the tag into a path prefix
and the final actual tag?

Is there a best practice of repository layout plus
map file content plus usage of fetchTag? Otherwise
I would open a bug describing one possible strategy.

thanks,
Stephan
Re: Subversive - pde.build: best practices? [message #510548 is a reply to message #510400] Wed, 27 January 2010 19:24 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
I created https://bugs.eclipse.org/301045 providing a tiny
little patch against org.eclipse.team.svn.pde.build. This patch improves the
handling of "trunk" values so that I can now do the following:

My map file has entries like this
feature@org.objectteams.otequinox=SVN,url=http://svn.objectteams.org/ot,path=deployment/OTEquinoxFeature,tag=tags/builds/201001271930


Note that the tag includes a path deeply into the tags folder. Contrary to
my previous statement the plugin correctly handles the path for checkout
(using the full path) and qualifier substitution (using the last segment only).

What's new is the option to say in a property file

fetchTag=SVN=trunk


which I'll now use for nightly builds. The trick is, that "trunk" is now interpreted as

  • substitute all of the tag value with "trunk"
  • do not set an explicit tag for qualifier replacement thus letting
    pdebuild use that date instead.


Additionally, not specifying a tag at all automatically expands to "trunk".
I currently use this for tests that shall always use that latest version.

Viola, just by switching the fetchTag property I can now select
between I and N builds as desired, I builds use frozen versions from
the map file and N builds simply use the latest sources.
Re: Subversive - pde.build: best practices? [message #510943 is a reply to message #510548] Fri, 29 January 2010 09:21 Go to previous message
Igor Burilo is currently offline Igor BuriloFriend
Messages: 435
Registered: July 2009
Senior Member
Hello Stephan,

We'll process corresponding task on tracker according to our priorities.
Thanks.

>I created https://bugs.eclipse.org/301045 providing a tiny
> little patch against org.eclipse.team.svn.pde.build. This patch improves
> the
> handling of "trunk" values so that I can now do the following:
>
> My map file has entries like this
> feature@org.objectteams.otequinox=SVN,url= http://svn.objectteams.org/ot,path=deployment/OTEquinoxFeatu re,tag=tags/builds/201001271930
>
> Note that the tag includes a path deeply into the tags folder. Contrary to
> my previous statement the plugin correctly handles the path for checkout
> (using the full path) and qualifier substitution (using the last segment
> only).
>
> What's new is the option to say in a property file
>
> fetchTag=SVN=trunk
>
> which I'll now use for nightly builds. The trick is, that "trunk" is now
> interpreted as
>
> substitute all of the tag value with "trunk"
> do not set an explicit tag for qualifier replacement thus letting
> pdebuild use that date instead.
>
>
> Additionally, not specifying a tag at all automatically expands to
> "trunk".
> I currently use this for tests that shall always use that latest version.
>
> Viola, just by switching the fetchTag property I can now select
> between I and N builds as desired, I builds use frozen versions from
> the map file and N builds simply use the latest sources.
Previous Topic:svn ignore via subversive option grayed out
Next Topic:Error installing SVN: "unpack facility not configured" !?!
Goto Forum:
  


Current Time: Thu Apr 25 10:15:39 GMT 2024

Powered by FUDForum. Page generated in 0.03677 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top