Mercurial > emacs
comparison lisp/vc-svn.el @ 85141:b16f7408cd3f
Carry through today's big terminology change to a few places where I
missed it in the back ends.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Wed, 10 Oct 2007 19:39:23 +0000 |
parents | 8ba0e30716a5 |
children | 43a9834cf1a6 d38543a1c0f9 |
comparison
equal
deleted
inserted
replaced
85140:caa57db87d2a | 85141:b16f7408cd3f |
---|---|
183 (if (equal (vc-working-revision file) "0") | 183 (if (equal (vc-working-revision file) "0") |
184 "(added)" "(modified)")) | 184 "(added)" "(modified)")) |
185 ((eq svn-state 'needs-patch) "(patch)") | 185 ((eq svn-state 'needs-patch) "(patch)") |
186 ((eq svn-state 'needs-merge) "(merge)")))) | 186 ((eq svn-state 'needs-merge) "(merge)")))) |
187 | 187 |
188 (defun vc-svn-previous-version (file rev) | 188 (defun vc-svn-previous-revision (file rev) |
189 (let ((newrev (1- (string-to-number rev)))) | 189 (let ((newrev (1- (string-to-number rev)))) |
190 (when (< 0 newrev) | 190 (when (< 0 newrev) |
191 (number-to-string newrev)))) | 191 (number-to-string newrev)))) |
192 | 192 |
193 (defun vc-svn-next-version (file rev) | 193 (defun vc-svn-next-revision (file rev) |
194 (let ((newrev (1+ (string-to-number rev)))) | 194 (let ((newrev (1+ (string-to-number rev)))) |
195 ;; The "workfile version" is an uneasy conceptual fit under Subversion; | 195 ;; The "working revision" is an uneasy conceptual fit under Subversion; |
196 ;; we use it as the upper bound until a better idea comes along. If the | 196 ;; we use it as the upper bound until a better idea comes along. If the |
197 ;; workfile version W coincides with the tree's latest revision R, then | 197 ;; workfile version W coincides with the tree's latest revision R, then |
198 ;; this check prevents a "no such revision: R+1" error. Otherwise, it | 198 ;; this check prevents a "no such revision: R+1" error. Otherwise, it |
199 ;; inhibits showing of W+1 through R, which could be considered anywhere | 199 ;; inhibits showing of W+1 through R, which could be considered anywhere |
200 ;; from gracious to impolite. | 200 ;; from gracious to impolite. |
326 (vc-svn-command nil 0 file "update") | 326 (vc-svn-command nil 0 file "update") |
327 ;; Analyze the merge result reported by SVN, and set | 327 ;; Analyze the merge result reported by SVN, and set |
328 ;; file properties accordingly. | 328 ;; file properties accordingly. |
329 (with-current-buffer (get-buffer "*vc*") | 329 (with-current-buffer (get-buffer "*vc*") |
330 (goto-char (point-min)) | 330 (goto-char (point-min)) |
331 ;; get new workfile version | 331 ;; get new working revision |
332 (if (re-search-forward | 332 (if (re-search-forward |
333 "^\\(Updated to\\|At\\) revision \\([0-9]+\\)" nil t) | 333 "^\\(Updated to\\|At\\) revision \\([0-9]+\\)" nil t) |
334 (vc-file-setprop file 'vc-working-revision (match-string 2)) | 334 (vc-file-setprop file 'vc-working-revision (match-string 2)) |
335 (vc-file-setprop file 'vc-working-revision nil)) | 335 (vc-file-setprop file 'vc-working-revision nil)) |
336 ;; get file status | 336 ;; get file status |
391 (vc-delistify (mapcar 'file-relative-name files)) "\n")) | 391 (vc-delistify (mapcar 'file-relative-name files)) "\n")) |
392 (vc-svn-command | 392 (vc-svn-command |
393 buffer | 393 buffer |
394 (if (and (= (length files) 1) (vc-stay-local-p (car files)) (fboundp 'start-process)) 'async 0) | 394 (if (and (= (length files) 1) (vc-stay-local-p (car files)) (fboundp 'start-process)) 'async 0) |
395 files "log" | 395 files "log" |
396 ;; By default Subversion only shows the log upto the working version, | 396 ;; By default Subversion only shows the log upto the working revision, |
397 ;; whereas we also want the log of the subsequent commits. At least | 397 ;; whereas we also want the log of the subsequent commits. At least |
398 ;; that's what the vc-cvs.el code does. | 398 ;; that's what the vc-cvs.el code does. |
399 "-rHEAD:0"))) | 399 "-rHEAD:0"))) |
400 | 400 |
401 (defun vc-svn-wash-log () | 401 (defun vc-svn-wash-log () |
402 "Remove all non-comment information from log output." | 402 "Remove all non-comment information from log output." |
403 ;; FIXME: not implemented for SVN | 403 ;; FIXME: not implemented for SVN |
404 nil) | 404 nil) |
405 | 405 |
406 (defun vc-svn-diff (files &optional oldvers newvers buffer) | 406 (defun vc-svn-diff (files &optional oldvers newvers buffer) |
407 "Get a difference report using SVN between two versions of fileset FILES." | 407 "Get a difference report using SVN between two revisions of fileset FILES." |
408 (and oldvers | 408 (and oldvers |
409 (catch 'no | 409 (catch 'no |
410 (dolist (f files) | 410 (dolist (f files) |
411 (or (equal oldvers (vc-working-revision f)) | 411 (or (equal oldvers (vc-working-revision f)) |
412 (throw 'no nil))) | 412 (throw 'no nil))) |
444 ;;; | 444 ;;; |
445 ;;; Snapshot system | 445 ;;; Snapshot system |
446 ;;; | 446 ;;; |
447 | 447 |
448 (defun vc-svn-create-snapshot (dir name branchp) | 448 (defun vc-svn-create-snapshot (dir name branchp) |
449 "Assign to DIR's current version a given NAME. | 449 "Assign to DIR's current revision a given NAME. |
450 If BRANCHP is non-nil, the name is created as a branch (and the current | 450 If BRANCHP is non-nil, the name is created as a branch (and the current |
451 workspace is immediately moved to that new branch). | 451 workspace is immediately moved to that new branch). |
452 NAME is assumed to be a URL." | 452 NAME is assumed to be a URL." |
453 (vc-svn-command nil 0 dir "copy" name) | 453 (vc-svn-command nil 0 dir "copy" name) |
454 (when branchp (vc-svn-retrieve-snapshot dir name nil))) | 454 (when branchp (vc-svn-retrieve-snapshot dir name nil))) |
600 ;; an uppercase or lowercase letter and can contain uppercase and | 600 ;; an uppercase or lowercase letter and can contain uppercase and |
601 ;; lowercase letters, digits, `-', and `_'. | 601 ;; lowercase letters, digits, `-', and `_'. |
602 (and (string-match "^[a-zA-Z]" tag) | 602 (and (string-match "^[a-zA-Z]" tag) |
603 (not (string-match "[^a-z0-9A-Z-_]" tag)))) | 603 (not (string-match "[^a-z0-9A-Z-_]" tag)))) |
604 | 604 |
605 (defun vc-svn-valid-version-number-p (tag) | 605 (defun vc-svn-valid-revision-number-p (tag) |
606 "Return non-nil if TAG is a valid version number." | 606 "Return non-nil if TAG is a valid revision number." |
607 (and (string-match "^[0-9]" tag) | 607 (and (string-match "^[0-9]" tag) |
608 (not (string-match "[^0-9]" tag)))) | 608 (not (string-match "[^0-9]" tag)))) |
609 | 609 |
610 ;; Support for `svn annotate' | 610 ;; Support for `svn annotate' |
611 | 611 |