[email protected] (Phillip Lord) writes:

> emacs -Q
>
> In *scratch* eval...
>
> (add-to-list 'load-path "~/emacs/packages/dvc/lisp")
> (require 'dvc-autoloads)
>
> success. 
>
> Navigate to ~/emacs/packages/dvc/lisp. Add a blank line to a one of the
> lisp files. 
>
> C-xVs (dvc-status) produces....
>
>
> modified:
>    modified      lisp/baz-dvc.el
> unknown:
>    unknown       texinfo/dvc.cp
>    unknown       texinfo/dvc.cps
>    unknown       texinfo/dvc.fn
>    unknown       texinfo/dvc.ky
>    unknown       texinfo/dvc.pdf
>    unknown       texinfo/dvc.pg
>    unknown       texinfo/dvc.toc
>    unknown       texinfo/dvc.tp
>    unknown       texinfo/dvc.vr
>                                   
>
> Place the cursor over "lisp/baz-dvc.el" (this is why you need to add a
> blank line). 
>
> = (dvc-diff-diff) produces ...
>
> Setting current directory: no such file or directory, lisp/

I can reproduce this, on the current dvc from bzr head.

As a work-around, you can use "e" instead of "=" (I just tried it). That
runs ediff, which I find much easier to use than plain diff. You can
open a second frame to hold the dvc-log-edit buffer to accumulate commit
comments. 

> or with Enter debugger turned on, this backtrace. 
>
>
> Debugger entered--Lisp error: (file-error "Setting current directory" "no 
> such file or directory" "lisp/")
>   call-process("diff" nil #<buffer *bzr-file-diff*<4>> nil "-u"
>   "-La/lisp/baz-dvc.el" "-Lb/lisp/baz-dvc.el"
>   "/tmp/DVC-file-diff-base4210oIM" "/tmp/DVC-file-diff-mod42101SS")

This appears to be a bug in dvc-diff.el dvc-dvc-file-diff .
'default-directory' for 'diff-buffer' is set to "lisp/", which is just
wrong ('default-directory' must always be an absolute path).

Actually, the bug is in dvc-buffers.el dvc-get-buffer-create:

                          (let ((default-directory
                                  (or (file-name-directory path)
                                      default-directory)))
                            (dvc-create-buffer name)))))


at this point, 'path' is "lisp/baz-dvc.el", so it sets default-directory
incorrectly. This is fixed by:

                          (let ((default-directory
                                  (if (file-name-directory path)
                                      (expand-file-name (file-name-directory 
path))
                                    default-directory)))


Committed in local revision 555.

-- 
-- Stephe

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to