[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Dumpstream version parsing API warts

From: Max Bowsher <maxb_at_ukf.net>
Date: 2004-11-26 23:50:50 CET

In 1.0.x, SVN_REPOS_DUMPFILE_FORMAT_VERSION was 2.

In 1.1.x, because of dump --deltas, we added svn_repos_parse_dumpstream2 and
we *CHANGED* the value of SVN_REPOS_DUMPFILE_FORMAT_VERSION to 3.

This was a bad thing to, as we broke code which expected to use
SVN_REPOS_DUMPFILE_FORMAT_VERSION to produce a dumpstream parseable by
svn_repos_parse_dumpstream - like our own svndumpfilter!

I therefore propose to *remove* SVN_REPOS_DUMPFILE_FORMAT_VERSION from the
public API for 1.2

Yes, this is a technical violation of version constraints - *but* since we
have never laid down any rules for exactly which version this define should
indicate, any client code using this define is intrinsically broken, as it
uses a possibly fluctuating value, instead of a number actually
corresponding to whatever format expected by the code it is used in, I
believe that this case is justifiable.

Instead we will define:
 SVN_REPOS_DUMPFILE_FORMAT_VERSION_3
 SVN_REPOS_DUMPFILE_FORMAT_VERSION_2
 SVN_REPOS_DUMPFILE_FORMAT_VERSION_1

Which simply provide the ability to write self-documenting code, and can
never shift under the feet of client code.

Furthermore:
Properly fixing svndumpfilter will require it to be able to obtain the
version of the of the dumpstream it is working with - hence, we need to rev
the parser APIs, and add a new callback to provide this information.

Comments?

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 26 23:52:31 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.