Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#2897 closed defect (fixed)

patch to add cvs.date variable

Reported by: gwright@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.0
Keywords: Cc:
Port:

Description

The attached patch allows cvs checkouts to refer to a date. It works similarly to cvs.tag. Example:

cvs.date "12-April-2005"

Will check out the latest revision before 12 April 2005. The purpose of the patch is to allow cvs checkout of a consistent version even if the cvs repository isn't tagged.

Attachments (2)

patch-portfetch.tcl (1.5 KB) - added by gwright@… 19 years ago.
Patch portfetch.tcl to include cvs.date
portfile.7.patch (596 bytes) - added by cjr@… 19 years ago.
Doc patch for portfile.7

Download all attachments as: .zip

Change History (10)

Changed 19 years ago by gwright@…

Attachment: patch-portfetch.tcl added

Patch portfetch.tcl to include cvs.date

comment:1 Changed 19 years ago by cssdev@…

This would be a tremendously useful feature. The current cvs support only includes the ability to specify a release tag, but not all cvs archives are maintained so cleanly. Additionally, it would release the need for port maintainers to host dated snapshots elsewhere. I use several Portfiles for managing non-Darwinports projects, so cvs.date support would be of great benefit.

comment:2 Changed 19 years ago by olegb@…

Why is this better that the :

cvs.args -D20050402

as some ports use?

(I am not being a smart ass, i just like to know :-) )

comment:3 Changed 19 years ago by gwright@…

On Ole's question:

The purpose of cvs.date is to make retrieving a specific date as easy as retrieving a specific tag. After all, "cvs.tag" could be replaced by "cvs.args -r <tag>", but we provide the extremely simple form to encourage the use of tags. We should make retrieving a date dead simple too.

It also protects you from the error of using "-d" instead of "-D". (Both of which take an argument!)

I think the general philosophy has been to provide simple forms for the commands we expect people to use commonly, and reserve exposing the underlying APIs ("cvs.args" or "fetch.args") for special, rare cases.

This will help in the future, when we might want to support other repository types. For example, the cvs.tag and cvs.date variables could be used to build a valid darcs command. But we're out of luck if this information is encoded in an opaque string like "-D20050526" unless we're going to write a parser to extract the relevant fields.

/gw

comment:4 Changed 19 years ago by olegb@…

Would you mind adding a note about this new keyword in portfile(7) ?

I'll commit it when I have tried it out a bit.

Thanks.

comment:5 Changed 19 years ago by olegb@…

commited!

But not closing till we have the documentation in also.

Changed 19 years ago by cjr@…

Attachment: portfile.7.patch added

Doc patch for portfile.7

comment:6 Changed 19 years ago by olegb@…

Resolution: fixed
Status: newclosed

committed,

Thanks Gregory!

comment:7 Changed 19 years ago by jberry@…

Did this patch go in before or after release of port-1.0?

We need to develop a strategy for when to add new Portfile attributes, and when they may be used in Portfiles.

comment:8 Changed 19 years ago by gwright@…

The patch went in after the release of 1.0.

I agree with James that we need a policy on how new keywords are introduced. Perhaps this could follow up on the recent discussion of how cvs branches are used (e.g., new keys are only allowed in HEAD.)

Note: See TracTickets for help on using tickets.