/[emacs]/emacs/lisp/vc-rcs.el
ViewVC logotype

Diff of /emacs/lisp/vc-rcs.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36 by lektu, Tue Feb 4 12:11:40 2003 UTC revision 1.37 by monnier, Thu May 8 19:24:56 2003 UTC
# Line 235  the RCS command (in that order). Line 235  the RCS command (in that order).
235    
236  Automatically retrieve a read-only version of the file with keywords  Automatically retrieve a read-only version of the file with keywords
237  expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."  expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
238      (let ((subdir (expand-file-name "RCS" (file-name-directory file)))      (let ((subdir (expand-file-name "RCS" (file-name-directory file))))
           (switches (append  
                      (if (stringp vc-register-switches)  
                          (list vc-register-switches)  
                        vc-register-switches)  
                      (if (stringp vc-rcs-register-switches)  
                      (list vc-rcs-register-switches)  
                      vc-rcs-register-switches))))  
   
239        (and (not (file-exists-p subdir))        (and (not (file-exists-p subdir))
240             (not (directory-files (file-name-directory file)             (not (directory-files (file-name-directory file)
241                                   nil ".*,v$" t))                                   nil ".*,v$" t))
# Line 254  expanded if `vc-keep-workfiles' is non-n Line 246  expanded if `vc-keep-workfiles' is non-n
246               (and (vc-rcs-release-p "5.6.4") "-i")               (and (vc-rcs-release-p "5.6.4") "-i")
247               (concat (if vc-keep-workfiles "-u" "-r") rev)               (concat (if vc-keep-workfiles "-u" "-r") rev)
248               (and comment (concat "-t-" comment))               (and comment (concat "-t-" comment))
249               switches)               (vc-switches 'RCS 'register))
250        ;; parse output to find master file name and workfile version        ;; parse output to find master file name and workfile version
251        (with-current-buffer "*vc*"        (with-current-buffer "*vc*"
252          (goto-char (point-min))          (goto-char (point-min))
# Line 312  whether to remove it." Line 304  whether to remove it."
304    
305  (defun vc-rcs-checkin (file rev comment)  (defun vc-rcs-checkin (file rev comment)
306    "RCS-specific version of `vc-backend-checkin'."    "RCS-specific version of `vc-backend-checkin'."
307    (let ((switches (if (stringp vc-checkin-switches)    (let ((switches (vc-switches 'RCS 'checkin)))
                       (list vc-checkin-switches)  
                     vc-checkin-switches)))  
308      (let ((old-version (vc-workfile-version file)) new-version      (let ((old-version (vc-workfile-version file)) new-version
309            (default-branch (vc-file-getprop file 'vc-rcs-default-branch)))            (default-branch (vc-file-getprop file 'vc-rcs-default-branch)))
310        ;; Force branch creation if an appropriate        ;; Force branch creation if an appropriate
# Line 367  whether to remove it." Line 357  whether to remove it."
357           buffer 0 "co" (vc-name file)           buffer 0 "co" (vc-name file)
358           "-q" ;; suppress diagnostic output           "-q" ;; suppress diagnostic output
359           (concat "-p" rev)           (concat "-p" rev)
360           (if (stringp vc-checkout-switches)           (vc-switches 'RCS 'checkout)))
              (list vc-checkout-switches)  
            vc-checkout-switches)))  
361    
362  (defun vc-rcs-checkout (file &optional editable rev)  (defun vc-rcs-checkout (file &optional editable rev)
363    "Retrieve a copy of a saved version of FILE."    "Retrieve a copy of a saved version of FILE."
# Line 379  whether to remove it." Line 367  whether to remove it."
367      (save-excursion      (save-excursion
368        ;; Change buffers to get local value of vc-checkout-switches.        ;; Change buffers to get local value of vc-checkout-switches.
369        (if file-buffer (set-buffer file-buffer))        (if file-buffer (set-buffer file-buffer))
370        (setq switches (if (stringp vc-checkout-switches)        (setq switches (vc-switches 'RCS 'checkout))
                          (list vc-checkout-switches)  
                        vc-checkout-switches))  
371        ;; Save this buffer's default-directory        ;; Save this buffer's default-directory
372        ;; and use save-excursion to make sure it is restored        ;; and use save-excursion to make sure it is restored
373        ;; in the same buffer it was saved in.        ;; in the same buffer it was saved in.
# Line 428  whether to remove it." Line 414  whether to remove it."
414              (vc-file-setprop file 'vc-workfile-version new-version)              (vc-file-setprop file 'vc-workfile-version new-version)
415              ;; if necessary, adjust the default branch              ;; if necessary, adjust the default branch
416              (and rev (not (string= rev ""))              (and rev (not (string= rev ""))
417                   (vc-rcs-set-default-branch                   (vc-rcs-set-default-branch
418                    file                    file
419                    (if (vc-rcs-latest-on-branch-p file new-version)                    (if (vc-rcs-latest-on-branch-p file new-version)
420                        (if (vc-trunk-p new-version) nil                        (if (vc-trunk-p new-version) nil
# Line 504  Needs RCS 5.6.2 or later for -M." Line 490  Needs RCS 5.6.2 or later for -M."
490           (append (list "-q"           (append (list "-q"
491                         (concat "-r" oldvers)                         (concat "-r" oldvers)
492                         (and newvers (concat "-r" newvers)))                         (and newvers (concat "-r" newvers)))
493                   (vc-diff-switches-list 'RCS))))                   (vc-switches 'RCS 'diff))))
494    
495    
496  ;;;  ;;;

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26