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

'svn auth --full-match --realm-only'

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

Consider the following question: "is there a cached username for realm R?".

Trying to answer it via 'svn auth', I run into two problems:

1. I need to fnmatch-escape R. That means I need to escape [ and ]
specially before calling 'svn auth'.

2. I need to filter the results for those where the listed realm is
strcmp-equal to R. That's because the match is a substring match,
considers fields other than the realmstring, and * and ? (if they occur
in R) may match other realms besides the intended one.

Is there a way to make it easier to answer that question via 'svn auth'?

For my use-case, I care just about one specific realm for which (1) is
not a concern, and (2) I do in the caller as a post-processing of "svn
auth"'s output. But it seems writing a generic 'svn auth' wrapper that
DTRTs on usernames and realms that contain * would be a little tricky.

Daniel

P.S. This problem reminds 'svn log --search': there is structured data
(svn:log,svn:author,svn:date; svn:realmstring,hostname,username) that
needs to be searched.
Received on 2014-06-28 15:36:43 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.