From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Mattie Newsgroups: gmane.emacs.devel Subject: vc-bzr sha1sum dependency patch #2 Date: Thu, 23 Apr 2009 12:36:00 -0700 Message-ID: <20090423193557.GA6117@reforged> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" X-Trace: ger.gmane.org 1240515440 13967 80.91.229.12 (23 Apr 2009 19:37:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Apr 2009 19:37:20 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 23 21:38:40 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lx4kp-000837-Dq for ged-emacs-devel@m.gmane.org; Thu, 23 Apr 2009 21:38:40 +0200 Original-Received: from localhost ([127.0.0.1]:44662 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lx4jQ-0005CZ-96 for ged-emacs-devel@m.gmane.org; Thu, 23 Apr 2009 15:37:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lx4iS-0003zn-AJ for emacs-devel@gnu.org; Thu, 23 Apr 2009 15:36:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lx4iN-0003tQ-05 for emacs-devel@gnu.org; Thu, 23 Apr 2009 15:36:11 -0400 Original-Received: from [199.232.76.173] (port=55725 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lx4iM-0003se-Lv for emacs-devel@gnu.org; Thu, 23 Apr 2009 15:36:06 -0400 Original-Received: from wa-out-1112.google.com ([209.85.146.181]:59629) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lx4iM-0001A4-5a for emacs-devel@gnu.org; Thu, 23 Apr 2009 15:36:06 -0400 Original-Received: by wa-out-1112.google.com with SMTP id m33so202614wag.26 for ; Thu, 23 Apr 2009 12:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=AW22NDUqvOV3/rm3MrcRZntTYl6jZ3x0i9gwW3UljLY=; b=Jh2/MhTUbvEeG4R/IdHayTdIsNr5TFxCgrYknnqmPujZpXwO4IPFxemJnKBAuHUR4e G4w2sLa+VRSi7xsfXRTnSSU5y2QCKGjwHQCJ1v01dyhQagF+wi1DNEDZ/6nrd4o6a5b5 FcjQT293ybHwyCRxn5oDJyBIIpOAPLgJe3imA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=oyL7UFd1P8X9E9Ot07suN/1bIIwZrfts7z9zs1VzZ60YzmpRnicksKbiduSclyzVGo 6+k2u2IDL7i+6CwyQI4Arq3sNHUCjsrXEQOI5Dl4V4wZcVdQ9pc06cQyjB9Ner0fUHYA Zd0FF1tmoO9E90qp21s970/S0/NQOtfPcdLVw= Original-Received: by 10.114.210.2 with SMTP id i2mr906893wag.44.1240515364494; Thu, 23 Apr 2009 12:36:04 -0700 (PDT) Original-Received: from @ (c66-235-1-45.sea2.cablespeed.com [66.235.1.45]) by mx.google.com with ESMTPS id m17sm495068waf.61.2009.04.23.12.36.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 23 Apr 2009 12:36:03 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110436 Archived-At: --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Here is a corrected version of the patch I sent in the message vc-bzr sha1s= um dependency --- emacs-2009-4-21/lisp/vc-bzr.el 2009-04-06 21:06:42.000000000 -0700 +++ vc-bzr.el 2009-04-23 12:32:51.574872930 -0700 @@ -141,7 +141,24 @@ (apply 'process-file prog (file-relative-name file) t nil args) (buffer-substring (point-min) (+ (point-min) 40))))) =20 +(defvar vc-bzr-optimized-status (executable-find "sha1sum") + "enable the bzr status optimization only if the sha1sum program exists") + (defun vc-bzr-state-heuristic (file) + "a wrapper for two methods of determining the bzr status of a file." + (condition-case trap-status + (funcall (if vc-bzr-optimized-status + 'vc-bzr-state-fast + 'vc-bzr-state) file) + (error + (if vc-bzr-optimized-status + (progn + (setq vc-bzr-optimized-status nil) + (message "vc-bzr: error %s determining status of %s ; retrying w= ith optimization disabled." (princ trap-status) file) + (vc-bzr-state file)) + (message "vc-bzr-registered could not determine status of %s even = with optimization disabled." file))) )) + +(defun vc-bzr-state-fast (file) "Like `vc-bzr-state' but hopefully without running Bzr." ;; `bzr status' is excrutiatingly slow with large histories and ;; pending merges, so try to avoid using it until they fix their --=20 GnuPG Key: B9012279 is available from HKP server pgp.mit.edu --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAknwwx0ACgkQdfRchrkBInmpJgCghi3zGWZuN3bg6whlf/gR9vh0 geQAn3k9Cn7SKvFj6az/FzyoFnI0CmPD =WwSk -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE--