Thierry Volpiatto <[EMAIL PROTECTED]> writes:

> Hello,
> It seem dvc-bookmarks-add-partner is broken:
> it use a list method (car) on a structure.
> so it fail with this error:
>
> ,----
> | format: Wrong type argument: listp, [cl-struct-dvc-bookmark .....
> `----
>
> So i modify dvc-bookmarks-add-partner like that:
> (i change the car with an aref)
> (i add an element :nickname to the make-...)
>
> ,----
> | (defun dvc-bookmarks-add-partner ()
> |   (interactive)
> |   (let* ((cur-data (dvc-bookmarks-current-bookmark))
> |          (partner-url (read-string (format "Add partner to '%s': " (aref 
> cur-data 1)))))
> |     (if (not (member partner-url (dvc-bookmarks-get-partner-urls)))
> |         (progn
> |           (setf (dvc-bookmark-properties cur-data)
> |                 (append (dvc-bookmark-properties cur-data)
> |                         (list (list 'partner
> |                                     (make-dvc-bookmark-partner :url 
> partner-url :nickname nil)))))
> |           (dvc-trace "dvc-bookmarks-add-partner %s" cur-data))
> |       (message "%s is already a partner for %s"
> |                partner-url (dvc-bookmark-name cur-data)))))
> `----
>
> That's working , now i can have that in my bookmarks now:
>
> ,----
> | traverse-work-el
> |   Partner (~/labo/traverse-module/ nil)
> `----
>
> And the function dvc-bookmarks-properties return for this bookmark:
>
> ,----
> | ((local-tree "~/labo/traverse-work-el/") 
> |  (push-locations ("ssh://thievol//home/thierry/labo/traverse-work-el")) 
> |  (partner ("~/labo/traverse-module/" nil)))
> `----
>
> Is it correct?
> How Partner is intended to work in dvc? (i use hg).
>
> Thanks.

Ok i reply to myself, after fixing the problem for
dvc-bookmarks-add-partner i found the toby's branch with the problem
fixed !!! It's ok it's raining this afternoon here. :)
Sorry for the noise.

But i found that now with this version of dvc-bookmarks-add-partner
dvc-bookmarks-remove-partner doesn't work!
So i write that, it's work for me:

# HG changeset patch
# User Thierry Volpiatto <thierry dot volpiatto hat gmail dot com>
# Date 1206983947 -7200
# Node ID b89e4e21e286b1ff3160e708d6a60ca98be12bd6
# Parent  aaf2a2c4ac6e6dd3a80717dc588efda8c4ce4906
Function dvc-bookmarks-remove-partner modified.

Ok working.

diff --git a/dvc-bookmarks.el b/dvc-bookmarks.el
--- a/dvc-bookmarks.el
+++ b/dvc-bookmarks.el
@@ -578,8 +578,8 @@ If FORCE is non-nil, reload the file eve
                                      (dvc-bookmark-name cur-data))
                              (dvc-bookmarks-get-partner-urls))))
     (setf (dvc-bookmark-properties cur-data)
-          (delete (list 'partner
-                        (make-dvc-bookmark-partner :url partner-to-remove))
+          (delete `(partner
+                   ,@(make-dvc-bookmark-partner :url partner-to-remove))
                   (dvc-bookmark-properties cur-data)))))
 
 (defun dvc-bookmarks-toggle-partner-visibility ()


-- 
A + Thierry
Pub key: http://pgp.mit.edu


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

Reply via email to