Date: Fri, 21 Oct 2011 22:42:06 -0700 From: Craig Rodrigues <rodrigc@crodrigues.org> To: Doug Barton <dougb@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: sys/conf/newvers.sh vs. subversion-1.7 Message-ID: <CAG=rPVeBQq5srTTjHDg-9Yc7R%2B5%2Buhm4BgzvhxEJ4KyN9ef%2B7w@mail.gmail.com> In-Reply-To: <4EA21842.5000808@FreeBSD.org> References: <20111020114844.GK59810@albert.catwhisker.org> <20111020122121.GL59810@albert.catwhisker.org> <201110211636.05917.jhb@freebsd.org> <20111021211221.GV59810@albert.catwhisker.org> <CAG=rPVfD8EZYpD_SQES2%2B9uUeqGOaAhW3asJbVeGKeV3er2ZKw@mail.gmail.com> <4EA21842.5000808@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I tried following: (1) Run svnversion in non-svn directory: return status =3D=3D 0 prints out "exported" time: real 0m0.043s user 0m0.000s sys 0m0.045s (2) Run svnversion in svn directory: return status =3D=3D 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 =3D=3D 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 =3D=3D 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 rodrigc@crodrigues.org On Fri, Oct 21, 2011 at 6:11 PM, Doug Barton <dougb@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. > > > -- > > =A0 =A0 =A0 =A0Nothin' ever doesn't change, but nothin' changes much. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- OK Go > > =A0 =A0 =A0 =A0Breadth of IT experience, and depth of knowledge in the DN= S. > =A0 =A0 =A0 =A0Yours for the right price. =A0:) =A0http://SupersetSolutio= ns.com/ > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= " > --=20 Craig Rodrigues rodrigc@crodrigues.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVeBQq5srTTjHDg-9Yc7R%2B5%2Buhm4BgzvhxEJ4KyN9ef%2B7w>