From owner-freebsd-current@FreeBSD.ORG Sat Oct 22 05:42:09 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 158F81065673; Sat, 22 Oct 2011 05:42:09 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 642368FC08; Sat, 22 Oct 2011 05:42:07 +0000 (UTC) Received: by bkbzu17 with SMTP id zu17so7333476bkb.13 for ; Fri, 21 Oct 2011 22:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Z7QkCkZiwe2ocLVpQSJunPa23+rAhfkecOuvgXJjfZE=; b=SkhhKdE9ep/ycArhvjyEFCLCIRagw83iB3fuj4V6GFCHTawEg3ThghSothJRFCf4Aa QT+4COklVmGre3DMHedioPhQ54M4vI0ALLw90GKQ+8dyspS/VCkA6hLAyVdBkV6AdtTi Ywg1bp2cEY5dhvL2c5/vaS6A6Wan39UnWYa6c= MIME-Version: 1.0 Received: by 10.204.132.143 with SMTP id b15mr12307390bkt.79.1319262126327; Fri, 21 Oct 2011 22:42:06 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.204.39.12 with HTTP; Fri, 21 Oct 2011 22:42:06 -0700 (PDT) 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> <4EA21842.5000808@FreeBSD.org> Date: Fri, 21 Oct 2011 22:42:06 -0700 X-Google-Sender-Auth: P7-JmvtMf1S1sLKL_ArCCe62x9g Message-ID: From: Craig Rodrigues To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: sys/conf/newvers.sh vs. subversion-1.7 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2011 05:42:09 -0000 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 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