The patch below fixes the use of revision-ids in functions called by
dvc-revlist-diff and dvc-diff-ediff.
Some of the functions apparently were expecting back-end-revisions,
but getting revision-ids, and vice-versa.
I suspect there are other places with similar issues; I did not look
thoroughly, I was just trying to use dvc-diff-ediff.
I have a copyright assignment on file with FSF for Emacs.
--
-- Stephe
=== modified file 'lisp/bzr.el'
--- lisp/bzr.el 2007-04-08 15:10:40 +0000
+++ lisp/bzr.el 2007-04-09 01:12:36 +0000
@@ -742,7 +742,7 @@
`(bzr (revision (,(nth 0 data)
,(nth 1 data)
,(- (nth 2 data) n))))))
- (otherwise (error "TODO: not implemented. REV-ID=%S" rev_id))))
+ (otherwise (error "TODO: not implemented. REV-ID=%S" rev-id))))
(defun bzr-revision-id-to-string (rev-id)
"Turn a DVC revision ID to a bzr revision spec.
@@ -763,7 +763,7 @@
(let* ((previous-list (nth 1 rev-id))
(rev (nth 1 previous-list))
(n-prev (nth 2 previous-list)))
- (bzr-revision-nth-ancestor rev n-prev))))
+ (bzr-revision-nth-ancestor (list 'bzr rev) n-prev))))
(last-revision
(let* ((data (dvc-revision-get-data rev-id))
(num (nth 1 data)))
@@ -774,7 +774,7 @@
(defun bzr-revision-get-file-revision (file revision)
"Insert the content of FILE in REVISION, in current buffer.
-REVISION looks like
+REVISION is a back-end-revision, not a dvc revision-id. It looks like
\(local \"path\" NUM)."
(let ((bzr-rev
(if (eq (car (car revision)) 'local)
=== modified file 'lisp/dvc-core.el'
--- lisp/dvc-core.el 2007-03-26 19:22:55 +0000
+++ lisp/dvc-core.el 2007-04-09 01:12:36 +0000
@@ -1,6 +1,6 @@
;;; dvc-core.el --- Core functions for distributed version control
-;; Copyright (C) 2005-2006 by all contributors
+;; Copyright (C) 2005-2007 by all contributors
;; Author: Stefan Reichoer, <[EMAIL PROTECTED]>
;; Contributions From:
@@ -945,6 +945,8 @@
;; Revision manipulation
;;
+;; revision grammar is specified in ../docs/DVC-API
+
;; accessors
(defun dvc-revision-get-dvc (revision-id)
(car revision-id))
@@ -995,10 +997,11 @@
(let ((type (dvc-revision-get-type revision-id))
(inhibit-read-only t))
(if (eq type 'previous-revision)
- (funcall (dvc-function
- (dvc-revision-get-dvc revision-id)
- "revision-get-previous-revision")
- file (dvc-revision-get-data revision-id))
+ (let* ((dvc (dvc-revision-get-dvc revision-id))
+ (data (nth 0 (dvc-revision-get-data revision-id)))
+ (rev-id (list dvc data)))
+ (funcall (dvc-function dvc "revision-get-previous-revision")
+ file rev-id))
(let ((buffer (dvc-revision-get-buffer file revision-id)))
(with-current-buffer buffer
(case type
@@ -1020,14 +1023,11 @@
(defun dvc-revision-get-previous-revision (file revision)
"Default function to get the previous revision of a FILE.
-REVISION looks like
-\((baz (...)) 42).
-\(REV-ID N)."
+REVISION is documented in docs/DVC-API."
(dvc-trace "get-prev-rev. revision=%S" revision)
(dvc-revision-get-file-in-buffer
file
- (dvc-revision-nth-ancestor (nth 0 revision)
- (or (nth 1 revision) 1))))
+ (dvc-revision-nth-ancestor revision 1))))
(defun dvc-dvc-revision-nth-ancestor (revision n)
"Default function to get the n-th ancestor of REVISION."
_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev