[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: Branko Čibej <brane_at_apache.org>
Date: Sat, 17 Mar 2018 11:53:19 +0100

On 16.03.2018 18:33, Julian Foad wrote:
> 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')

Why? 'svn-viewspec.py' is not a supported tool; 'svn info --viewspec'
does not exist in 1.10. We don't have any compatibility guarantees to
worry about.

>   * update 'svn-viewspec.py' to implement those 'format 2' extensions
>   * start implementing the API functions that 'svn-viewspec.py' needs

Again, why? 'svn-viewspec.py' uses the standard command-line tools. It
follows that all API functions it needs already exist.

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

Frankly, if all necessary functionality exists in the command-line
client, what's the benefit of requiring python bindings for
svn-viewspec.py? What _should_ be done is to stop using the system()
call to invoke the command-line and use the popen module instead (as we
do in our test suite).

-- Brane
Received on 2018-03-17 11:53:27 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.