Hi Thierry!

> Thierry Volpiatto <[EMAIL PROTECTED]> writes:
>
>> Hello, dvc-bookmarks-pull and dvc-bookmarks-missing don't support path
>> like "~/some_path" when pulling or "missing" from a partner.
>>
>> I didn't find how to do a patch from bzr.

Since you use gnus as MUA, just do M-x dvc-submit-patch

This makes it very easy for me to apply the patch.

> These changes are not working or only partially.
> They work on partner but not on local-tree.
> I did new changes and in all the cases i tried it's work.
> Here is the patche, if some body can test it?
> This patche has been done on the very last version of toby's branch.
> It allow to enter path like "~/my-directory" in partner.
> Hope it work in all cases.
>
> --8<---------------cut here---------------start------------->8---
> # HG changeset patch
> # User Thierry Volpiatto <thierry dot volpiatto hat gmail dot com>
> # Date 1207152902 -7200
> # Node ID dd669188cc6fa4af589b3886ded02df8fc40782f
> # Parent  a3aac7ce600b1156df61e21e9850aff440f4abab
> Modify dvc-bookmarks-missing and dvc-bookmarks-pull.
>
> diff --git a/dvc-bookmarks.el b/dvc-bookmarks.el
> --- a/dvc-bookmarks.el
> +++ b/dvc-bookmarks.el
> @@ -410,12 +410,17 @@
>            (dvc-log))
>        (message "No local-tree defined for this bookmark entry."))))
>  
> +
>  (defun dvc-bookmarks-missing ()
>    (interactive)
>    (let ((local-tree (dvc-bookmarks-current-value 'local-tree)))
>      (if local-tree
> -        (let ((default-directory local-tree)
> -              (partner (or (dvc-bookmarks-partner-at-point) 
> (dvc-bookmarks-marked-value 'local-tree))))
> +        (let* ((default-directory local-tree)
> +            (abs-partner (if (and (stringp (dvc-bookmarks-partner-at-point))
> +                                  (file-directory-p 
> (dvc-bookmarks-partner-at-point)))
> +                             (expand-file-name 
> (dvc-bookmarks-partner-at-point))
> +                           (dvc-bookmarks-partner-at-point)))
> +              (partner (or abs-partner (dvc-bookmarks-marked-value 
> 'local-tree))))
>            (message "Running dvc missing for %s, against %s"
>                     (dvc-bookmark-name (dvc-bookmarks-current-bookmark))
>                     partner)
> @@ -428,7 +433,10 @@
>    (let ((local-tree (dvc-bookmarks-current-value 'local-tree)))
>      (if local-tree
>          (let ((default-directory local-tree)
> -              (partner (dvc-bookmarks-partner-at-point))
> +              (partner (if (and (stringp (dvc-bookmarks-partner-at-point))
> +                                      (file-directory-p 
> (dvc-bookmarks-partner-at-point)))
> +                        (expand-file-name (dvc-bookmarks-partner-at-point))
> +                      (dvc-bookmarks-partner-at-point)))
>                (nickname (dvc-bookmarks-nickname-at-point)))
>            (message (if partner
>                         (if nickname
> @@ -437,6 +445,7 @@
>                       "Pulling from default location"))
>            (dvc-pull partner))
>        (message "No local-tree defined for this bookmark entry."))))
> +
>  
>  (defun dvc-bookmarks-push ()
>    (interactive)
> --8<---------------cut here---------------end--------------->8---

Thanks for the patch. I have committed a similar fix now:
dvc-bookmarks-partner-at-point expands the file-name.


Stefan.

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

Reply via email to