diff options
| author | André Spiegel | 1995-11-02 09:36:01 +0000 |
|---|---|---|
| committer | André Spiegel | 1995-11-02 09:36:01 +0000 |
| commit | 99e76ddadef34ac2a6821c530b0d2fd97f239664 (patch) | |
| tree | 032d263bc20c7a2299f3c1ef77e580b1f7bbb1de | |
| parent | 318880476ed9a7af897cfc3c0d26becc7a855756 (diff) | |
| download | emacs-99e76ddadef34ac2a6821c530b0d2fd97f239664.tar.gz emacs-99e76ddadef34ac2a6821c530b0d2fd97f239664.zip | |
(vc-backend-diff): Use new variable vc-rcsdiff-knows-brief.
| -rw-r--r-- | lisp/vc.el | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 54d43ef08a5..d550dd4a277 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -2138,13 +2138,13 @@ From a program, any arguments are passed to the `rcs2log' script." | |||
| 2138 | (setq oldvers (vc-lookup-triple file oldvers)) | 2138 | (setq oldvers (vc-lookup-triple file oldvers)) |
| 2139 | (setq newvers (vc-lookup-triple file newvers))) | 2139 | (setq newvers (vc-lookup-triple file newvers))) |
| 2140 | ((eq backend 'RCS) | 2140 | ((eq backend 'RCS) |
| 2141 | (if (not oldvers) (setq oldvers (vc-workfile-version file))))) | 2141 | (if (not oldvers) (setq oldvers (vc-workfile-version file))) |
| 2142 | ;; If we know that --brief is not supported, don't try it. | ||
| 2143 | (setq cmp (and cmp (not (eq vc-rcsdiff-knows-brief 'no)))))) | ||
| 2142 | ;; SCCS and RCS shares a lot of code. | 2144 | ;; SCCS and RCS shares a lot of code. |
| 2143 | (cond | 2145 | (cond |
| 2144 | ((or (eq backend 'SCCS) (eq backend 'RCS)) | 2146 | ((or (eq backend 'SCCS) (eq backend 'RCS)) |
| 2145 | (let* ((command (if (eq backend 'SCCS) | 2147 | (let* ((command (if (eq backend 'SCCS) "vcdiff" "rcsdiff")) |
| 2146 | "vcdiff" | ||
| 2147 | "rcsdiff")) | ||
| 2148 | (mode (if (eq backend 'RCS) 'WORKFILE 'MASTER)) | 2148 | (mode (if (eq backend 'RCS) 'WORKFILE 'MASTER)) |
| 2149 | (options (append (list (and cmp "--brief") | 2149 | (options (append (list (and cmp "--brief") |
| 2150 | "-q" | 2150 | "-q" |
| @@ -2156,11 +2156,17 @@ From a program, any arguments are passed to the `rcs2log' script." | |||
| 2156 | (list diff-switches))))) | 2156 | (list diff-switches))))) |
| 2157 | (status (apply 'vc-do-command "*vc-diff*" 2 | 2157 | (status (apply 'vc-do-command "*vc-diff*" 2 |
| 2158 | command file mode options))) | 2158 | command file mode options))) |
| 2159 | ;; Some RCS versions don't understand "--brief"; work around this. | 2159 | ;; If --brief didn't work, do a double-take and remember it |
| 2160 | ;; for the future. | ||
| 2160 | (if (eq status 2) | 2161 | (if (eq status 2) |
| 2161 | (apply 'vc-do-command "*vc-diff*" 1 command file 'WORKFILE | 2162 | (prog1 |
| 2162 | (if cmp (cdr options) options)) | 2163 | (apply 'vc-do-command "*vc-diff*" 1 command file 'WORKFILE |
| 2163 | status))) | 2164 | (if cmp (cdr options) options)) |
| 2165 | (if cmp (setq vc-rcsdiff-knows-brief 'no))) | ||
| 2166 | ;; If --brief DID work, remember that, too. | ||
| 2167 | (and cmp (not vc-rcsdiff-knows-brief) | ||
| 2168 | (setq vc-rcsdiff-knows-brief 'yes)) | ||
| 2169 | status))) | ||
| 2164 | ;; CVS is different. | 2170 | ;; CVS is different. |
| 2165 | ((eq backend 'CVS) | 2171 | ((eq backend 'CVS) |
| 2166 | (if (string= (vc-workfile-version file) "0") ;CVS | 2172 | (if (string= (vc-workfile-version file) "0") ;CVS |