Hi, I tried following:
(1) Run svnversion in non-svn directory: return status == 0 prints out "exported" time: real 0m0.043s user 0m0.000s sys 0m0.045s (2) Run svnversion in svn directory: return status == 0 prints out "223847M" time: real 0m2.563s user 0m0.980s sys 0m1.187s (3) Run "svn info --non-interactive ." in non-svn directory: return status == 1 prints out "svn: '.' is not a working copy" time: real 0m0.056s user 0m0.007s sys 0m0.046s (4) Run "svn info --non-interactive ." in svn directory: return status == 0 prints out "a bunch of info about from svn" time: real 0m0.023s user 0m0.000s sys 0m0.024s I thought that since svnversion seems to always have a return status of 0, and is almost 2 seconds slower than "svn info" when run inside a svn directory, that using "svn info" is a preferable way inside a script of determining if a directory is part of a svn repo or not. -- Craig Rodrigues rodr...@crodrigues.org On Fri, Oct 21, 2011 at 6:11 PM, Doug Barton <do...@freebsd.org> wrote: > On 10/21/2011 17:51, Craig Rodrigues wrote: >> Can you come up with a patch which invoke "svn info ." (if the svn >> binary exists)? >> This is slightly faster than svnversion. >> >> If "svn info ." doesn't error out, you can assume that the directory >> is under SVN control. > > Doesn't svnversion error out pretty quickly in the same circumstance? My > brief testing seems to indicate that it does. > > > -- > > Nothin' ever doesn't change, but nothin' changes much. > -- OK Go > > Breadth of IT experience, and depth of knowledge in the DNS. > Yours for the right price. :) http://SupersetSolutions.com/ > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" > -- Craig Rodrigues rodr...@crodrigues.org _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"