From owner-freebsd-current@FreeBSD.ORG Sat Oct 22 15:29:47 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 B9F30106566B; Sat, 22 Oct 2011 15:29:47 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5E5E18FC18; Sat, 22 Oct 2011 15:29:47 +0000 (UTC) Received: by gyd8 with SMTP id 8so6024898gyd.13 for ; Sat, 22 Oct 2011 08:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=PEVHzN6C5NJyXng63G/MqJywOb5k9Cj1ROVEMnS8q8s=; b=nNRVW0cnsZqurzrjpqLKWHhYF/KaWI78WC7L2chPEx7Nq+qX95elBSrdV/Bdu/of9s AfkdpdlBfuFW3hQu7s8AIVim5tT9YD1APSqarPfI/9RcpS/cPvTbeNg7gtp81EBnLBu+ ddXsXHlJz78co+9p+eTWWFdlAqqqhW3aoVH6Q= Received: by 10.68.38.169 with SMTP id h9mr35898557pbk.113.1319297386190; Sat, 22 Oct 2011 08:29:46 -0700 (PDT) Received: from c-24-6-49-154.hsd1.ca.comcast.net (c-24-6-49-154.hsd1.ca.comcast.net. [24.6.49.154]) by mx.google.com with ESMTPS id h5sm43486607pbq.11.2011.10.22.08.29.44 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 22 Oct 2011 08:29:44 -0700 (PDT) Date: Sat, 22 Oct 2011 08:29:43 -0700 (PDT) From: Garrett Cooper To: Craig Rodrigues In-Reply-To: Message-ID: 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> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Doug Barton , 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 15:29:47 -0000 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, -Garrett