(texinfo-all-menus-update)
[bpt/emacs.git] / lisp / vc-hooks.el
index 6ddba1a..0b5cba9 100644 (file)
@@ -58,7 +58,8 @@ to use --brief and sets this variable to remember whether it worked.")
     vc-find-cvs-master)
   "*Where to look for version-control master files.
 The first pair corresponding to a given back end is used as a template
-when creating new masters.")
+when creating new masters.
+Setting this variable to nil turns off use of VC entirely.")
 
 (defvar vc-make-backup-files nil
   "*If non-nil, backups of registered files are made as with other files.
@@ -785,7 +786,7 @@ For CVS, the full name of CVS/Entries is returned."
               ;; normal entry
               ((re-search-forward
                 (concat "^/" (regexp-quote basename) 
-                        "/\\([^/]*\\)/[^ /]* \\([A-Z][a-z][a-z]\\) *\\([0-9]*\\) \\([0-9]*\\):\\([0-9]*\\):\\([0-9]*\\) \\([0-9]*\\)")
+                        "/\\([^/]*\\)/\\([^/+]*\\+\\)?[^ /]* \\([A-Z][a-z][a-z]\\) *\\([0-9]*\\) \\([0-9]*\\):\\([0-9]*\\):\\([0-9]*\\) \\([0-9]*\\)")
                 nil t)
                (setq case-fold-search fold)  ;; restore the old value
                ;; We found it.  Store away version number now that we 
@@ -796,16 +797,16 @@ For CVS, the full name of CVS/Entries is returned."
                ;; If the file hasn't been modified since checkout,
                ;; store the checkout-time.
                (let ((mtime (nth 5 (file-attributes file)))
-                     (second (string-to-number (match-string 6)))
-                     (minute (string-to-number (match-string 5)))
-                     (hour (string-to-number (match-string 4)))
-                     (day (string-to-number (match-string 3)))
-                     (year (string-to-number (match-string 7))))
+                     (second (string-to-number (match-string 7)))
+                     (minute (string-to-number (match-string 6)))
+                     (hour (string-to-number (match-string 5)))
+                     (day (string-to-number (match-string 4)))
+                     (year (string-to-number (match-string 8))))
                  (if (equal mtime
                             (encode-time
                              second minute hour day
                              (/ (string-match
-                                 (match-string 2)
+                                 (match-string 3)
                                  "xxxJanFebMarAprMayJunJulAugSepOctNovDec")
                                 3)
                              year 0))
@@ -1030,6 +1031,7 @@ Returns t if checkout was successful, nil otherwise."
       (define-key vc-prefix-map "a" 'vc-update-change-log)
       (define-key vc-prefix-map "c" 'vc-cancel-version)
       (define-key vc-prefix-map "d" 'vc-directory)
+      (define-key vc-prefix-map "g" 'vc-annotate)
       (define-key vc-prefix-map "h" 'vc-insert-headers)
       (define-key vc-prefix-map "i" 'vc-register)
       (define-key vc-prefix-map "l" 'vc-print-log)
@@ -1046,8 +1048,13 @@ Returns t if checkout was successful, nil otherwise."
     ()
   ;;(define-key vc-menu-map [show-files]
   ;;  '("Show Files under VC" . (vc-directory t)))
+  (define-key vc-menu-map [vc-retrieve-snapshot]
+    '("Retrieve Snapshot" . vc-retrieve-snapshot))
+  (define-key vc-menu-map [vc-create-snapshot]
+    '("Create Snapshot" . vc-create-snapshot))
   (define-key vc-menu-map [vc-directory] '("Show Locked Files" . vc-directory))
   (define-key vc-menu-map [separator1] '("----"))
+  (define-key vc-menu-map [vc-annotate] '("Annotate" . vc-annotate))
   (define-key vc-menu-map [vc-rename-file] '("Rename File" . vc-rename-file))
   (define-key vc-menu-map [vc-version-other-window]
     '("Show Other Version" . vc-version-other-window))
@@ -1066,6 +1073,7 @@ Returns t if checkout was successful, nil otherwise."
   (define-key vc-menu-map [vc-register] '("Register" . vc-register)))
 
 (put 'vc-rename-file 'menu-enable 'vc-mode)
+(put 'vc-annotate 'menu-enable '(eq (vc-buffer-backend) 'CVS))
 (put 'vc-version-other-window 'menu-enable 'vc-mode)
 (put 'vc-diff 'menu-enable 'vc-mode)
 (put 'vc-update-change-log 'menu-enable