/[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.35 by spiegel, Tue Jan 7 08:28:15 2003 UTC revision 1.36 by lektu, Tue Feb 4 12:11:40 2003 UTC
# Line 143  For a description of possible values, se Line 143  For a description of possible values, se
143                (cond                (cond
144                 ((string-match ".rw..-..-." (nth 8 (file-attributes file)))                 ((string-match ".rw..-..-." (nth 8 (file-attributes file)))
145                  (vc-file-setprop file 'vc-checkout-model 'implicit)                  (vc-file-setprop file 'vc-checkout-model 'implicit)
146                  (setq state                  (setq state
147                        (if (vc-rcs-workfile-is-newer file)                        (if (vc-rcs-workfile-is-newer file)
148                            'edited                            'edited
149                          'up-to-date)))                          'up-to-date)))
150                 ((string-match ".r-..-..-." (nth 8 (file-attributes file)))                 ((string-match ".r-..-..-." (nth 8 (file-attributes file)))
151                  (vc-file-setprop file 'vc-checkout-model 'locking))))                  (vc-file-setprop file 'vc-checkout-model 'locking))))
# Line 162  For a description of possible values, se Line 162  For a description of possible values, se
162                         (if (file-ownership-preserved-p file)                         (if (file-ownership-preserved-p file)
163                             'edited                             'edited
164                           (vc-user-login-name owner-uid))                           (vc-user-login-name owner-uid))
165                       (if (vc-rcs-workfile-is-newer file)                       (if (vc-rcs-workfile-is-newer file)
166                           'edited                           'edited
167                         'up-to-date)))                         'up-to-date)))
168                    (t                    (t
# Line 243  expanded if `vc-keep-workfiles' is non-n Line 243  expanded if `vc-keep-workfiles' is non-n
243                       (if (stringp vc-rcs-register-switches)                       (if (stringp vc-rcs-register-switches)
244                       (list vc-rcs-register-switches)                       (list vc-rcs-register-switches)
245                       vc-rcs-register-switches))))                       vc-rcs-register-switches))))
246          
247        (and (not (file-exists-p subdir))        (and (not (file-exists-p subdir))
248             (not (directory-files (file-name-directory file)             (not (directory-files (file-name-directory file)
249                                   nil ".*,v$" t))                                   nil ".*,v$" t))
# Line 305  whether to remove it." Line 305  whether to remove it."
305      (and (string= (file-name-nondirectory (directory-file-name dir)) "RCS")      (and (string= (file-name-nondirectory (directory-file-name dir)) "RCS")
306           ;; check whether RCS dir is empty, i.e. it does not           ;; check whether RCS dir is empty, i.e. it does not
307           ;; contain any files except "." and ".."           ;; contain any files except "." and ".."
308           (not (directory-files dir nil           (not (directory-files dir nil
309                                 "^\\([^.]\\|\\.[^.]\\|\\.\\.[^.]\\).*"))                                 "^\\([^.]\\|\\.[^.]\\|\\.\\.[^.]\\).*"))
310           (yes-or-no-p (format "Directory %s is empty; remove it? " dir))           (yes-or-no-p (format "Directory %s is empty; remove it? " dir))
311           (delete-directory dir))))           (delete-directory dir))))
# Line 317  whether to remove it." Line 317  whether to remove it."
317                      vc-checkin-switches)))                      vc-checkin-switches)))
318      (let ((old-version (vc-workfile-version file)) new-version      (let ((old-version (vc-workfile-version file)) new-version
319            (default-branch (vc-file-getprop file 'vc-rcs-default-branch)))            (default-branch (vc-file-getprop file 'vc-rcs-default-branch)))
320        ;; Force branch creation if an appropriate        ;; Force branch creation if an appropriate
321        ;; default branch has been set.        ;; default branch has been set.
322        (and (not rev)        (and (not rev)
323             default-branch             default-branch
# Line 351  whether to remove it." Line 351  whether to remove it."
351         ((and old-version new-version         ((and old-version new-version
352               (not (string= (vc-branch-part old-version)               (not (string= (vc-branch-part old-version)
353                             (vc-branch-part new-version))))                             (vc-branch-part new-version))))
354          (vc-rcs-set-default-branch file          (vc-rcs-set-default-branch file
355                                     (if (vc-trunk-p new-version) nil                                     (if (vc-trunk-p new-version) nil
356                                       (vc-branch-part new-version)))                                       (vc-branch-part new-version)))
357          ;; If this is an old RCS release, we might have          ;; If this is an old RCS release, we might have
# Line 407  whether to remove it." Line 407  whether to remove it."
407                         (concat "-r" rev)                         (concat "-r" rev)
408                       (let ((workrev (vc-workfile-version file)))                       (let ((workrev (vc-workfile-version file)))
409                         (if workrev                         (if workrev
410                             (concat "-r"                             (concat "-r"
411                                     (if (not rev)                                     (if (not rev)
412                                         ;; no revision specified:                                         ;; no revision specified:
413                                         ;; use current workfile version                                         ;; use current workfile version
# Line 428  whether to remove it." Line 428  whether to remove it."
428              (vc-file-setprop file 'vc-workfile-version new-version)              (vc-file-setprop file 'vc-workfile-version new-version)
429              ;; if necessary, adjust the default branch              ;; if necessary, adjust the default branch
430              (and rev (not (string= rev ""))              (and rev (not (string= rev ""))
431                   (vc-rcs-set-default-branch                   (vc-rcs-set-default-branch
432                    file                    file
433                    (if (vc-rcs-latest-on-branch-p file new-version)                    (if (vc-rcs-latest-on-branch-p file new-version)
434                        (if (vc-trunk-p new-version) nil                        (if (vc-trunk-p new-version) nil
# Line 439  whether to remove it." Line 439  whether to remove it."
439  (defun vc-rcs-revert (file &optional contents-done)  (defun vc-rcs-revert (file &optional contents-done)
440    "Revert FILE to the version it was based on."    "Revert FILE to the version it was based on."
441    (vc-do-command nil 0 "co" (vc-name file) "-f"    (vc-do-command nil 0 "co" (vc-name file) "-f"
442                   (concat (if (eq (vc-state file) 'edited) "-u" "-r")                   (concat (if (eq (vc-state file) 'edited) "-u" "-r")
443                           (vc-workfile-version file))))                           (vc-workfile-version file))))
444    
445  (defun vc-rcs-cancel-version (file editable)  (defun vc-rcs-cancel-version (file editable)
# Line 483  The changes are between FIRST-VERSION an Line 483  The changes are between FIRST-VERSION an
483    "Steal the lock on the current workfile for FILE and revision REV.    "Steal the lock on the current workfile for FILE and revision REV.
484  Needs RCS 5.6.2 or later for -M."  Needs RCS 5.6.2 or later for -M."
485    (vc-do-command nil 0 "rcs" (vc-name file) "-M" (concat "-u" rev))    (vc-do-command nil 0 "rcs" (vc-name file) "-M" (concat "-u" rev))
486    ;; Do a real checkout after stealing the lock, so that we see    ;; Do a real checkout after stealing the lock, so that we see
487    ;; expanded headers.    ;; expanded headers.
488    (vc-do-command nil 0 "co" (vc-name file) "-f" (concat "-l" rev)))    (vc-do-command nil 0 "co" (vc-name file) "-f" (concat "-l" rev)))
489    

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

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