diff options
| author | André Spiegel | 1995-08-21 19:27:05 +0000 |
|---|---|---|
| committer | André Spiegel | 1995-08-21 19:27:05 +0000 |
| commit | 8e7eda1a737d2af5703eff40bf2fd63975e16b85 (patch) | |
| tree | 9df2bd542c4354a8f574a8435db5da2bc2da9870 | |
| parent | e66eac08b5d8657328f5d07053686964362507c9 (diff) | |
| download | emacs-8e7eda1a737d2af5703eff40bf2fd63975e16b85.tar.gz emacs-8e7eda1a737d2af5703eff40bf2fd63975e16b85.zip | |
(vc-latest-on-branch-p): Under CVS, handle the case when the file is
added, but not yet committed.
(vc-backend-checkout): RCS case: In non-strict locking mode, force to
overwrite the writable workfile. CVS case: Do the right thing in
CVSREAD-mode.
| -rw-r--r-- | lisp/vc.el | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 521b949d32e..cdd6697398f 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -266,7 +266,8 @@ and that its contents match what the master file says.") | |||
| 266 | (kill-buffer (get-buffer "*vc-info*"))) | 266 | (kill-buffer (get-buffer "*vc-info*"))) |
| 267 | (string= tip-version workfile-version)))) | 267 | (string= tip-version workfile-version)))) |
| 268 | ;; CVS | 268 | ;; CVS |
| 269 | (string= (vc-workfile-version file) (vc-latest-version file)))) | 269 | (or (string= (vc-workfile-version file) "0") ;; added but not committed. |
| 270 | (string= (vc-workfile-version file) (vc-latest-version file))))) | ||
| 270 | 271 | ||
| 271 | (defun vc-registration-error (file) | 272 | (defun vc-registration-error (file) |
| 272 | (if file | 273 | (if file |
| @@ -1710,6 +1711,9 @@ From a program, any arguments are passed to the `rcs2log' script." | |||
| 1710 | ;; now do the checkout | 1711 | ;; now do the checkout |
| 1711 | (apply 'vc-do-command | 1712 | (apply 'vc-do-command |
| 1712 | nil 0 "co" file 'MASTER | 1713 | nil 0 "co" file 'MASTER |
| 1714 | ;; If locking is not strict, force to overwrite | ||
| 1715 | ;; the writable workfile. | ||
| 1716 | (if (eq (vc-checkout-model file) 'implicit) "-f") | ||
| 1713 | (if writable "-l") | 1717 | (if writable "-l") |
| 1714 | (if rev (concat "-r" rev) | 1718 | (if rev (concat "-r" rev) |
| 1715 | ;; if no explicit revision was specified, | 1719 | ;; if no explicit revision was specified, |
| @@ -1751,14 +1755,21 @@ From a program, any arguments are passed to the `rcs2log' script." | |||
| 1751 | ;; default for verbose checkout: clear the sticky tag | 1755 | ;; default for verbose checkout: clear the sticky tag |
| 1752 | ;; so that the actual update will go to the head of the trunk | 1756 | ;; so that the actual update will go to the head of the trunk |
| 1753 | (and rev (string= rev "") | 1757 | (and rev (string= rev "") |
| 1754 | (vc-do-command nil 0 "cvs" file 'WORKFILE "update" "-A") | 1758 | (vc-do-command nil 0 "cvs" file 'WORKFILE "update" "-A")) |
| 1755 | (setq rev nil)) | 1759 | ;; If a revision was specified, check that out. |
| 1756 | (apply 'vc-do-command nil 0 "cvs" file 'WORKFILE | 1760 | (if rev |
| 1757 | "update" | 1761 | (apply 'vc-do-command nil 0 "cvs" file 'WORKFILE |
| 1758 | (and rev (concat "-r" rev)) | 1762 | (and writable (eq (vc-checkout-model file) 'manual) "-w") |
| 1759 | vc-checkout-switches) | 1763 | "update" |
| 1760 | (vc-file-setprop file 'vc-workfile-version nil)) | 1764 | (and rev (not (string= rev "")) |
| 1761 | )) | 1765 | (concat "-r" rev)) |
| 1766 | vc-checkout-switches) | ||
| 1767 | ;; If no revision was specified, simply make the file writable. | ||
| 1768 | (and writable | ||
| 1769 | (or (eq (vc-checkout-model file) 'manual) | ||
| 1770 | (zerop (logand 128 (file-modes file)))) | ||
| 1771 | (set-file-modes file (logior 128 (file-modes file))))) | ||
| 1772 | (if rev (vc-file-setprop file 'vc-workfile-version nil)))) | ||
| 1762 | (setq default-directory old-default-dir) | 1773 | (setq default-directory old-default-dir) |
| 1763 | (cond | 1774 | (cond |
| 1764 | ((not workfile) | 1775 | ((not workfile) |
| @@ -1767,8 +1778,7 @@ From a program, any arguments are passed to the `rcs2log' script." | |||
| 1767 | (vc-file-setprop file 'vc-locking-user (user-login-name))) | 1778 | (vc-file-setprop file 'vc-locking-user (user-login-name))) |
| 1768 | (vc-file-setprop file | 1779 | (vc-file-setprop file |
| 1769 | 'vc-checkout-time (nth 5 (file-attributes file))))) | 1780 | 'vc-checkout-time (nth 5 (file-attributes file))))) |
| 1770 | (message "Checking out %s...done" filename)) | 1781 | (message "Checking out %s...done" filename)))) |
| 1771 | ) | ||
| 1772 | 1782 | ||
| 1773 | (defun vc-backend-logentry-check (file) | 1783 | (defun vc-backend-logentry-check (file) |
| 1774 | (vc-backend-dispatch file | 1784 | (vc-backend-dispatch file |