|
svn commit: r13131 - trunk/contrib/client-side/psvn: msg#00306version-control.subversion.svn
Author: xsteve Date: Wed Feb 23 14:32:18 2005 New Revision: 13131 Modified: trunk/contrib/client-side/psvn/psvn.el Log: Added a function to copy the actual filename to the kill-ring * trunk/contrib/client-side/psvn/psvn.el: (svn-status-copy-filename-as-kill): New function, bound to w (svn-status-svnversion): Instead of nil show '.' for files in the root directory of the working copy. Modified: trunk/contrib/client-side/psvn/psvn.el Url: http://svn.collab.net/viewcvs/svn/trunk/contrib/client-side/psvn/psvn.el?view=diff&rev=13131&p1=trunk/contrib/client-side/psvn/psvn.el&r1=13130&p2=trunk/contrib/client-side/psvn/psvn.el&r2=13131 ============================================================================== --- trunk/contrib/client-side/psvn/psvn.el (original) +++ trunk/contrib/client-side/psvn/psvn.el Wed Feb 23 14:32:18 2005 @@ -60,6 +60,7 @@ ;; m - svn-status-set-user-mark ;; u - svn-status-unset-user-mark ;; $ - svn-status-toggle-elide +;; w - svn-status-copy-filename-as-kill ;; DEL - svn-status-unset-user-mark-backwards ;; * ! - svn-status-unset-all-usermarks ;; * ? - svn-status-mark-unknown @@ -817,6 +818,7 @@ (kbd "DEL")) ; GNU Emacs 'svn-status-unset-user-mark-backwards) (define-key svn-status-mode-map (kbd "$") 'svn-status-toggle-elide) + (define-key svn-status-mode-map (kbd "w") 'svn-status-copy-filename-as-kill) (define-key svn-status-mode-map (kbd ".") 'svn-status-goto-root-or-return) (define-key svn-status-mode-map (kbd "I") 'svn-status-parse-info) (define-key svn-status-mode-map (kbd "V") 'svn-status-svnversion) @@ -1171,6 +1173,16 @@ (defun svn-status-line-info->set-lastchangerev (line-info value) (setcar (nthcdr 5 line-info) value)) +(defun svn-status-copy-filename-as-kill (arg) + "Copy the actual file name to the kill-ring. +When called with the prefix argument 0, use the full path name." + (interactive "P") + (let ((str (if (eq arg 0) + (svn-status-line-info->full-path (svn-status-get-line-information)) + (svn-status-line-info->filename (svn-status-get-line-information))))) + (kill-new str) + (message "Copied %s" str))) + (defun svn-status-toggle-elide () (interactive) (let ((st-info svn-status-info) @@ -2135,7 +2147,7 @@ (full-path (svn-status-line-info->full-path (svn-status-get-line-information))) (version)) (unless (file-directory-p simple-path) - (setq simple-path (file-name-directory simple-path)) + (setq simple-path (or (file-name-directory simple-path) ".")) (setq full-path (file-name-directory full-path))) (setq version (shell-command-to-string (concat "svnversion -n " full-path))) (message (format "svnversion for '%s': %s" simple-path version)) |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | svn commit: r13130 - branches/1.1.x: 00306, philip-jqHnx1hy4Dsdnm+yROfE0A |
|---|---|
| Next by Date: | svn commit: r13132 - trunk/www: 00306, sussman-jqHnx1hy4Dsdnm+yROfE0A |
| Previous by Thread: | svn commit: r13130 - branches/1.1.xi: 00306, philip-jqHnx1hy4Dsdnm+yROfE0A |
| Next by Thread: | svn commit: r13132 - trunk/www: 00306, sussman-jqHnx1hy4Dsdnm+yROfE0A |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |