emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vc-bzr sha1sum dependency


From: Leo
Subject: Re: vc-bzr sha1sum dependency
Date: Tue, 21 Apr 2009 21:24:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

On 2009-04-21 18:26 +0100, Mike Mattie wrote:
> I was recently bit by the fact that vc-bzr uses sha1sum, and external program
> to compute the state of a file in vc-bzr-state-heuristic.
>
> This depedency is suprising and buried rather deep. I looked at the code in 
> question
> and discovered that vc-bzr is picking apart an internal bzr file to find the 
> state
> of a file, bypassing the now expensive call to bzr status.

I used to use the following code but I no longer use bzr or windows.

;;; re-define vc-bzr-sha1 to work in windows
(require 'vc-bzr)
(defun vc-bzr-sha1 (file)
  (let ((sha1-use-external nil))
    (with-temp-buffer
      (set-buffer-multibyte nil)
      (insert-file-contents file)
      (sha1-region (point-min) (point-max)))))

Best wishes,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.

               www.git-scm.com
    git - the one true version control system





reply via email to

[Prev in Thread] Current Thread [Next in Thread]