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

AW: Detect incompatible (future) workingcopy format.

From: Markus Schaber <m.schaber_at_3s-software.com>
Date: Fri, 13 May 2011 15:46:26 +0200

Hi, Les,

> Von: Les Mikesell [mailto:lesmikesell_at_gmail.com]

[> ]
> >> What is the safest future-compatible way to check for an incompatible
> >> / unknown working copy format which was written by a future
> >> subversion version? (e. G. WC-NG by SVN 1.7?)
> >>
> >> My idea was to run status with depth=empty on the workingcopy root,
> >> and check for SVN_ERR_WC_UNSUPPORTED_FORMAT error code.
> >>
> >> Is there a function specifically designed for this purpose?
> >
> > No. The current library functions are forward compatible for the
> > entire 1.x range. The working copy storage is considered to be an
> > internal artifact, meaning you're supposed to use the libraries (e.g.
> > through the python bindings) to access the working copy data.
>
> Doesn't that assume that there is only one version of the library that can
> access a working copy location or at least that the versions only go
> forward over time? There are a large number of ways that assumption can
> be wrong.

As far as I see, no.

If I were about to make that assumption, I'd encode the client library version into our project metadata, and trigger the error handling when that version mismatches.

But I want to ask the subversion library whether it can handle the working copy version, and inform the user if subversion cannot handle it.

Note that we deliver SharpSvn based on Subversion 1.6.16, and this is our first release including subversion, so the implicit upgrade done by earlier svn versions is no use case for us, as no working copies in the old format exist.

Upgrades to future versions (either implicit or explicit as for wc-ng) will be handled by code we write when we ship an update bundled with a newer Version of Subversion requiring that upgrade.

So the only problematic case left is when the user opens a project with a working copy in a new, unknown format. This is the case I want to detect reliably, so that I can inform the user about the solutions (either use a newer version of our software, or disconnect the project from subversion).

Best regards,
Markus Schaber
Received on 2011-05-13 15:51:41 CEST

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

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