diff options
| author | Stefan Monnier | 2003-05-09 14:13:40 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-05-09 14:13:40 +0000 |
| commit | 2766aaafdc18c926fe1d3f82f558ec26fdeabb14 (patch) | |
| tree | 3755a6e0d05cd31755b7b726f022039915978af8 | |
| parent | ca2de34225f857715a8b030261f3102005d7b036 (diff) | |
| download | emacs-2766aaafdc18c926fe1d3f82f558ec26fdeabb14.tar.gz emacs-2766aaafdc18c926fe1d3f82f558ec26fdeabb14.zip | |
(vc-svn-rename-file): New fun.
(vc-svn-diff): Correctly check svn's return status.
| -rw-r--r-- | lisp/vc-svn.el | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index 449aa08e56b..eadea67d2e9 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el | |||
| @@ -291,6 +291,9 @@ This is only possible if SVN is responsible for FILE's directory.") | |||
| 291 | (concat "-r" rev)) | 291 | (concat "-r" rev)) |
| 292 | switches))) | 292 | switches))) |
| 293 | 293 | ||
| 294 | (defun vc-svn-rename-file (old new) | ||
| 295 | (vc-svn-command nil 0 new "move" (file-relative-name old))) | ||
| 296 | |||
| 294 | (defun vc-svn-revert (file &optional contents-done) | 297 | (defun vc-svn-revert (file &optional contents-done) |
| 295 | "Revert FILE to the version it was based on." | 298 | "Revert FILE to the version it was based on." |
| 296 | (unless contents-done | 299 | (unless contents-done |
| @@ -395,17 +398,16 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 395 | (let* ((switches (vc-switches 'SVN 'diff)) | 398 | (let* ((switches (vc-switches 'SVN 'diff)) |
| 396 | (async (and (vc-svn-stay-local-p file) | 399 | (async (and (vc-svn-stay-local-p file) |
| 397 | (or oldvers newvers) ; Svn diffs those locally. | 400 | (or oldvers newvers) ; Svn diffs those locally. |
| 398 | (fboundp 'start-process))) | 401 | (fboundp 'start-process)))) |
| 399 | (status | 402 | (apply 'vc-svn-command "*vc-diff*" |
| 400 | (apply 'vc-svn-command "*vc-diff*" | 403 | (if async 'async 0) |
| 401 | (if async 'async 1) | 404 | file "diff" |
| 402 | file "diff" | 405 | (append |
| 403 | (append | 406 | (when switches |
| 404 | (when switches | 407 | (list "-x" (mapconcat 'identity switches " "))) |
| 405 | (list "-x" (mapconcat 'identity switches " "))) | 408 | (when oldvers |
| 406 | (when oldvers | 409 | (list "-r" (if newvers (concat oldvers ":" newvers) |
| 407 | (list "-r" (if newvers (concat oldvers ":" newvers) | 410 | oldvers))))) |
| 408 | oldvers))))))) | ||
| 409 | (if async 1 ; async diff => pessimistic assumption | 411 | (if async 1 ; async diff => pessimistic assumption |
| 410 | ;; For some reason `svn diff' does not return a useful | 412 | ;; For some reason `svn diff' does not return a useful |
| 411 | ;; status w.r.t whether the diff was empty or not. | 413 | ;; status w.r.t whether the diff was empty or not. |