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  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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 #382228 is a reply to message #382227] |
Thu, 15 January 2009 04:34   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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
>
|
|
| | |
Goto Forum:
Current Time: Tue Oct 28 20:01:43 EDT 2025
Powered by FUDForum. Page generated in 0.03866 seconds
|