diff options
| -rw-r--r-- | lisp/vc.el | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 166870811bc..b72a763ea9f 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -539,7 +539,8 @@ to an optional list of FLAGS." | |||
| 539 | (interactive "P") | 539 | (interactive "P") |
| 540 | (widen) | 540 | (widen) |
| 541 | (let ((context (vc-buffer-context))) | 541 | (let ((context (vc-buffer-context))) |
| 542 | (revert-buffer arg no-confirm) | 542 | ;; t means don't call normal-mode; that's to preserve various minor modes. |
| 543 | (revert-buffer arg no-confirm t) | ||
| 543 | (vc-restore-buffer-context context))) | 544 | (vc-restore-buffer-context context))) |
| 544 | 545 | ||
| 545 | 546 | ||
| @@ -1875,40 +1876,40 @@ From a program, any arguments are passed to the `rcs2log' script." | |||
| 1875 | switches) | 1876 | switches) |
| 1876 | (setq failed nil)) | 1877 | (setq failed nil)) |
| 1877 | (and failed (file-exists-p filename) (delete-file filename)))) | 1878 | (and failed (file-exists-p filename) (delete-file filename)))) |
| 1878 | (let (new-version) | 1879 | (let (new-version) |
| 1879 | ;; if we should go to the head of the trunk, | 1880 | ;; if we should go to the head of the trunk, |
| 1880 | ;; clear the default branch first | 1881 | ;; clear the default branch first |
| 1881 | (and rev (string= rev "") | 1882 | (and rev (string= rev "") |
| 1882 | (vc-do-command nil 0 "rcs" file 'MASTER "-b")) | 1883 | (vc-do-command nil 0 "rcs" file 'MASTER "-b")) |
| 1883 | ;; now do the checkout | 1884 | ;; now do the checkout |
| 1884 | (apply 'vc-do-command | 1885 | (apply 'vc-do-command |
| 1885 | nil 0 "co" file 'MASTER | 1886 | nil 0 "co" file 'MASTER |
| 1886 | ;; If locking is not strict, force to overwrite | 1887 | ;; If locking is not strict, force to overwrite |
| 1887 | ;; the writable workfile. | 1888 | ;; the writable workfile. |
| 1888 | (if (eq (vc-checkout-model file) 'implicit) "-f") | 1889 | (if (eq (vc-checkout-model file) 'implicit) "-f") |
| 1889 | (if writable "-l") | 1890 | (if writable "-l") |
| 1890 | (if rev (concat "-r" rev) | 1891 | (if rev (concat "-r" rev) |
| 1891 | ;; if no explicit revision was specified, | 1892 | ;; if no explicit revision was specified, |
| 1892 | ;; check out that of the working file | 1893 | ;; check out that of the working file |
| 1893 | (let ((workrev (vc-workfile-version file))) | 1894 | (let ((workrev (vc-workfile-version file))) |
| 1894 | (if workrev (concat "-r" workrev) | 1895 | (if workrev (concat "-r" workrev) |
| 1895 | nil))) | 1896 | nil))) |
| 1896 | switches) | 1897 | switches) |
| 1897 | ;; determine the new workfile version | 1898 | ;; determine the new workfile version |
| 1898 | (save-excursion | 1899 | (save-excursion |
| 1899 | (set-buffer "*vc*") | 1900 | (set-buffer "*vc*") |
| 1900 | (goto-char (point-min)) | 1901 | (goto-char (point-min)) |
| 1901 | (setq new-version | 1902 | (setq new-version |
| 1902 | (if (re-search-forward "^revision \\([0-9.]+\\).*\n" nil t) | 1903 | (if (re-search-forward "^revision \\([0-9.]+\\).*\n" nil t) |
| 1903 | (buffer-substring (match-beginning 1) (match-end 1))))) | 1904 | (buffer-substring (match-beginning 1) (match-end 1))))) |
| 1904 | (vc-file-setprop file 'vc-workfile-version new-version) | 1905 | (vc-file-setprop file 'vc-workfile-version new-version) |
| 1905 | ;; if necessary, adjust the default branch | 1906 | ;; if necessary, adjust the default branch |
| 1906 | (and rev (not (string= rev "")) | 1907 | (and rev (not (string= rev "")) |
| 1907 | (vc-do-command nil 0 "rcs" file 'MASTER | 1908 | (vc-do-command nil 0 "rcs" file 'MASTER |
| 1908 | (concat "-b" (if (vc-latest-on-branch-p file) | 1909 | (concat "-b" (if (vc-latest-on-branch-p file) |
| 1909 | (if (vc-trunk-p new-version) nil | 1910 | (if (vc-trunk-p new-version) nil |
| 1910 | (vc-branch-part new-version)) | 1911 | (vc-branch-part new-version)) |
| 1911 | new-version)))))) | 1912 | new-version)))))) |
| 1912 | (if workfile ;; CVS | 1913 | (if workfile ;; CVS |
| 1913 | ;; CVS is much like RCS | 1914 | ;; CVS is much like RCS |
| 1914 | (let ((failed t)) | 1915 | (let ((failed t)) |