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

'svn auth' treats patterns as paths

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 28 Jun 2014 13:23:40 +0000

'svn auth' URL-escapes and path-canonicalizes the pattern, which breaks some
use-cases. For example,

[[[
% $svn auth "<https://svn.apache.org:443> ASF Committers"
DBG: Pattern 0 is '%3chttps://svn.apache.org:443%3e%20asf%20committers' # [1]

% $svn auth "://svn.apache.org"
DBG: Pattern 0 is ':/svn.apache.org'
]]]

(The debug print is of b.patterns in svn_cl__auth().)

That's due to using svn_cl__args_to_target_array_print_reserved() to collect
patterns from argv. I see no reason to do canonicalization or escaping here,
or to forbid ".svn" and "_svn"; the arguments are not paths, they are patterns.
Removing slashes and adding %-escaping causes false negative matches.
(Removing the canonicalization will permit patterns such as '*///*', which will
never match, but that is not a problem: having zero matches is not an error.)

Seems to me we should just take the patterns from argv as-are, with no changes
save for transcoding (C encoding -> UTF-8).

Daniel

[1] As an aside, why did it downcase "ASF Committers"? Did svn think those
words were part of the hostname? I'm on Linux, on a case-sensitive filesystem.
Received on 2014-06-28 15:24:17 CEST

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.