Re: cvs log equivalent
On Sat, Mar 19, 2011 at 2:21 AM, Hyrum K. Wright wrote: > On Fri, Mar 18, 2011 at 6:13 PM, Paul Graham wrote: >> I could find all the change versions of a file, then do an svn diff for each >> change, then parse the output and determine the number of changes, but that >> seems excessive :-) >> >> rcs has this lines+/- information directly in the database. Is svn >> organized differently under the hood? > > Significantly. > > One thing I usually do is run svn diff on the revision of interest and > then pipe that through diffstat: > > $ svn diff -c1089374 | diffstat > > That will usually yield sufficiently interesting result for my application. Paul, It may interest you to know that the upcoming 1.7 release of svn will have a '--diff' option for 'svn log', which will show the diffs inline with the log output. You may be able to script something around that, post-processing the output of 'svn log --diff' by sending each diff to 'diffstat', and replacing the diff output with the diffstat output or something (this will be much more efficient than executing 'svn diff -c XXX | diffstat' for every revision that's being output by log). Of course, if 'svn log' could calculate/output the diffstat output (or something similar) itself, that would be even more efficient (no need to send entire diffs over the wire, and execute external programs to post-process it), and much cleaner. So I can certainly see the value of a '--diffstat' option for 'svn log', doing exactly this. I'm not sure how much work such a feature would be, but if someone would like to take a look at this, I'd say: patches welcome! Though I'd start a discussion on the dev-list first, before spending huge amounts of time on it. Cheers, -- Johan
Odd behavior
I have the following repository configuration file for apache: AuthType Basic AuthName "Subversion" AuthUserFile /srv/svn/svnauth DAV svn SVNParentPath /srv/svn/repos SVNListParentPath On require valid-user require valid-user require user secretowner require user secretowner It seems right to me but the odd behavior is that when some valid-user but secretowner checkouts trunk the folder secret keeps coming as well its content. What is wrong? Rodrigo Montenegro de Oliveira
Re: Odd behavior
On Mar 19, 2011, at 22:14 , Rodrigo Montenegro wrote: > I have the following repository configuration file for apache: > > > AuthType Basic > AuthName "Subversion" > AuthUserFile /srv/svn/svnauth > > DAV svn > SVNParentPath /srv/svn/repos > SVNListParentPath On > > require valid-user > > > > require valid-user > > > > >require user secretowner > > >require user secretowner > > > > It seems right to me but the odd behavior is that when some valid-user but > secretowner checkouts trunk the folder secret keeps coming as well its > content. > What is wrong? Only the first of your overlapping directives has any effect. The other two may as well be deleted. For Subversion, the Apache configuration controls access to an entire repository as a unit. To hide part of a repository from some users, there is path-based authorization. It uses a different mechanism. See the SVN book for details: http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html#svn.serverconfig.httpd.authz.perdir http://svnbook.red-bean.com/nightly/en/svn.serverconfig.pathbasedauthz.html Note that you can't hide the existence of a forbidden directory, so it's not very secret even when the path-based authorization is working. If you have real secrets you should avoid storing them with your source code. Regards, Steve -- Stephen Butler | Senior Consultant elego Software Solutions GmbH Gustav-Meyer-Allee 25 | 13355 Berlin | Germany fon: +49 30 2345 8696 | mobile: +49 163 25 45 015 fax: +49 30 2345 8695 | http://www.elegosoft.com Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194