views:

585

answers:

2

This config-spec show the files I need:

element -dir * '{version(/main/LATEST) && !version(SLT-T)}'
element -file * '{version(/main/LATEST) && !version(SLT)}'

Now I need to see how the source looked at some point in the future, so I do this:

time 01-Nov-2008
element -dir * '{version(/main/LATEST) && !version(SLT-T)}'
element -file * '{version(/main/LATEST) && !version(SLT)}'

Unfortunately this still shows me "the present". The manual says:

Time rules may be nested. They may not include any query language constructs.

Okay, but what do I do then?

How do I exclude files and directories with a certain label, without using query language? Or is there way to specify time in the query language?

(No files has a SLT-T label, and no directories has a SLT label.)

A: 

Does this help you?

Spedge
No, not really. I don't see anything about excluding certain labels, or selecting a time.
myplacedk
Try again, I may have added the wrong link lasttime :)
Spedge
It's closer now. ;-)But it's only about the time-part. There is nothing about excluding files with a certain label, or how to work around the query/time problem.
myplacedk
I don't know if you are interested, but looking at that page, it's solved a long-standing problem I've had. So thanks for asking it :D
Spedge
+1  A: 

Did you try adding some query-language directives like:

&& !ver{created_since(1-Nov-2008)}
&& ver{created_since(1-Nov-2008)}

(all the versions existing before/after 1 Nov. 2008)

That is part of the query language and may help you refining your selection rules.


I confirm for having tested it:

element /myPath/... /main/{!created_since(01-Sep-2008)}
element /myPath/... /main/LATEST

would give you all version created before September the first in this instance.

I am not sure it can be combined with your rules to successfully achieve what you are looking for, though.

My point was just to make sure you can include time-based selection rules in your config spec.

VonC
I don't think this will work.Imagine a file created in January, end changed in March. If I say {!created_since(Feb)}, I will se the March-version, but I need the January-version.
myplacedk
Hmmm... {!created_since(Feb)} would give you the January version, not the March one.
VonC
I checked the manual, but apparantly I misunderstood it. This is probably what I was searching for.My next problem is that I cannot see where labels was in the past. But I think that is just something I will have to live with.
myplacedk
@myplacedk So why not accept his answer?
Spedge