aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Spiegel1995-08-17 13:29:31 +0000
committerAndré Spiegel1995-08-17 13:29:31 +0000
commitaf5e65b99614043af20ed42e99be8810b27212cb (patch)
tree406dca214d9295aa5f6f0017ba9ce0748be5c208
parent9341ff29bce91c62aab8b7714e92ec3eee6fac0c (diff)
downloademacs-af5e65b99614043af20ed42e99be8810b27212cb.tar.gz
emacs-af5e65b99614043af20ed42e99be8810b27212cb.zip
(vc-top-version): Renamed to vc-master-workfile-version. Updated all
references.
-rw-r--r--lisp/vc-hooks.el27
1 files changed, 13 insertions, 14 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 88ef2dbe1f5..9b01ea0fc9d 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -253,25 +253,26 @@ value of this flag.")
253 '(vc-head-version 253 '(vc-head-version
254 vc-default-branch 254 vc-default-branch
255 vc-master-locks)) 255 vc-master-locks))
256 ;; determine vc-top-version: it is either the head version, 256 ;; determine vc-master-workfile-version: it is either the head
257 ;; or the tip of the default branch 257 ;; of the trunk, the head of the default branch, or the
258 ;; "default branch" itself, if that is a full revision number.
258 (let ((default-branch (vc-file-getprop file 'vc-default-branch))) 259 (let ((default-branch (vc-file-getprop file 'vc-default-branch)))
259 (cond 260 (cond
260 ;; no default branch 261 ;; no default branch
261 ((or (not default-branch) (string= "" default-branch)) 262 ((or (not default-branch) (string= "" default-branch))
262 (vc-file-setprop file 'vc-top-version 263 (vc-file-setprop file 'vc-master-workfile-version
263 (vc-file-getprop file 'vc-head-version))) 264 (vc-file-getprop file 'vc-head-version)))
264 ;; default branch is actually a revision 265 ;; default branch is actually a revision
265 ((string-match "^[0-9]+\\.[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*$" 266 ((string-match "^[0-9]+\\.[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*$"
266 default-branch) 267 default-branch)
267 (vc-file-setprop file 'vc-top-version default-branch)) 268 (vc-file-setprop file 'vc-master-workfile-version default-branch))
268 ;; else, search for the tip of the default branch 269 ;; else, search for the head of the default branch
269 (t (vc-insert-file (vc-name file) "^desc") 270 (t (vc-insert-file (vc-name file) "^desc")
270 (vc-parse-buffer (list (list 271 (vc-parse-buffer (list (list
271 (concat "^\\(" 272 (concat "^\\("
272 (regexp-quote default-branch) 273 (regexp-quote default-branch)
273 "\\.[0-9]+\\)\ndate[ \t]+\\([0-9.]+\\);") 1 2)) 274 "\\.[0-9]+\\)\ndate[ \t]+\\([0-9.]+\\);") 1 2))
274 file '(vc-top-version))))) 275 file '(vc-master-workfile-version)))))
275 ;; translate the locks 276 ;; translate the locks
276 (vc-parse-locks file (vc-file-getprop file 'vc-master-locks))) 277 (vc-parse-locks file (vc-file-getprop file 'vc-master-locks)))
277 278
@@ -571,14 +572,12 @@ value of this flag.")
571 (t (vc-fetch-properties file) 572 (t (vc-fetch-properties file)
572 (vc-file-getprop file 'vc-your-latest-version)))) 573 (vc-file-getprop file 'vc-your-latest-version))))
573 574
574(defun vc-top-version (file) 575(defun vc-master-workfile-version (file)
575 ;; Return version level of the highest revision on the default branch 576 ;; Return the master file's idea of what is the current workfile version.
576 ;; If there is no default branch, return the highest version number
577 ;; on the trunk.
578 ;; This property is defined for RCS only. 577 ;; This property is defined for RCS only.
579 (cond ((vc-file-getprop file 'vc-top-version)) 578 (cond ((vc-file-getprop file 'vc-master-workfile-version))
580 (t (vc-fetch-master-properties file) 579 (t (vc-fetch-master-properties file)
581 (vc-file-getprop file 'vc-top-version)))) 580 (vc-file-getprop file 'vc-master-workfile-version))))
582 581
583(defun vc-fetch-properties (file) 582(defun vc-fetch-properties (file)
584 ;; Fetch vc-latest-version and vc-your-latest-version 583 ;; Fetch vc-latest-version and vc-your-latest-version
@@ -605,7 +604,7 @@ value of this flag.")
605 ;; Return version level of the current workfile FILE 604 ;; Return version level of the current workfile FILE
606 ;; This is attempted by first looking at the RCS keywords. 605 ;; This is attempted by first looking at the RCS keywords.
607 ;; If there are no keywords in the working file, 606 ;; If there are no keywords in the working file,
608 ;; vc-top-version is taken. 607 ;; vc-master-workfile-version is taken.
609 ;; Note that this property is cached, that is, it is only 608 ;; Note that this property is cached, that is, it is only
610 ;; looked up if it is nil. 609 ;; looked up if it is nil.
611 ;; For SCCS, this property is equivalent to vc-latest-version. 610 ;; For SCCS, this property is equivalent to vc-latest-version.
@@ -614,7 +613,7 @@ value of this flag.")
614 ((eq (vc-backend file) 'RCS) 613 ((eq (vc-backend file) 'RCS)
615 (if (vc-consult-rcs-headers file) 614 (if (vc-consult-rcs-headers file)
616 (vc-file-getprop file 'vc-workfile-version) 615 (vc-file-getprop file 'vc-workfile-version)
617 (let ((rev (cond ((vc-top-version file)) 616 (let ((rev (cond ((vc-master-workfile-version file))
618 ((vc-latest-version file))))) 617 ((vc-latest-version file)))))
619 (vc-file-setprop file 'vc-workfile-version rev) 618 (vc-file-setprop file 'vc-workfile-version rev)
620 rev))) 619 rev)))