You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mattias Engdeg�rd <ma...@virtutech.se> on 2006/02/09 14:01:39 UTC

resurrect vc-svn.el

Can we please resurrect vc-svn.el?

It was replaced with a stub saying that it lives in the FSF Emacs tree.
However, this version does not work at all with any released Emacs version
since it uses functions and constructs that only exists in development
versions.

Alternatively, the Emacs maintainers could be asked to put a working
version of vc-svn.el in their stable distribution, but I don't want it
to be victim of any bickering about in whose tree it belongs. I think
the pragmatic choice would be for it to live in Subversion until an
Emacs with their (no doubt vastly improved) vc-mode is released.

In addition, you may want to apply this patch (to r9195), which
adds annotate (C-x v g) and version checkout (C-x v ~) abilities:

--- vc-svn.el.r9195     2006-01-27 18:42:35.000000000 +0100
+++ vc-svn.el           2006-01-27 18:44:09.000000000 +0100
@@ -294,15 +294,18 @@ check out the head of the trunk.  For Su
 passing nil.
 If optional arg DESTFILE is given, it is an alternate filename to
 write the contents to; we raise an error."
-  (unless editable
-    (error "VC asked Subversion to check out a read-only copy of file"))
-  (when destfile
-    (error "VC asked Subversion to check out a file under another name"))
-  (when (equal rev "")
-    (setq rev nil))
-  (apply 'vc-do-command nil 0 vc-svn-program-name file
-         "update" (if rev (list "-r" rev) '()))
-  (vc-file-setprop file 'vc-workfile-version nil))
+  (if editable
+      (progn
+       (when destfile
+         (error "VC asked Subversion to check out a file under another name"))
+       (when (equal rev "")
+         (setq rev nil))
+       (apply 'vc-do-command nil 0 vc-svn-program-name file
+              "update" (if rev (list "-r" rev) '()))
+       (vc-file-setprop file 'vc-workfile-version nil))
+      (with-temp-file destfile
+       (apply 'vc-do-command t 0 vc-svn-program-name file
+              "cat" (if (equal rev "") '() (list "-r" rev))))))
 
 
 (defun vc-svn-revert (file &optional contents-done)
@@ -411,4 +414,15 @@ This function returns a status of either
   (vc-do-command buffer 0 vc-svn-program-name file 
          "cat" "-r" rev))
 
+(defun vc-svn-annotate-command (file buffer &optional version)
+  "Execute \"svn annotate\" on FILE, inserting the contents in BUFFER.
+Optional arg VERSION is a revision to annotate from."
+  (vc-do-command buffer 0 vc-svn-program-name file "annotate"
+                (if version (concat "-r" version))))
+
+(defun vc-svn-annotate-difference (point)
+  "Difference between the time of the line and the current time.
+Return values are as defined for `current-time'."
+  nil)                                 ; don't bother with differences
+
 (provide 'vc-svn)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: resurrect vc-svn.el

Posted by kf...@collab.net.
Mattias Engdegård <ma...@virtutech.se> writes:
> >Can you test your patch with the restored r13113 version of vc-svn.el
> >and let us know if we should still apply it?
> 
> Yes, it should be applied.

Done, see r18452.  (If you could provide the log message and necessary
doc string tweaks next time, that'd be great.)

Thanks,
-Karl

-- 
www.collab.net  <>  CollabNet  |  Distributed Development On Demand

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: resurrect vc-svn.el

Posted by Mattias Engdeg�rd <ma...@virtutech.se>.
kfogel@collab.net writes:

>Done in r18449, good idea.

Excellent, thank you.

>Can you test your patch with the restored r13113 version of vc-svn.el
>and let us know if we should still apply it?

Yes, it should be applied.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: resurrect vc-svn.el

Posted by kf...@collab.net.
Mattias Engdegård <ma...@virtutech.se> writes:
> Can we please resurrect vc-svn.el?
> 
> It was replaced with a stub saying that it lives in the FSF Emacs tree.
> However, this version does not work at all with any released Emacs version
> since it uses functions and constructs that only exists in development
> versions.
> 
> Alternatively, the Emacs maintainers could be asked to put a working
> version of vc-svn.el in their stable distribution, but I don't want it
> to be victim of any bickering about in whose tree it belongs. I think
> the pragmatic choice would be for it to live in Subversion until an
> Emacs with their (no doubt vastly improved) vc-mode is released.

Done in r18449, good idea.

> In addition, you may want to apply this patch (to r9195), which
> adds annotate (C-x v g) and version checkout (C-x v ~) abilities:

Can you test your patch with the restored r13113 version of vc-svn.el
and let us know if we should still apply it?

Thanks,
-Karl

> --- vc-svn.el.r9195     2006-01-27 18:42:35.000000000 +0100
> +++ vc-svn.el           2006-01-27 18:44:09.000000000 +0100
> @@ -294,15 +294,18 @@ check out the head of the trunk.  For Su
>  passing nil.
>  If optional arg DESTFILE is given, it is an alternate filename to
>  write the contents to; we raise an error."
> -  (unless editable
> -    (error "VC asked Subversion to check out a read-only copy of file"))
> -  (when destfile
> -    (error "VC asked Subversion to check out a file under another name"))
> -  (when (equal rev "")
> -    (setq rev nil))
> -  (apply 'vc-do-command nil 0 vc-svn-program-name file
> -         "update" (if rev (list "-r" rev) '()))
> -  (vc-file-setprop file 'vc-workfile-version nil))
> +  (if editable
> +      (progn
> +       (when destfile
> +         (error "VC asked Subversion to check out a file under another name"))
> +       (when (equal rev "")
> +         (setq rev nil))
> +       (apply 'vc-do-command nil 0 vc-svn-program-name file
> +              "update" (if rev (list "-r" rev) '()))
> +       (vc-file-setprop file 'vc-workfile-version nil))
> +      (with-temp-file destfile
> +       (apply 'vc-do-command t 0 vc-svn-program-name file
> +              "cat" (if (equal rev "") '() (list "-r" rev))))))
>  
>  
>  (defun vc-svn-revert (file &optional contents-done)
> @@ -411,4 +414,15 @@ This function returns a status of either
>    (vc-do-command buffer 0 vc-svn-program-name file 
>           "cat" "-r" rev))
>  
> +(defun vc-svn-annotate-command (file buffer &optional version)
> +  "Execute \"svn annotate\" on FILE, inserting the contents in BUFFER.
> +Optional arg VERSION is a revision to annotate from."
> +  (vc-do-command buffer 0 vc-svn-program-name file "annotate"
> +                (if version (concat "-r" version))))
> +
> +(defun vc-svn-annotate-difference (point)
> +  "Difference between the time of the line and the current time.
> +Return values are as defined for `current-time'."
> +  nil)                                 ; don't bother with differences
> +
>  (provide 'vc-svn)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 

-- 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org