Minor API and DTD change: VCP::Rev::action() and ::from_id()

Barrie Slaymaker <[email protected]> Sun, 12 Sep 2004 07:15:19 -0400
Newsgroups gmane.comp.version-control.revml
Message-ID <[email protected]>
For those of you writing source and destination drivers, I've tweaked
the API a bit to better support cloning and to be less hackish.  This
addresses an issue "all revision(s) aready integrated" error that
cropped up when converting the xfree CVS repository to p4.

The overview is (see change 4507 for the gory details):

VCP::Rev::action()'s value should now never be left undefined.  It
should be set to "digest" for base (ie digest-only) revisions--leaving
it undefined was a pragmatic hack and I should have known better.  We
also use "branch" when creating placeholder branch revisions and "clone"
when creating clone revisions (see VCP::Source::cvs for clone details).

VCP::Rev::From_id has been added to allow a revision to have multiple
parents.  This currently used for "clone" actions so that the revision
is not created until both its preceding revision and the "parent"
revision on the master branch are both seen.  VCP::Filter::changesets
pays attention to both previous_id and from_id when aggregating changes.
See VCP::Source::cvs source code for when/how from_id is set.

In the future, from_id() will also be used to identify where to merge
from when data is "p4 integrate"ed from another file in to a file.

See VCP::Dest::p4's use of from_id() to see how cloning is implemented
now.  Neither VCP::Dest::cvs nor VCP::Dest::vss supports cloning.

The v0.35 RevML DTD has also been altered to reflect this.  It's a
simpler DTD now unfortunately (the DTD catches fewer errors), but the
new <action> tag makes the RevML more readable.  The <clone/>,
<placeholder/> and <delete/> "action tags" have been removed, along with
the never-used <move/> tag.

Sorry for any inconvenience.

- Barrie