Mercurial > emacs
comparison lisp/vc.el @ 67578:f8a3e13c32d7
(vc-default-previous-version, vc-default-next-version)
(vc-do-command): Doc fixes.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 14 Dec 2005 20:10:28 +0000 |
parents | 9c4c9e375003 |
children | 0cdb122ad4db 14a4eb789b45 |
comparison
equal
deleted
inserted
replaced
67577:125832ddcd6b | 67578:f8a3e13c32d7 |
---|---|
760 (substring rev (match-beginning 0) (match-end 0))) | 760 (substring rev (match-beginning 0) (match-end 0))) |
761 | 761 |
762 (defun vc-default-previous-version (backend file rev) | 762 (defun vc-default-previous-version (backend file rev) |
763 "Return the version number immediately preceding REV for FILE, | 763 "Return the version number immediately preceding REV for FILE, |
764 or nil if there is no previous version. This default | 764 or nil if there is no previous version. This default |
765 implementation works for <major>.<minor>-style version numbers as | 765 implementation works for MAJOR.MINOR-style version numbers as |
766 used by RCS and CVS." | 766 used by RCS and CVS." |
767 (let ((branch (vc-branch-part rev)) | 767 (let ((branch (vc-branch-part rev)) |
768 (minor-num (string-to-number (vc-minor-part rev)))) | 768 (minor-num (string-to-number (vc-minor-part rev)))) |
769 (when branch | 769 (when branch |
770 (if (> minor-num 1) | 770 (if (> minor-num 1) |
779 (vc-branch-part branch)))))) | 779 (vc-branch-part branch)))))) |
780 | 780 |
781 (defun vc-default-next-version (backend file rev) | 781 (defun vc-default-next-version (backend file rev) |
782 "Return the version number immediately following REV for FILE, | 782 "Return the version number immediately following REV for FILE, |
783 or nil if there is no next version. This default implementation | 783 or nil if there is no next version. This default implementation |
784 works for <major>.<minor>-style version numbers as used by RCS | 784 works for MAJOR.MINOR-style version numbers as used by RCS |
785 and CVS." | 785 and CVS." |
786 (when (not (string= rev (vc-workfile-version file))) | 786 (when (not (string= rev (vc-workfile-version file))) |
787 (let ((branch (vc-branch-part rev)) | 787 (let ((branch (vc-branch-part rev)) |
788 (minor-num (string-to-number (vc-minor-part rev)))) | 788 (minor-num (string-to-number (vc-minor-part rev)))) |
789 (concat branch "." (number-to-string (1+ minor-num)))))) | 789 (concat branch "." (number-to-string (1+ minor-num)))))) |
928 "Execute a VC command, notifying user and checking for errors. | 928 "Execute a VC command, notifying user and checking for errors. |
929 Output from COMMAND goes to BUFFER, or *vc* if BUFFER is nil or the | 929 Output from COMMAND goes to BUFFER, or *vc* if BUFFER is nil or the |
930 current buffer if BUFFER is t. If the destination buffer is not | 930 current buffer if BUFFER is t. If the destination buffer is not |
931 already current, set it up properly and erase it. The command is | 931 already current, set it up properly and erase it. The command is |
932 considered successful if its exit status does not exceed OKSTATUS (if | 932 considered successful if its exit status does not exceed OKSTATUS (if |
933 OKSTATUS is nil, that means to ignore error status, if it is 'async, that | 933 OKSTATUS is nil, that means to ignore error status, if it is `async', that |
934 means not to wait for termination of the subprocess; if it is t it means to | 934 means not to wait for termination of the subprocess; if it is t it means to |
935 ignore all execution errors). FILE is the | 935 ignore all execution errors). FILE is the |
936 name of the working file (may also be nil, to execute commands that | 936 name of the working file (may also be nil, to execute commands that |
937 don't expect a file name). If an optional list of FLAGS is present, | 937 don't expect a file name). If an optional list of FLAGS is present, |
938 that is inserted into the command line before the filename." | 938 that is inserted into the command line before the filename." |