Skip to main content



      Home
Home » Archived » Buckminster » VersionConverter to select component from CVS at a specific date
VersionConverter to select component from CVS at a specific date [message #381668] Wed, 14 January 2009 06:58 Go to next message
Eclipse UserFriend
Hi!

I'm using the nebula cdatetime widget in a project and would like to specify
the version which has to be used. As the project does not have any branches
or tags set, I would like to use a date as a version. Therefore I came up
with the following RMAP snippet:

<searchPath name="eclipse_technology_nebula_cdatetime">
<provider
readerType="cvs"
componentTypes="eclipse.feature,osgi.bundle,buckminster"
source="true">
<uri
format=":pserver:anonymous@dev.eclipse.org :/cvsroot/technology,org.eclipse.swt.nebula/org.eclipse.nebu la.widgets.cdatetime ">
</uri>
<versionConverter
type="tag" versionType="String">
<transform
fromPattern=".*"
toPattern="2009.01.01.00.00.00"
fromReplacement=".*"
toReplacement="0.0.0"/>
</versionConverter>
</provider>
</searchPath>

Unfortunately, buckminster does not resolve the component as soon as I add
the versionConverter. One thing I noticed is the following statement on the
Component Query 1.0 specification page, which could be the cause for my
problems:

The information in these two attributes must exactly reverse the
transformation specified in the fromReplacement/fromPattern attributes. The
Buckminster framework enforces this requirement.

Unfortunately I do not see a way to transform the string back to its
original form in this case.

Can someone please help me with this issue?

Cheers,
Florian
--
DI Florian Hackenberger
florian@hackenberger.at
www.hackenberger.at
Re: VersionConverter to select component from CVS at a specific date [message #381671 is a reply to message #381668] Wed, 14 January 2009 12:42 Go to previous messageGo to next message
Eclipse UserFriend
Hi Florian,
What does your tags look like?

Regards,
Thomas Hallgren

DI Florian Hackenberger wrote:
> Hi!
>
> I'm using the nebula cdatetime widget in a project and would like to specify
> the version which has to be used. As the project does not have any branches
> or tags set, I would like to use a date as a version. Therefore I came up
> with the following RMAP snippet:
>
> <searchPath name="eclipse_technology_nebula_cdatetime">
> <provider
> readerType="cvs"
> componentTypes="eclipse.feature,osgi.bundle,buckminster"
> source="true">
> <uri
> format=":pserver:anonymous@dev.eclipse.org :/cvsroot/technology,org.eclipse.swt.nebula/org.eclipse.nebu la.widgets.cdatetime ">
> </uri>
> <versionConverter
> type="tag" versionType="String">
> <transform
> fromPattern=".*"
> toPattern="2009.01.01.00.00.00"
> fromReplacement=".*"
> toReplacement="0.0.0"/>
> </versionConverter>
> </provider>
> </searchPath>
>
> Unfortunately, buckminster does not resolve the component as soon as I add
> the versionConverter. One thing I noticed is the following statement on the
> Component Query 1.0 specification page, which could be the cause for my
> problems:
>
> The information in these two attributes must exactly reverse the
> transformation specified in the fromReplacement/fromPattern attributes. The
> Buckminster framework enforces this requirement.
>
> Unfortunately I do not see a way to transform the string back to its
> original form in this case.
>
> Can someone please help me with this issue?
>
> Cheers,
> Florian
Re: VersionConverter to select component from CVS at a specific date [message #382226 is a reply to message #381671] Wed, 14 January 2009 13:04 Go to previous messageGo to next message
Eclipse UserFriend
Thomas Hallgren wrote:
> What does your tags look like?
CVS Tags? AFAIK the project (nebula) does not use any tags. You can easily
have a look yourself at:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.neb ula/org.eclipse.nebula.widgets.cdatetime/?root=Technology_Pr oject

My goal is to use a version of the plugin which was committed to the CVS at
a specific date. I.e I would like to use the version from 2009-01-01
regardless what version in OSGi format is requested (it should be 0.0.0
anyway).

Cheers,
Florian

--
DI Florian Hackenberger
florian@hackenberger.at
www.hackenberger.at
Re: VersionConverter to select component from CVS at a specific date [message #382227 is a reply to message #382226] Wed, 14 January 2009 16:37 Go to previous messageGo to next message
Eclipse UserFriend
OK, I misunderstood.

The way the VersionConverter works is that it scans the repository for
tags or branches (depending on its type) and converts them into
versions. If that's not the behavior you're after then I don't think you
will have much luck with that approach.

Try using a CQUERY with an advisor node where you specify a timestamp
selection criteria.

Regards,
Thomas Hallgren

DI Florian Hackenberger wrote:
> Thomas Hallgren wrote:
>> What does your tags look like?
> CVS Tags? AFAIK the project (nebula) does not use any tags. You can easily
> have a look yourself at:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.neb ula/org.eclipse.nebula.widgets.cdatetime/?root=Technology_Pr oject
>
> My goal is to use a version of the plugin which was committed to the CVS at
> a specific date. I.e I would like to use the version from 2009-01-01
> regardless what version in OSGi format is requested (it should be 0.0.0
> anyway).
>
> Cheers,
> Florian
>
Re: VersionConverter to select component from CVS at a specific date [message #382228 is a reply to message #382227] Thu, 15 January 2009 04:34 Go to previous messageGo to next message
Eclipse UserFriend
Thomas Hallgren wrote:
> The way the VersionConverter works is that it scans the repository for
> tags or branches (depending on its type) and converts them into
> versions. If that's not the behavior you're after then I don't think you
> will have much luck with that approach.
I also tried a buckminster.cspex in the feature which pulls in the cdatetime
bundle with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<cspecExtension
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
xmlns="http://www.eclipse.org/buckminster/CSpec-1.0">
<alterDependencies>
<dependency name="org.eclipse.nebula.widgets.cdatetime"
componentType="osgi.bundle" versionDesignator="HEAD@20090101T000000"
versionType="Timestamp"/>
</alterDependencies>
</cspecExtension>

My intention was to use a version selector according to:
http://wiki.eclipse.org/Buckminster_Version_Selector
http://wiki.eclipse.org/Buckminster_Version_Designator
Where it mentions that a Timestamp following
<branch>@yyyy-MM-dd[THH:mm:ss]
will select a version from <branch> at the given date.

Unfortunately the above cspex gives the following error:

[java] org.acoveo.callcenter.masterDataEditorFeature:eclipse.featur e:
Trunk/Head rejected:
org.eclipse.buckminster.sax.UnrecognizedElementException: Unrecognized
element encountered in tag :
svn://acoveo.com/svnroot/business/trunk/org.acoveo.callcente r.masterDataEditorFeature,buckminster.cspex
at line: 7 column: 153


> Try using a CQUERY with an advisor node where you specify a timestamp
> selection criteria.
I tried the following advisor node in my cquery, but keep getting the error
below.

<cq:advisorNode namePattern="org\.eclipse\.nebula\.widgets\.cdatetime"
componentType="osgi.bundle" versionOverride="[20090101,20090101]"
versionOverrideType="Timestamp"/>

To me it seems that 1) it does not use the timestamp to retrieve the
MANIFEST.MF from CVS, because the version should be 0.10.0 at 20090101 and
2) it would reject the component from CVS anyway, because the version
(0.10.0) would not match [20090101,20090101].

[java] Initial metadata fetch
for :pserver:anonymous@dev.eclipse.org :/cvsroot/technology/org.eclipse.swt.nebula/org.eclipse.nebu la.widgets.cdatetime
[java]
org.eclipse.nebula.widgets.cdatetime:osgi.bundle/[20090101,2 0090101]#Timestamp:
Version 0.12.2 rejected: not designated by [20090101,20090101]
[java]
org.eclipse.nebula.widgets.cdatetime:osgi.bundle/[20090101,2 0090101]#Timestamp:
Rejecting provider
cvs(:pserver:anonymous@dev.eclipse.org :/cvsroot/technology,org.eclipse.swt.nebula/org.eclipse.nebu la.widgets.cdatetime):
No component match was found
[java]
org.eclipse.nebula.widgets.cdatetime:osgi.bundle/[20090101,2 0090101]#Timestamp:
No provider was found that could resolve the request
[java] ERROR [0011] : No suitable provider for component
org.eclipse.nebula.widgets.cdatetime:osgi.bundle/[20090101,2 0090101]#Timestamp
was found in searchPath eclipse_technology_nebula
[java] ERROR [0011] : Rejecting provider
cvs(:pserver:anonymous@dev.eclipse.org :/cvsroot/technology,org.eclipse.swt.nebula/org.eclipse.nebu la.widgets.cdatetime):
No component match was found
[java] Doing full workspace refresh

Any ideas what else I could try?

Cheers,
Florian

--
DI Florian Hackenberger
florian@hackenberger.at
www.hackenberger.at
Re: VersionConverter to select component from CVS at a specific date [message #382229 is a reply to message #382228] Thu, 15 January 2009 05:17 Go to previous messageGo to next message
Eclipse UserFriend
Hi Florian,
I think you should forget all about version ranges, version converters,
and versions in this case. The repository that you are querying simply
does not have such versions so it will always fail.

What you can do, is to specify a selection criteria in the CQUERY. This
is different from working with versions and version ranges. Add an
AdvisorNode that looks like this:

<cq:advisorNode namePattern=".*"
timestamp="2008-07-24T22:38:00.000+0000"/>

I noticed that there's a bug in the CQUERY editor. When you enter a bad
timestamp the error message is wrong. You should expect it to read:

Timestamp must conform to format: M/d/yy h:mm a (or whatever format you
have for DateFormat and TimeFormat of type SHORT)

This string is valid input in the editor when using default US local:
'7/1/08 11:38 pm'. In the CQUERY XML though, the format will always be
ISO-8601, i.e. 'yyyy-MM-dd'T'HH:mm:ss.SSSZ'

Regards,
Thomas Hallgren

DI Florian Hackenberger wrote:
> Thomas Hallgren wrote:
>> The way the VersionConverter works is that it scans the repository for
>> tags or branches (depending on its type) and converts them into
>> versions. If that's not the behavior you're after then I don't think you
>> will have much luck with that approach.
> I also tried a buckminster.cspex in the feature which pulls in the cdatetime
> bundle with the following content:
> <?xml version="1.0" encoding="UTF-8"?>
> <cspecExtension
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
> xmlns="http://www.eclipse.org/buckminster/CSpec-1.0">
> <alterDependencies>
> <dependency name="org.eclipse.nebula.widgets.cdatetime"
> componentType="osgi.bundle" versionDesignator="HEAD@20090101T000000"
> versionType="Timestamp"/>
> </alterDependencies>
> </cspecExtension>
>
> My intention was to use a version selector according to:
> http://wiki.eclipse.org/Buckminster_Version_Selector
> http://wiki.eclipse.org/Buckminster_Version_Designator
> Where it mentions that a Timestamp following
> <branch>@yyyy-MM-dd[THH:mm:ss]
> will select a version from <branch> at the given date.
>
> Unfortunately the above cspex gives the following error:
>
> [java] org.acoveo.callcenter.masterDataEditorFeature:eclipse.featur e:
> Trunk/Head rejected:
> org.eclipse.buckminster.sax.UnrecognizedElementException: Unrecognized
> element encountered in tag :
> svn://acoveo.com/svnroot/business/trunk/org.acoveo.callcente r.masterDataEditorFeature,buckminster.cspex
> at line: 7 column: 153
>
>
>> Try using a CQUERY with an advisor node where you specify a timestamp
>> selection criteria.
> I tried the following advisor node in my cquery, but keep getting the error
> below.
>
> <cq:advisorNode namePattern="org\.eclipse\.nebula\.widgets\.cdatetime"
> componentType="osgi.bundle" versionOverride="[20090101,20090101]"
> versionOverrideType="Timestamp"/>
>
> To me it seems that 1) it does not use the timestamp to retrieve the
> MANIFEST.MF from CVS, because the version should be 0.10.0 at 20090101 and
> 2) it would reject the component from CVS anyway, because the version
> (0.10.0) would not match [20090101,20090101].
>
> [java] Initial metadata fetch
> for :pserver:anonymous@dev.eclipse.org :/cvsroot/technology/org.eclipse.swt.nebula/org.eclipse.nebu la.widgets.cdatetime
> [java]
> org.eclipse.nebula.widgets.cdatetime:osgi.bundle/[20090101,2 0090101]#Timestamp:
> Version 0.12.2 rejected: not designated by [20090101,20090101]
> [java]
> org.eclipse.nebula.widgets.cdatetime:osgi.bundle/[20090101,2 0090101]#Timestamp:
> Rejecting provider
> cvs(:pserver:anonymous@dev.eclipse.org :/cvsroot/technology,org.eclipse.swt.nebula/org.eclipse.nebu la.widgets.cdatetime):
> No component match was found
> [java]
> org.eclipse.nebula.widgets.cdatetime:osgi.bundle/[20090101,2 0090101]#Timestamp:
> No provider was found that could resolve the request
> [java] ERROR [0011] : No suitable provider for component
> org.eclipse.nebula.widgets.cdatetime:osgi.bundle/[20090101,2 0090101]#Timestamp
> was found in searchPath eclipse_technology_nebula
> [java] ERROR [0011] : Rejecting provider
> cvs(:pserver:anonymous@dev.eclipse.org :/cvsroot/technology,org.eclipse.swt.nebula/org.eclipse.nebu la.widgets.cdatetime):
> No component match was found
> [java] Doing full workspace refresh
>
> Any ideas what else I could try?
>
> Cheers,
> Florian
>
Re: VersionConverter to select component from CVS at a specific date [message #382230 is a reply to message #382229] Thu, 15 January 2009 06:18 Go to previous messageGo to next message
Eclipse UserFriend
On Thursday 15 January 2009, you wrote:
> I think you should forget all about version ranges, version
> converters, and versions in this case. The repository that you are
> querying simply does not have such versions so it will always fail.
>
> What you can do, is to specify a selection criteria in the CQUERY.
> This is different from working with versions and version ranges. Add
> an AdvisorNode that looks like this:
>
> <cq:advisorNode namePattern=".*"
> timestamp="2008-07-24T22:38:00.000+0000"/>

Hmm, it almost works. I added the following advisorNode:
<cq:advisorNode namePattern="^org\.eclipse\.nebula\.widgets\.cdatetime$"
timestamp="2009-01-01T00:00:00.000+0000"/>

and get the following from buckminster:
[java] Initial metadata fetch
for :pserver:anonymous@dev.eclipse.org :/cvsroot/technology/org.eclipse.swt.nebula/org.eclipse.nebu la.widgets.cdatetime
[java] org.eclipse.nebula.widgets.cdatetime:osgi.bundle: Timestamp Sun Jan
11 20:22:32 CET 2009 rejected: too young
[java] org.eclipse.nebula.widgets.cdatetime:osgi.bundle: Rejecting provider
cvs(:pserver:anonymous@dev.eclipse.org :/cvsroot/technology,org.eclipse.swt.nebula/org.eclipse.nebu la.widgets.cdatetime):
No component match was found
[java] org.eclipse.nebula.widgets.cdatetime:osgi.bundle: No provider was
found that could resolve the request

The timestamp Jan 11 20:22:32 CET 2009 is the last commit from the nebula
CVS repository. It looks like CVS provider does not look into the past.
Could that be a bug?

> I noticed that there's a bug in the CQUERY editor.
That's not a problem, I'm editing the XML directly anyway.

Cheers,
Florian

--
DI Florian Hackenberger
florian@hackenberger.at
www.hackenberger.at
Re: VersionConverter to select component from CVS at a specific date [message #382231 is a reply to message #382230] Thu, 15 January 2009 07:57 Go to previous message
Eclipse UserFriend
Thomas Hallgren considers this a bug, I reported it here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=261189

Cheers,
Florian
--
DI Florian Hackenberger
florian@hackenberger.at
www.hackenberger.at
Previous Topic:org.eclipse.buckminster.pde.targetOS and others don't take wildcard (*)
Next Topic:Materialization and Action in Cspex
Goto Forum:
  


Current Time: Tue Oct 28 20:01:43 EDT 2025

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

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

Back to the top