1 message in com.perforce.revml[revml] Re: [VCS] VCS Abstraction vs....| From | Sent On | Attachments |
|---|---|---|
| Ed | 08 Nov 2001 11:56 |
| Subject: | [revml] Re: [VCS] VCS Abstraction vs. Source Integrity![]() |
|---|---|
| From: | Ed (ed...@chronos.net) |
| Date: | 11/08/2001 11:56:49 AM |
| List: | com.perforce.revml |
Should cvs tags be handled in some fashion by the proposed VCS::Container?
Therefore, we should separate the discussion of directories/projects/containers from any discussion of tags. They are two independent ideas, each of which can exist without the other. [snip] The current VCS::Version::tags() already returns any tags associated with the version (or so I assume from the documentation). If the VCS abstraction were to more fully embrace tags, then VCS:Dir::content() could be extended to take an optional tag name argument.
These statements taken together show the following problems. The VCS::Version::tags() method is operating at too low a level, and using the extracting idiom of VCS::Version with a mass of VCS::Files would be a very painful way of getting a particular "version" (project checkin in SI, "tag" in others include CVS), being very inefficient because it's not very expressive.
A better and more expressive way of approaching querying information from a VCS entity is quite simply to use XPath. This will permit us to do something like this:
$config = read_user_config_file('vcsweb.ini'); $dir = VCS::Dir->new($config->{top_project}); @versions = $dir->xpath('.//vcs:version[@version="RELEASE_2_0"]'); map { write_out_text_of_version_object($_) } @versions;
As you can see above, I am implying that a VCS::Dir will be a "vcs:dir" element, a VCS::File will be a "vcs:file", and a VCS::Version will be a "vcs:version" element. Someone more familiar that I with the syntax of writing XML DTDs might wish to have a go at this.
Alternatively, we can unify with revml. I've had a look at the DTD and it looks acceptable, though it's aimed at slightly different things. Barrie, if you're amenable to the idea of unifying our two projects, we should start to discuss nuts and bolts.
Regards, Ed




