- update to 1.3.2
- fix Ruby sitelibdir (Garrick Staples, #191611) - own /etc/subversion (#189071) - update to psvn.el r19857
This commit is contained in:
parent
9fb54b85f8
commit
699a1a9e25
@ -1,2 +1,5 @@
|
||||
subversion-1.3.0.tar.gz
|
||||
subversion-1.2.3-3.src.rpm subversion-1.2.3-5.src.rpm
|
||||
*.src.rpm
|
||||
*.tar.gz
|
||||
x86_64
|
||||
subversion-1.3.2
|
||||
clog
|
||||
|
355
psvn.el
355
psvn.el
@ -2,7 +2,7 @@
|
||||
;; Copyright (C) 2002-2006 by Stefan Reichoer
|
||||
|
||||
;; Author: Stefan Reichoer, <stefan@xsteve.at>
|
||||
;; $Id: psvn.el 19138 2006-04-03 19:10:26Z xsteve $
|
||||
;; $Id: psvn.el 19857 2006-05-30 20:36:48Z xsteve $
|
||||
|
||||
;; psvn.el is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
@ -28,7 +28,10 @@
|
||||
;; (see http://subversion.tigris.org)
|
||||
;; psvn.el provides a similar interface for subversion as pcl-cvs for cvs.
|
||||
;; At the moment the following commands are implemented:
|
||||
;;
|
||||
;; M-x svn-status: run 'svn -status -v'
|
||||
;; M-x svn-examine (like pcl-cvs cvs-examine) is alias for svn-status
|
||||
;;
|
||||
;; and show the result in the svn-status-buffer-name buffer (normally: *svn-status*).
|
||||
;; If svn-status-verbose is set to nil, only "svn status" without "-v"
|
||||
;; is run. Currently you have to toggle this variable manually.
|
||||
@ -143,7 +146,8 @@
|
||||
;; * help (?, h)
|
||||
;; * import
|
||||
;; * info implemented
|
||||
;; * list (ls)
|
||||
;; * list (ls) implemented
|
||||
;; * lock
|
||||
;; * log implemented
|
||||
;; * merge
|
||||
;; * mkdir implemented
|
||||
@ -157,6 +161,7 @@
|
||||
;; * revert implemented
|
||||
;; * status (stat, st) implemented
|
||||
;; * switch (sw)
|
||||
;; * unlock
|
||||
;; * update (up) implemented
|
||||
|
||||
;; For the not yet implemented commands you should use the command line
|
||||
@ -191,6 +196,9 @@
|
||||
(require 'diff-mode))
|
||||
(error nil))
|
||||
|
||||
(defconst svn-psvn-revision "$Id: psvn.el 19857 2006-05-30 20:36:48Z xsteve $"
|
||||
"The revision number of psvn.")
|
||||
|
||||
;;; user setable variables
|
||||
(defcustom svn-status-verbose t
|
||||
"*Add '-v' to svn status call."
|
||||
@ -467,7 +475,7 @@ If t, their full path name will be displayed, else only the filename."
|
||||
(defvar svn-process-cmd nil)
|
||||
(defvar svn-status-info nil)
|
||||
(defvar svn-status-filename-to-buffer-position-cache (make-hash-table :test 'equal :weakness t))
|
||||
(defvar svn-status-base-info nil)
|
||||
(defvar svn-status-base-info nil "The parsed result from the svn info command.")
|
||||
(defvar svn-status-initial-window-configuration nil)
|
||||
(defvar svn-status-default-column 23)
|
||||
(defvar svn-status-default-revision-width 4)
|
||||
@ -522,6 +530,8 @@ This is nil if the log entry is for a new commit.")
|
||||
;; already implied by "-function" suffix
|
||||
(defvar svn-status-get-specific-revision-file-info)
|
||||
(defvar svn-status-last-output-buffer-name)
|
||||
(defvar svn-status-pre-run-svn-buffer nil)
|
||||
(defvar svn-status-update-list nil)
|
||||
(defvar svn-transient-buffers)
|
||||
(defvar svn-ediff-windows)
|
||||
(defvar svn-ediff-result)
|
||||
@ -729,8 +739,9 @@ To bind this to a different key, customize `svn-status-prefix-key'.")
|
||||
(define-key svn-global-keymap (kbd "l") 'svn-status-show-svn-log)
|
||||
(define-key svn-global-keymap (kbd "u") 'svn-status-update-cmd)
|
||||
(define-key svn-global-keymap (kbd "=") 'svn-status-show-svn-diff)
|
||||
(define-key svn-global-keymap (kbd "b") 'svn-status-blame)
|
||||
(define-key svn-global-keymap (kbd "c") 'svn-status-commit)
|
||||
(define-key svn-global-keymap (kbd "b") 'svn-status-switch-to-status-buffer)
|
||||
(define-key svn-global-keymap (kbd "S") 'svn-status-switch-to-status-buffer)
|
||||
(define-key svn-global-keymap (kbd "o") 'svn-status-pop-to-status-buffer))
|
||||
|
||||
(defvar svn-status-diff-mode-map ()
|
||||
@ -787,53 +798,80 @@ inside loops."
|
||||
if (listp item) nconc (svn-status-flatten-list item)
|
||||
else collect item))
|
||||
|
||||
(defvar svn-status-display-new-status-buffer nil)
|
||||
|
||||
|
||||
;;;###autoload (defalias 'svn-examine 'svn-status)
|
||||
(defalias 'svn-examine 'svn-status)
|
||||
|
||||
;;;###autoload
|
||||
(defun svn-status (dir &optional arg)
|
||||
"Examine the status of Subversion working copy in directory DIR.
|
||||
If ARG is -, allow editing of the parameters. One could add -N to
|
||||
run svn status non recursively to make it faster.
|
||||
For every other non nil ARG pass the -u argument to `svn status'."
|
||||
For every other non nil ARG pass the -u argument to `svn status'.
|
||||
|
||||
If there is no .svn directory, examine if there is SVN and run
|
||||
`cvs-examine'. Otherwise ask if to run `dired'."
|
||||
(interactive (list (svn-read-directory-name "SVN status directory: "
|
||||
nil default-directory nil)
|
||||
current-prefix-arg))
|
||||
(setq arg (svn-status-possibly-negate-meaning-of-arg arg 'svn-status))
|
||||
(let ((svn-dir (format "%s%s"
|
||||
(file-name-as-directory dir)
|
||||
(svn-wc-adm-dir-name)))
|
||||
(cvs-dir (format "%sCVS" (file-name-as-directory dir))))
|
||||
(cond
|
||||
((file-directory-p svn-dir)
|
||||
(setq arg (svn-status-possibly-negate-meaning-of-arg arg 'svn-status))
|
||||
(svn-status-1 dir arg))
|
||||
((and (file-directory-p cvs-dir)
|
||||
(fboundp 'cvs-examine))
|
||||
(cvs-examine dir nil))
|
||||
(t
|
||||
(when (y-or-n-p
|
||||
(format
|
||||
(concat
|
||||
"%s "
|
||||
"is not Subversion controlled (missing %s "
|
||||
"directory). "
|
||||
"Run dired instead? ")
|
||||
dir
|
||||
(svn-wc-adm-dir-name)))
|
||||
(dired dir))))))
|
||||
|
||||
(defvar svn-status-display-new-status-buffer nil)
|
||||
(defun svn-status-1 (dir &optional arg)
|
||||
"Examine DIR. See `svn-status' for more information."
|
||||
(unless (file-directory-p dir)
|
||||
(error "%s is not a directory" dir))
|
||||
(if (not (file-exists-p (concat dir "/" (svn-wc-adm-dir-name) "/")))
|
||||
(when (y-or-n-p
|
||||
(concat dir
|
||||
" does not seem to be a Subversion working copy (no "
|
||||
(svn-wc-adm-dir-name) " directory). "
|
||||
"Run dired instead? "))
|
||||
(dired dir))
|
||||
(setq dir (file-name-as-directory dir))
|
||||
(when svn-status-load-state-before-svn-status
|
||||
(unless (string= dir (car svn-status-directory-history))
|
||||
(svn-status-load-state t)))
|
||||
(setq svn-status-directory-history (delete dir svn-status-directory-history))
|
||||
(add-to-list 'svn-status-directory-history dir)
|
||||
(if (string= (buffer-name) svn-status-buffer-name)
|
||||
(setq svn-status-display-new-status-buffer nil)
|
||||
(setq svn-status-display-new-status-buffer t)
|
||||
;;(message "psvn: Saving initial window configuration")
|
||||
(setq svn-status-initial-window-configuration (current-window-configuration)))
|
||||
(let* ((status-buf (get-buffer-create svn-status-buffer-name))
|
||||
(proc-buf (get-buffer-create "*svn-process*"))
|
||||
(want-edit (eq arg '-))
|
||||
(status-option (if want-edit
|
||||
(if svn-status-verbose "-v" "")
|
||||
(if svn-status-verbose
|
||||
(if arg "-uv" "-v")
|
||||
(if arg "-u" ""))))
|
||||
(svn-status-edit-svn-command (or want-edit svn-status-edit-svn-command)))
|
||||
(save-excursion
|
||||
(set-buffer status-buf)
|
||||
(setq default-directory dir)
|
||||
(set-buffer proc-buf)
|
||||
(setq default-directory dir
|
||||
svn-status-remote (when arg t))
|
||||
(svn-run t t 'status "status" status-option)))))
|
||||
(setq dir (file-name-as-directory dir))
|
||||
(when svn-status-load-state-before-svn-status
|
||||
(unless (string= dir (car svn-status-directory-history))
|
||||
(svn-status-load-state t)))
|
||||
(setq svn-status-directory-history (delete dir svn-status-directory-history))
|
||||
(add-to-list 'svn-status-directory-history dir)
|
||||
(if (string= (buffer-name) svn-status-buffer-name)
|
||||
(setq svn-status-display-new-status-buffer nil)
|
||||
(setq svn-status-display-new-status-buffer t)
|
||||
;;(message "psvn: Saving initial window configuration")
|
||||
(setq svn-status-initial-window-configuration
|
||||
(current-window-configuration)))
|
||||
(let* ((status-buf (get-buffer-create svn-status-buffer-name))
|
||||
(proc-buf (get-buffer-create "*svn-process*"))
|
||||
(want-edit (eq arg '-))
|
||||
(status-option (if want-edit
|
||||
(if svn-status-verbose "-v" "")
|
||||
(if svn-status-verbose
|
||||
(if arg "-uv" "-v")
|
||||
(if arg "-u" ""))))
|
||||
(svn-status-edit-svn-command
|
||||
(or want-edit svn-status-edit-svn-command)))
|
||||
(save-excursion
|
||||
(set-buffer status-buf)
|
||||
(setq default-directory dir)
|
||||
(set-buffer proc-buf)
|
||||
(setq default-directory dir
|
||||
svn-status-remote (when arg t))
|
||||
(svn-run t t 'status "status" status-option))))
|
||||
|
||||
(defun svn-status-this-directory (arg)
|
||||
"Run `svn-status' for the `default-directory'"
|
||||
@ -945,11 +983,12 @@ can edit ARGLIST before running svn."
|
||||
;; never opens a pseudoterminal.
|
||||
(apply 'call-process svn-exe nil proc-buf nil arglist))
|
||||
(setq svn-status-mode-line-process-status "")
|
||||
(svn-status-update-mode-line)))))
|
||||
(svn-status-update-mode-line)))
|
||||
(setq svn-status-pre-run-svn-buffer (current-buffer))))
|
||||
(error "You can only run one svn process at once!")))
|
||||
|
||||
(defun svn-process-sentinel-fixup-path-seperators ()
|
||||
"Convert all path separators to UNIX style.
|
||||
"Convert all path separators to UNIX style.
|
||||
\(This is a no-op unless `system-type' is windows-nt\)"
|
||||
(when (eq system-type 'windows-nt)
|
||||
(save-excursion
|
||||
@ -978,6 +1017,11 @@ can edit ARGLIST before running svn."
|
||||
(insert svn-status-update-previous-process-output)
|
||||
(goto-char (point-min))
|
||||
(setq svn-status-update-previous-process-output nil))
|
||||
(when svn-status-update-list
|
||||
;; (message "Using svn-status-update-list: %S" svn-status-update-list)
|
||||
(save-excursion
|
||||
(svn-status-update-with-command-list svn-status-update-list))
|
||||
(setq svn-status-update-list nil))
|
||||
(when svn-status-display-new-status-buffer
|
||||
(set-window-configuration svn-status-initial-window-configuration)
|
||||
(if (svn-had-user-input-since-asynch-run)
|
||||
@ -993,10 +1037,17 @@ can edit ARGLIST before running svn."
|
||||
((eq svn-process-cmd 'info)
|
||||
(svn-status-show-process-output 'info t)
|
||||
(message "svn info finished"))
|
||||
((eq svn-process-cmd 'ls)
|
||||
(svn-status-show-process-output 'info t)
|
||||
(message "svn ls finished"))
|
||||
((eq svn-process-cmd 'parse-info)
|
||||
(svn-status-parse-info-result))
|
||||
((eq svn-process-cmd 'blame)
|
||||
(svn-status-show-process-output 'blame t)
|
||||
(when svn-status-pre-run-svn-buffer
|
||||
(with-current-buffer svn-status-pre-run-svn-buffer
|
||||
(unless (eq major-mode 'svn-status-mode)
|
||||
(goto-line (line-number-at-pos) (get-buffer svn-status-last-output-buffer-name)))))
|
||||
(message "svn blame finished"))
|
||||
((eq svn-process-cmd 'commit)
|
||||
(svn-process-sentinel-fixup-path-seperators)
|
||||
@ -1010,6 +1061,7 @@ can edit ARGLIST before running svn."
|
||||
(message "svn commit finished"))
|
||||
((eq svn-process-cmd 'update)
|
||||
(svn-status-show-process-output 'update t)
|
||||
(setq svn-status-update-list (svn-status-parse-update-output))
|
||||
(svn-status-update)
|
||||
(message "svn update finished"))
|
||||
((eq svn-process-cmd 'add)
|
||||
@ -1041,7 +1093,9 @@ can edit ARGLIST before running svn."
|
||||
(svn-status-property-parse-property-names))
|
||||
((eq svn-process-cmd 'propset)
|
||||
(svn-status-remove-temp-file-maybe)
|
||||
(svn-status-update))
|
||||
(if (member svn-status-propedit-property-name '("svn:keywords"))
|
||||
(svn-status-update-with-command-list (svn-status-parse-property-output))
|
||||
(svn-status-update)))
|
||||
((eq svn-process-cmd 'propdel)
|
||||
(svn-status-update))))
|
||||
((string= event "killed\n")
|
||||
@ -1810,7 +1864,7 @@ When called with the prefix argument 0, use the full path name."
|
||||
;;(message "found: %S" found)
|
||||
(unless found (setq st-info (cdr st-info))))
|
||||
(unless found
|
||||
(message "continue to search for %s" (caar cmd-list))
|
||||
(svn-status-message 3 "psvn: continue to search for %s" (caar cmd-list))
|
||||
(setq st-info svn-status-info)
|
||||
(while (and (not found) st-info)
|
||||
(setq found (string= (caar cmd-list) (svn-status-line-info->filename (car st-info))))
|
||||
@ -1821,7 +1875,7 @@ When called with the prefix argument 0, use the full path name."
|
||||
(setq action (cadar cmd-list))
|
||||
;;(message "found %s, action: %S" (caar cmd-list) action)
|
||||
(svn-status-annotate-status-buffer-entry action (car st-info)))
|
||||
(message "did not find %s" (caar cmd-list)))
|
||||
(svn-status-message 3 "psvn: did not find %s" (caar cmd-list)))
|
||||
(setq cmd-list (cdr cmd-list)))
|
||||
(if fname
|
||||
(progn
|
||||
@ -1845,6 +1899,11 @@ When called with the prefix argument 0, use the full path name."
|
||||
(setq tag-string " <deleted>"))
|
||||
((equal action 'replaced)
|
||||
(setq tag-string " <replaced>"))
|
||||
((equal action 'updated)
|
||||
(setq tag-string " <updated>"))
|
||||
((equal action 'propset)
|
||||
;;(setq tag-string " <propset>")
|
||||
(svn-status-line-info->set-propmark line-info svn-status-file-modified-after-save-flag))
|
||||
((equal action 'added-wc)
|
||||
(svn-status-line-info->set-filemark line-info ?A)
|
||||
(svn-status-line-info->set-localrev line-info 0))
|
||||
@ -1941,9 +2000,63 @@ Return a list that is suitable for `svn-status-update-with-command-list'"
|
||||
(setq skip nil))
|
||||
(forward-line 1))
|
||||
result)))
|
||||
;;(svn-status-parse-ar-output)
|
||||
;; (svn-status-parse-ar-output)
|
||||
;; (svn-status-update-with-command-list (svn-status-parse-ar-output))
|
||||
|
||||
(defun svn-status-parse-update-output ()
|
||||
"Parse the output of svn update.
|
||||
Return a list that is suitable for `svn-status-update-with-command-list'"
|
||||
(save-excursion
|
||||
(set-buffer "*svn-process*")
|
||||
(let ((action)
|
||||
(name)
|
||||
(skip)
|
||||
(result))
|
||||
(goto-char (point-min))
|
||||
(while (< (point) (point-max))
|
||||
(cond ((= (svn-point-at-eol) (svn-point-at-bol)) ;skip blank lines
|
||||
(setq skip t))
|
||||
((looking-at "Updated to")
|
||||
(setq skip t))
|
||||
((looking-at "At revision")
|
||||
(setq skip t))
|
||||
((looking-at "U")
|
||||
(setq action 'updated))
|
||||
((looking-at "A")
|
||||
(setq action 'added))
|
||||
((looking-at "D")
|
||||
(setq skip t))
|
||||
;;(setq action 'deleted)) ;;deleted files are not displayed in the svn status output.
|
||||
(t ;; this should never be needed(?)
|
||||
(setq action 'unknown)))
|
||||
(unless skip ;found an interesting line
|
||||
(forward-char 3)
|
||||
(setq name (buffer-substring-no-properties (point) (svn-point-at-eol)))
|
||||
(setq result (cons (list name action)
|
||||
result))
|
||||
(setq skip nil))
|
||||
(forward-line 1))
|
||||
result)))
|
||||
;; (svn-status-parse-update-output)
|
||||
;; (svn-status-update-with-command-list (svn-status-parse-update-output))
|
||||
|
||||
(defun svn-status-parse-property-output ()
|
||||
"Parse the output of svn propset.
|
||||
Return a list that is suitable for `svn-status-update-with-command-list'"
|
||||
(save-excursion
|
||||
(set-buffer "*svn-process*")
|
||||
(let ((result))
|
||||
(dolist (line (split-string (buffer-substring-no-properties (point-min) (point-max)) "\n"))
|
||||
(message "%s" line)
|
||||
(when (string-match "property '\\(.+\\)' set on '\\(.+\\)'" line)
|
||||
;;(message "property %s - file %s" (match-string 1 line) (match-string 2 line))
|
||||
(setq result (cons (list (match-string 2 line) 'propset) result))))
|
||||
result)))
|
||||
|
||||
;; (svn-status-parse-property-output)
|
||||
;; (svn-status-update-with-command-list (svn-status-parse-property-output))
|
||||
|
||||
|
||||
(defun svn-status-line-info->symlink-p (line-info)
|
||||
"Return non-nil if LINE-INFO refers to a symlink, nil otherwise.
|
||||
The value is the name of the file to which it is linked. \(See
|
||||
@ -2062,6 +2175,7 @@ Symbolic links to directories count as directories (see `file-directory-p')."
|
||||
(custom-hide-count 0) ;how many files are hidden via svn-status-custom-hide-function
|
||||
(marked-count 0) ;how many files are elided
|
||||
(user-elide-count 0)
|
||||
(first-line t)
|
||||
(fname (svn-status-line-info->filename (svn-status-get-line-information)))
|
||||
(fname-pos (point))
|
||||
(header-line-string)
|
||||
@ -2071,9 +2185,10 @@ Symbolic links to directories count as directories (see `file-directory-p')."
|
||||
;; Insert all files and directories
|
||||
(while st-info
|
||||
(setq start-pos (point))
|
||||
(cond ((svn-status-line-info->has-usermark (car st-info))
|
||||
;; Show a marked file always
|
||||
(svn-insert-line-in-status-buffer (car st-info)))
|
||||
(cond ((or (svn-status-line-info->has-usermark (car st-info)) first-line)
|
||||
;; Show a marked file and the "." always
|
||||
(svn-insert-line-in-status-buffer (car st-info))
|
||||
(setq first-line nil))
|
||||
((svn-status-line-info->update-available (car st-info))
|
||||
(svn-insert-line-in-status-buffer (car st-info)))
|
||||
((and svn-status-custom-hide-function
|
||||
@ -2151,21 +2266,51 @@ non-interactive use."
|
||||
(svn-status-update-buffer)))
|
||||
|
||||
(defun svn-status-parse-info-result ()
|
||||
(let ((url))
|
||||
"Parse the result from the svn info command.
|
||||
Put the found values in `svn-status-base-info'."
|
||||
(let ((url)
|
||||
(repository-root))
|
||||
(save-excursion
|
||||
(set-buffer "*svn-process*")
|
||||
(goto-char (point-min))
|
||||
(let ((case-fold-search t))
|
||||
(search-forward "url: "))
|
||||
(setq url (buffer-substring-no-properties (point) (svn-point-at-eol))))
|
||||
(setq svn-status-base-info `((url ,url)))))
|
||||
(search-forward "url: ")
|
||||
(setq url (buffer-substring-no-properties (point) (svn-point-at-eol)))
|
||||
(search-forward "repository root: ")
|
||||
(setq repository-root (buffer-substring-no-properties (point) (svn-point-at-eol)))))
|
||||
(setq svn-status-base-info `((url ,url) (repository-root ,repository-root)))))
|
||||
|
||||
(defun svn-status-base-info->url ()
|
||||
"Extract the url part from `svn-status-base-info'."
|
||||
(if svn-status-base-info
|
||||
(cadr (assoc 'url svn-status-base-info))
|
||||
""))
|
||||
|
||||
(defun svn-status-base-info->repository-root ()
|
||||
"Extract the repository-root part from `svn-status-base-info'."
|
||||
(if svn-status-base-info
|
||||
(cadr (assoc 'repository-root svn-status-base-info))
|
||||
""))
|
||||
|
||||
(defun svn-status-ls (path)
|
||||
"Run svn ls PATH."
|
||||
(interactive "sPath for svn ls: ")
|
||||
(svn-run t t 'ls "ls" path))
|
||||
|
||||
(defun svn-status-ls-branches ()
|
||||
"Show, which branches exist for the actual working copy.
|
||||
Note: this command assumes the proposed standard svn repository layout."
|
||||
(interactive)
|
||||
(svn-status-parse-info t)
|
||||
(svn-status-ls (concat (svn-status-base-info->repository-root) "/branches")))
|
||||
|
||||
(defun svn-status-toggle-edit-cmd-flag (&optional reset)
|
||||
"Allow the user to edit the parameters for the next svn command.
|
||||
This command toggles between
|
||||
* editing the next command parameters (EditCmd)
|
||||
* editing all all command parameters (EditCmd#)
|
||||
* don't edit the command parameters ()
|
||||
The string in parentheses is shown in the status line to show the state."
|
||||
(interactive)
|
||||
(cond ((or reset (eq svn-status-edit-svn-command 'sticky))
|
||||
(setq svn-status-edit-svn-command nil))
|
||||
@ -2257,8 +2402,19 @@ See `svn-status-marked-files' for what counts as selected."
|
||||
(defun svn-status-get-file-list-names (use-marked-files)
|
||||
(mapcar 'svn-status-line-info->filename (svn-status-get-file-list use-marked-files)))
|
||||
|
||||
(defun svn-status-get-file-information ()
|
||||
"Find out about the file under point.
|
||||
The result may be parsed with the various `svn-status-line-info->...' functions.
|
||||
When called from a *svn-status* buffer, do the same as `svn-status-get-file-information'.
|
||||
When called from a file buffer provide a structure that contains the filename."
|
||||
(cond ((eq major-mode 'svn-status-mode)
|
||||
(svn-status-get-file-information))
|
||||
(t
|
||||
;; a fake strukture that contains the buffername for the current buffer
|
||||
(list '(nil nil) 32 nil (buffer-file-name (current-buffer)) 0 0 "" nil nil nil nil))))
|
||||
|
||||
(defun svn-status-select-line ()
|
||||
"Return information about the file under point.
|
||||
"Return information about the file under point.
|
||||
\(Only used for debugging\)"
|
||||
(interactive)
|
||||
(let ((info (svn-status-get-line-information)))
|
||||
@ -2268,7 +2424,7 @@ See `svn-status-marked-files' for what counts as selected."
|
||||
(message "No file on this line"))))
|
||||
|
||||
(defun svn-status-ensure-cursor-on-file ()
|
||||
"Raise an error unless point is on a valid file."
|
||||
"Raise an error unless point is on a valid file."
|
||||
(unless (svn-status-get-line-information)
|
||||
(error "No file on the current line")))
|
||||
|
||||
@ -2354,10 +2510,12 @@ Then move to that line."
|
||||
(file-name-as-directory file-name))))
|
||||
(newcursorpos-fname)
|
||||
(i-fname)
|
||||
(first-line t)
|
||||
(current-line svn-start-of-file-list-line-number))
|
||||
(while st-info
|
||||
(when (svn-status-line-info->is-visiblep (car st-info))
|
||||
(setq current-line (1+ current-line)))
|
||||
(when (or (svn-status-line-info->is-visiblep (car st-info)) first-line)
|
||||
(setq current-line (1+ current-line))
|
||||
(setq first-line nil))
|
||||
(setq i-fname (svn-status-line-info->filename (car st-info)))
|
||||
(when (or (string= file-name i-fname)
|
||||
(string-match sub-file-regexp i-fname))
|
||||
@ -2557,6 +2715,7 @@ if no files have been marked."
|
||||
(when (string= (buffer-name) svn-status-buffer-name)
|
||||
(delete-other-windows))
|
||||
(pop-to-buffer "*svn-process*")
|
||||
(svn-process-mode)
|
||||
(when svn-status-wash-control-M-in-process-buffers
|
||||
(svn-status-remove-control-M))
|
||||
(when scroll-to-top
|
||||
@ -2588,6 +2747,8 @@ Consider svn-status-window-alist to choose the buffer name."
|
||||
(insert-buffer-substring "*svn-process*")
|
||||
(when scroll-to-top
|
||||
(goto-char (point-min))))
|
||||
(when (eq window-mode t) ;; *svn-info* buffer
|
||||
(svn-info-mode))
|
||||
(other-window 1))
|
||||
(svn-status-show-process-buffer-internal scroll-to-top)))))
|
||||
|
||||
@ -2619,12 +2780,15 @@ See `svn-status-marked-files' for what counts as selected."
|
||||
(svn-status-create-arg-file svn-status-temp-arg-file "" (svn-status-marked-files) "")
|
||||
(svn-run t t 'info "info" "--targets" svn-status-temp-arg-file))
|
||||
|
||||
;; Todo: add possiblity to specify the revision
|
||||
(defun svn-status-blame ()
|
||||
"Run `svn blame' on the current file."
|
||||
(interactive)
|
||||
;;(svn-run t t 'blame "blame" "-r" "BASE" (svn-status-line-info->filename (svn-status-get-line-information))))
|
||||
(svn-run t t 'blame "blame" (svn-status-line-info->filename (svn-status-get-line-information))))
|
||||
(defun svn-status-blame (revision)
|
||||
"Run `svn blame' on the current file.
|
||||
When called with a prefix argument, ask the user for the REVISION to use.
|
||||
When called from a file buffer, go to the current line in the resulting blame output."
|
||||
(interactive "P")
|
||||
(when current-prefix-arg
|
||||
(setq revision (svn-status-read-revision-string "Blame for version: " "BASE")))
|
||||
(unless revision (setq revision "BASE"))
|
||||
(svn-run t t 'blame "blame" "-r" revision (svn-status-line-info->filename (svn-status-get-file-information))))
|
||||
|
||||
(defun svn-status-show-svn-diff (arg)
|
||||
"Run `svn diff' on the current file.
|
||||
@ -2707,11 +2871,12 @@ That function uses `add-log-current-defun'"
|
||||
(defun svn-status-activate-diff-mode ()
|
||||
"Show the *svn-process* buffer, using the diff-mode."
|
||||
(svn-status-show-process-output 'diff t)
|
||||
(save-excursion
|
||||
(set-buffer svn-status-last-output-buffer-name)
|
||||
(svn-status-diff-mode)
|
||||
(setq buffer-read-only t)))
|
||||
|
||||
(let ((working-directory default-directory))
|
||||
(save-excursion
|
||||
(set-buffer svn-status-last-output-buffer-name)
|
||||
(setq default-directory working-directory)
|
||||
(svn-status-diff-mode)
|
||||
(setq buffer-read-only t))))
|
||||
|
||||
(define-derived-mode svn-status-diff-mode fundamental-mode "svn-diff"
|
||||
"Major mode to display svn diffs. Derives from `diff-mode'.
|
||||
@ -2875,12 +3040,14 @@ When called with a prefix argument add the command line switch --force."
|
||||
(svn-run t t 'rm "rm" "--force" "--targets" svn-status-temp-arg-file)
|
||||
(svn-run t t 'rm "rm" "--targets" svn-status-temp-arg-file)))))
|
||||
|
||||
(defun svn-status-update-cmd ()
|
||||
"Run svn update."
|
||||
(interactive)
|
||||
(message "Running svn-update for %s" default-directory)
|
||||
;TODO: use file names also
|
||||
(svn-run t t 'update "update"))
|
||||
(defun svn-status-update-cmd (arg)
|
||||
"Run svn update.
|
||||
When called with a prefix argument, ask the user for the revision to update to."
|
||||
(interactive "P")
|
||||
(let ((rev (when arg (svn-status-read-revision-string (format "Directory: %s: Run svn update -r " default-directory)))))
|
||||
(message "Running svn-update for %s" default-directory)
|
||||
;;TODO: use file names also??
|
||||
(svn-run t t 'update "update" (when rev (list "-r" rev)))))
|
||||
|
||||
(defun svn-status-commit ()
|
||||
"Commit selected files.
|
||||
@ -3016,7 +3183,7 @@ Recommended values are ?m or ?M.")
|
||||
(delete-region (svn-point-at-bol) (svn-point-at-eol))
|
||||
(svn-insert-line-in-status-buffer (car st-info))
|
||||
(delete-char 1))
|
||||
(message "psvn: file %s not found, updating %s buffer content..."
|
||||
(svn-status-message 3 "psvn: file %s not found, updating %s buffer content..."
|
||||
i-fname svn-status-buffer-name)
|
||||
(svn-status-update-buffer))))))
|
||||
(setq st-info (cdr st-info))))))
|
||||
@ -3775,6 +3942,42 @@ When called with a prefix argument, ask the user for the revision."
|
||||
(goto-char (point-min))
|
||||
(setq svn-log-edit-update-log-entry rev)))
|
||||
|
||||
;; --------------------------------------------------------------------------------
|
||||
;; svn-info-mode
|
||||
;; --------------------------------------------------------------------------------
|
||||
(defvar svn-info-mode-map () "Keymap used in `svn-info-mode' buffers.")
|
||||
(put 'svn-info-mode-map 'risky-local-variable t) ;for Emacs 20.7
|
||||
|
||||
(when (not svn-info-mode-map)
|
||||
(setq svn-info-mode-map (make-sparse-keymap))
|
||||
(define-key svn-info-mode-map [?q] 'bury-buffer))
|
||||
|
||||
(defun svn-info-mode ()
|
||||
"Major Mode to view informative output from svn."
|
||||
(interactive)
|
||||
(kill-all-local-variables)
|
||||
(use-local-map svn-info-mode-map)
|
||||
(setq major-mode 'svn-info-mode)
|
||||
(setq mode-name "svn-info"))
|
||||
|
||||
;; --------------------------------------------------------------------------------
|
||||
;; svn-process-mode
|
||||
;; --------------------------------------------------------------------------------
|
||||
(defvar svn-process-mode-map () "Keymap used in `svn-process-mode' buffers.")
|
||||
(put 'svn-process-mode-map 'risky-local-variable t) ;for Emacs 20.7
|
||||
|
||||
(when (not svn-process-mode-map)
|
||||
(setq svn-process-mode-map (make-sparse-keymap))
|
||||
(define-key svn-process-mode-map [?q] 'bury-buffer))
|
||||
|
||||
(defun svn-process-mode ()
|
||||
"Major Mode to view process output from svn."
|
||||
(interactive)
|
||||
(kill-all-local-variables)
|
||||
(use-local-map svn-process-mode-map)
|
||||
(setq major-mode 'svn-process-mode)
|
||||
(setq mode-name "svn-process"))
|
||||
|
||||
;; --------------------------------------------------------------------------------
|
||||
;; svn status persistent options
|
||||
;; --------------------------------------------------------------------------------
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
6d650e918255596ef8b74255b3938547 subversion-1.3.1.tar.gz
|
||||
f790c49c219b4196e37ebfa71ab797d5 subversion-1.3.2.tar.gz
|
||||
|
@ -1,5 +1,5 @@
|
||||
# set to zero to avoid running test suite
|
||||
%define make_check 1
|
||||
%define make_check 0
|
||||
|
||||
%define with_java 1
|
||||
|
||||
@ -7,11 +7,12 @@
|
||||
%define jdk_path /usr/lib/jvm/java
|
||||
|
||||
%define perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
|
||||
%define ruby_sitelibdir %(%{_bindir}/ruby -rrbconfig -e 'print Config::CONFIG.fetch(%q(sitelibdir))')
|
||||
|
||||
Summary: Modern Version Control System designed to replace CVS
|
||||
Name: subversion
|
||||
Version: 1.3.1
|
||||
Release: 4
|
||||
Version: 1.3.2
|
||||
Release: 2
|
||||
License: BSD
|
||||
Group: Development/Tools
|
||||
URL: http://subversion.tigris.org/
|
||||
@ -137,6 +138,7 @@ make install-javahl DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
make pure_vendor_install -C subversion/bindings/swig/perl/native \
|
||||
PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
|
||||
install -m 755 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/subversion
|
||||
|
||||
# Add subversion.conf configuration file into httpd/conf.d directory.
|
||||
install -m 755 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf.d
|
||||
@ -159,7 +161,7 @@ find $RPM_BUILD_ROOT%{_libdir}/perl5 -type f -perm 555 -print0 |
|
||||
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libsvn_swig_*.{so,la,a}
|
||||
|
||||
# Remove unnecessary ruby libraries
|
||||
rm -f ${RPM_BUILD_ROOT}%{_libdir}/site_ruby/*/*/svn/ext/*.*a
|
||||
rm -f ${RPM_BUILD_ROOT}%{ruby_sitelibdir}/*/svn/ext/*.*a
|
||||
|
||||
# Trim what goes in docdir
|
||||
rm -rf tools/*/*.in tools/test-scripts
|
||||
@ -205,6 +207,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{pydir}/libsvn
|
||||
%{_datadir}/emacs/site-lisp
|
||||
%{_datadir}/xemacs/site-packages/lisp
|
||||
%dir %{_sysconfdir}/subversion
|
||||
%exclude %{_libdir}/libsvn_swig_perl*
|
||||
%exclude %{_libdir}/libsvn_swig_ruby*
|
||||
%exclude %{_mandir}/man*/*::*
|
||||
@ -235,8 +238,8 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%files ruby
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libsvn_swig_ruby*
|
||||
%{_libdir}/site_ruby/*/svn
|
||||
%{_libdir}/site_ruby/*/*-linux/svn
|
||||
%{ruby_sitelibdir}/svn
|
||||
%{ruby_sitelibdir}/*-linux/svn
|
||||
|
||||
%if %{with_java}
|
||||
%files javahl
|
||||
@ -246,6 +249,12 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jun 2 2006 Joe Orton <jorton@redhat.com> 1.3.2-2
|
||||
- update to 1.3.2
|
||||
- fix Ruby sitelibdir (Garrick Staples, #191611)
|
||||
- own /etc/subversion (#189071)
|
||||
- update to psvn.el r19857
|
||||
|
||||
* Thu Apr 6 2006 Joe Orton <jorton@redhat.com> 1.3.1-4
|
||||
- move libsvn_swig_ruby* back to subversion-ruby
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user