summaryrefslogtreecommitdiff
path: root/lisp/vc-svn.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2003-05-09 14:13:40 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2003-05-09 14:13:40 +0000
commit2766aaafdc18c926fe1d3f82f558ec26fdeabb14 (patch)
tree3755a6e0d05cd31755b7b726f022039915978af8 /lisp/vc-svn.el
parentca2de34225f857715a8b030261f3102005d7b036 (diff)
downloademacs-2766aaafdc18c926fe1d3f82f558ec26fdeabb14.tar.gz
(vc-svn-rename-file): New fun.
(vc-svn-diff): Correctly check svn's return status.
Diffstat (limited to 'lisp/vc-svn.el')
-rw-r--r--lisp/vc-svn.el24
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.")
(concat "-r" rev))
switches)))
+(defun vc-svn-rename-file (old new)
+ (vc-svn-command nil 0 new "move" (file-relative-name old)))
+
(defun vc-svn-revert (file &optional contents-done)
"Revert FILE to the version it was based on."
(unless contents-done
@@ -395,17 +398,16 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
(let* ((switches (vc-switches 'SVN 'diff))
(async (and (vc-svn-stay-local-p file)
(or oldvers newvers) ; Svn diffs those locally.
- (fboundp 'start-process)))
- (status
- (apply 'vc-svn-command "*vc-diff*"
- (if async 'async 1)
- file "diff"
- (append
- (when switches
- (list "-x" (mapconcat 'identity switches " ")))
- (when oldvers
- (list "-r" (if newvers (concat oldvers ":" newvers)
- oldvers)))))))
+ (fboundp 'start-process))))
+ (apply 'vc-svn-command "*vc-diff*"
+ (if async 'async 0)
+ file "diff"
+ (append
+ (when switches
+ (list "-x" (mapconcat 'identity switches " ")))
+ (when oldvers
+ (list "-r" (if newvers (concat oldvers ":" newvers)
+ oldvers)))))
(if async 1 ; async diff => pessimistic assumption
;; For some reason `svn diff' does not return a useful
;; status w.r.t whether the diff was empty or not.