On Fri, 21 Oct 2011, Craig Rodrigues wrote: > 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. $(svn info | awk '/^Revision:/ {print $2}') is what I use in my installkernel wrapper script. Granted, I didn't know about svnversion some time later, but it appears that svnversion broke some things by consolidating the .svn directories as Chris shows above with the 'exported' line. Thanks, -GarrettReceived on Sat Oct 22 2011 - 13:29:47 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:19 UTC