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

Re: Flatten out svnaccess

From: Branko Čibej <brane_at_wandisco.com>
Date: Fri, 25 Apr 2014 22:30:07 +0200

On 25.04.2014 21:52, Naumenko, Roman wrote:
> Hello SVN users,
>
> We're looking to integrate svn access info into some reporting
> systems, but its almost impossible to use information from svnaccess
> to join with other sources.
> The reason is that there are no structured relation between groups,
> users, repositories and permissions.
>
> So I'm looking how to get it flattened, to have something like this:
>
> user1 | group1 | repo | path | permissions
> user2 | group1 | repo | path | permissions
> and so on...
>
> So far I managed to get first two cols, after massaging svnaccess file
> with combination of sed, grep and awk.
> Then it become obvious that getting last three will be a problem.
>
> Does anybody know if its possible to get this file transformed into
> something more sql friendly?

Of course it is, but you really should begin by parsing the file, not
fiddling around with sed, grep and awk.

The file format is compatible with Python's ConfigParser module; you'll
have no trouble loading it there, then massaging the data in any way you
like.

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2014-04-25 22:30:43 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.