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

Re: [PATCH] Hackathon project: Dumping viewspec

From: Julian Foad <julianfoad_at_apache.org>
Date: Fri, 16 Mar 2018 17:33:04 +0000

Johan Corveleyn wrote:
> Julian Foad wrote:
>> We need to look at using the viewspec as input next. Semantically speaking,
>> these sorts of things:
>>
>> * a way to check out a new WC to match the spec;
>> * a way to modify an existing WC to match the spec;
>> * a way to modify/checkout a WC of a *different* branch, to match the spec
>> except for its URLs (maybe switch URLs pointing inside this 'branch' or WC
>> get adjusted as if they are relative, and other switch URLs stay absolute?);
>
> Ack.
>
> FWIW, the viewspec format of svn-viewspec.py [1] (which can serve as
> inspiration I guess) requires the viewspec to have a "Url", and then a
> series of path rules. The Url serves as a base url, the path rules are
> relative to that base url.

I implemented an output format compatible with 'svn-viewspec.py' in
r1826990. Then I updated that output format to also support 'switched'
and revisions, in r1826993. This version outputs a header declaring
'Format: 2', and svn-viewspec.py currently barfs on reading that.

Suggested exercises for the reader (you, plural):

   * implement a UI to choose the output format (currently 'svn info
--viewspec' is hard-coded to produce that 'format 2')

   * update 'svn-viewspec.py' to implement those 'format 2' extensions

   * start implementing the API functions that 'svn-viewspec.py' needs

   * expose those API functions in the Python bindings and convert
'svn-viewspec.py' to use them

> So here too, I suppose a viewspec can contain a "base url", but the
> user should be able to override that base url when applying the
> viewspec (with checkout, update, switch, export, ...).

Yes, this is true with either format.

- Julian

> [1] http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/svn-viewspec.py
Received on 2018-03-16 18:33:08 CET

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.