📄 psvn.el
字号:
;;; psvn.el --- Subversion interface for emacs;; Copyright (C) 2002-2006 by Stefan Reichoer;; Author: Stefan Reichoer, <stefan@xsteve.at>;; $Id: psvn.el 19439 2006-04-20 20:37:09Z 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;; the Free Software Foundation; either version 2, or (at your option);; any later version.;; psvn.el is distributed in the hope that it will be useful,;; but WITHOUT ANY WARRANTY; without even the implied warranty of;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the;; GNU General Public License for more details.;; You should have received a copy of the GNU General Public License;; along with GNU Emacs; see the file COPYING. If not, write to;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,;; Boston, MA 02111-1307, USA.;;; Commentary;; psvn.el is tested with GNU Emacs 21.3 on windows, debian linux,;; freebsd5, red hat el3 with svn 1.2.3;; psvn.el is an interface for the revision control tool subversion;; (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 psvn.el 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.;; This buffer uses svn-status mode in which the following keys are defined:;; g - svn-status-update: run 'svn status -v';; M-s - svn-status-update: run 'svn status -v';; C-u g - svn-status-update: run 'svn status -vu';; = - svn-status-show-svn-diff run 'svn diff';; l - svn-status-show-svn-log run 'svn log';; i - svn-status-info run 'svn info';; r - svn-status-revert run 'svn revert';; X v - svn-status-resolved run 'svn resolved';; U - svn-status-update-cmd run 'svn update';; M-u - svn-status-update-cmd run 'svn update';; c - svn-status-commit run 'svn commit';; a - svn-status-add-file run 'svn add --non-recursive';; A - svn-status-add-file-recursively run 'svn add';; + - svn-status-make-directory run 'svn mkdir';; R - svn-status-mv run 'svn mv';; D - svn-status-rm run 'svn rm';; M-c - svn-status-cleanup run 'svn cleanup';; b - svn-status-blame run 'svn blame';; X e - svn-status-export run 'svn export';; RET - svn-status-find-file-or-examine-directory;; ^ - svn-status-examine-parent;; ~ - svn-status-get-specific-revision;; E - svn-status-ediff-with-revision;; X X - svn-status-resolve-conflicts;; s - svn-status-show-process-buffer;; e - svn-status-toggle-edit-cmd-flag;; ? - svn-status-toggle-hide-unknown;; _ - svn-status-toggle-hide-unmodified;; 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;; * A - svn-status-mark-added;; * M - svn-status-mark-modified;; * D - svn-status-mark-deleted;; * * - svn-status-mark-changed;; . - svn-status-goto-root-or-return;; f - svn-status-find-file;; o - svn-status-find-file-other-window;; v - svn-status-view-file-other-window;; I - svn-status-parse-info;; V - svn-status-svnversion;; P l - svn-status-property-list;; P s - svn-status-property-set;; P d - svn-status-property-delete;; P e - svn-status-property-edit-one-entry;; P i - svn-status-property-ignore-file;; P I - svn-status-property-ignore-file-extension;; P C-i - svn-status-property-edit-svn-ignore;; P k - svn-status-property-set-keyword-list;; P y - svn-status-property-set-eol-style;; P x - svn-status-property-set-executable;; h - svn-status-use-history;; q - svn-status-bury-buffer;; C-x C-j - svn-status-dired-jump;; The output in the buffer contains this header to ease reading;; of svn output:;; FPH BASE CMTD Author em File;; F = Filemark;; P = Property mark;; H = History mark;; BASE = local base revision;; CMTD = last committed revision;; Author = author of change;; em = "**" or "(Update Available)" [see `svn-status-short-mod-flag-p'];; if file can be updated;; File = path/filename;;;; To use psvn.el put the following line in your .emacs:;; (require 'psvn);; Start the svn interface with M-x svn-status;; The latest version of psvn.el can be found at:;; http://www.xsteve.at/prg/emacs/psvn.el;; Or you can check it out from the subversion repository:;; svn co http://svn.collab.net/repos/svn/trunk/contrib/client-side/psvn psvn;; TODO:;; * shortcut for svn propset svn:keywords "Date" psvn.el;; * docstrings for the functions;; * perhaps shortcuts for ranges, dates;; * when editing the command line - offer help from the svn client;; * finish svn-status-property-set;; * Add repository browser;; * Improve support for svn blame;; * Get rid of all byte-compiler warnings;; * SVK working copy support;; * multiple independent buffers in svn-status-mode;; There are "TODO" comments in other parts of this file as well.;; Overview over the implemented/not (yet) implemented svn sub-commands:;; * add implemented;; * blame implemented;; * cat implemented;; * checkout (co);; * cleanup implemented;; * commit (ci) implemented;; * copy (cp);; * delete (del, remove, rm) implemented;; * diff (di) implemented;; * export implemented;; * help (?, h);; * import;; * info implemented;; * list (ls);; * log implemented;; * merge;; * mkdir implemented;; * move (mv, rename, ren) implemented;; * propdel (pdel) implemented;; * propedit (pedit, pe) not needed;; * propget (pget, pg) used;; * proplist (plist, pl) implemented;; * propset (pset, ps) used;; * resolved implemented;; * revert implemented;; * status (stat, st) implemented;; * switch (sw);; * update (up) implemented;; For the not yet implemented commands you should use the command line;; svn client. If there are user requests for any missing commands I will;; probably implement them.;; Comments / suggestions and bug reports are welcome!;; Development notes;; -----------------;; "svn-" is the package prefix used in psvn.el. There are also longer;; prefixes which clarify the code and help symbol completion, but they;; are not intended to prevent name clashes with other packages. All;; interactive commands meant to be used only in a specific mode should;; have names beginning with the name of that mode: for example,;; "svn-status-add-file" in "svn-status-mode". "psvn" should be used;; only in names of files, customization groups, and features. If SVK;; support is ever added, it should use "svn-svk-" when no existing;; prefix is applicable.;; Many of the variables marked as `risky-local-variable' are probably;; impossible to abuse, as the commands that read them are used only in;; buffers that are not visiting any files. Better safe than sorry.;;; Code:(require 'easymenu)(condition-case nil (progn (require 'diff-mode)) (error nil));;; user setable variables(defcustom svn-status-verbose t "*Add '-v' to svn status call." :type 'boolean :group 'psvn)(defcustom svn-log-edit-file-name "++svn-log++" "*Name of a saved log file.This can be either absolute, or relative to the default directoryof the *svn-log-edit* buffer." :type 'file :group 'psvn)(put 'svn-log-edit-file-name 'risky-local-variable t)(defcustom svn-log-edit-insert-files-to-commit t "*Insert the filelist to commit in the *svn-log* buffer" :type 'boolean :group 'psvn)(defcustom svn-log-edit-use-log-edit-mode (and (condition-case nil (require 'log-edit) (error nil)) t) "*Use log-edit-mode as base for svn-log-edit-modeThis variable takes effect only when psvn.el is being loaded." :type 'boolean :group 'psvn)(defcustom svn-status-hide-unknown nil "*Hide unknown files in `svn-status-buffer-name' buffer.This can be toggled with \\[svn-status-toggle-hide-unknown]." :type 'boolean :group 'psvn)(defcustom svn-status-hide-unmodified nil "*Hide unmodified files in `svn-status-buffer-name' buffer.This can be toggled with \\[svn-status-toggle-hide-unmodified]." :type 'boolean :group 'psvn)(defcustom svn-status-sort-status-buffer t "*Whether to sort the `svn-status-buffer-name' buffer.Setting this variable to nil speeds up \[M-x svn-status], however thelisting may then become incorrect.This can be toggled with \\[svn-status-toggle-sort-status-buffer]." :type 'boolean :group 'psvn)(defcustom svn-status-unmark-files-after-list '(commit revert) "*List of operations after which all user marks will be removed.Possible values are: commit, revert." :type '(set (const commit) (const revert)) :group 'psvn)(defcustom svn-status-preserve-window-configuration nil "*Try to preserve the window configuration." :type 'boolean :group 'psvn)(defcustom svn-status-negate-meaning-of-arg-commands '() "*List of operations that should use a negated meaning of the prefix argument.The supported functions are `svn-status' and `svn-status-set-user-mark'." :type '(set (function-item svn-status) (function-item svn-status-set-user-mark)) :group 'psvn)(defcustom svn-status-svn-executable "svn" "*The name of the svn executable.This can be either absolute or looked up on `exec-path'." ;; Don't use (file :must-match t). It doesn't know about `exec-path'. :type 'file :group 'psvn)(put 'svn-status-svn-executable 'risky-local-variable t)(defcustom svn-status-default-export-directory "~/" "*The default directory that is suggested svn export." :type 'file :group 'psvn)(defcustom svn-status-svn-environment-var-list '() "*A list of environment variables that should be set for that svn process.Each element is either a string \"VARIABLE=VALUE\" which will be added tothe environment when svn is run, or just \"VARIABLE\" which causes thatvariable to be entirely removed from the environment.You could set this for example to '(\"LANG=C\")" :type '(repeat string) :group 'psvn)(put 'svn-status-svn-environment-var-list 'risky-local-variable t)(defcustom svn-browse-url-function nil ;; If the user hasn't changed `svn-browse-url-function', then changing ;; `browse-url-browser-function' should affect psvn even after it has ;; been loaded. "Function to display a Subversion related WWW page in a browser.So far, this is used only for \"trac\" issue tracker integration.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -