]> git.eshelyaron.com Git - emacs.git/commitdiff
New functions for finding the administrative directory in VC.
authorXue Fuqiao <xfq.free@gmail.com>
Fri, 4 Oct 2013 23:47:00 +0000 (07:47 +0800)
committerXue Fuqiao <xfq.free@gmail.com>
Fri, 4 Oct 2013 23:47:00 +0000 (07:47 +0800)
* vc/vc-svn.el (vc-svn-find-admin-dir):
* vc/vc-rcs.el (vc-rcs-find-admin-dir):
* vc/vc-mtn.el (vc-mtn-find-admin-dir):
* vc/vc-cvs.el (vc-cvs-find-admin-dir):
* vc/vc-arch.el (vc-arch-find-admin-dir): New functions.

lisp/ChangeLog
lisp/vc/vc-arch.el
lisp/vc/vc-cvs.el
lisp/vc/vc-mtn.el
lisp/vc/vc-rcs.el
lisp/vc/vc-svn.el
lisp/vc/vc.el

index 2f996cba2247a8f0e3db4dd951817f678940ab74..427c7394bfff26946b2933c9f69c8a5c6416a701 100644 (file)
@@ -1,3 +1,11 @@
+2013-10-04  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * vc/vc-svn.el (vc-svn-find-admin-dir):
+       * vc/vc-rcs.el (vc-rcs-find-admin-dir):
+       * vc/vc-mtn.el (vc-mtn-find-admin-dir):
+       * vc/vc-cvs.el (vc-cvs-find-admin-dir):
+       * vc/vc-arch.el (vc-arch-find-admin-dir): New functions.
+
 2013-10-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * textmodes/css-mode.el (css-smie-rules): Toplevel's a list (bug#15467).
index e9c65b49202798d0bbd89c2db5aa369d7a2ff8a0..6ef66f2402acce881fd66d0f18b4d1c25fcceee1 100644 (file)
@@ -227,6 +227,10 @@ Only the value `maybe' can be trusted :-(."
          (vc-file-setprop
           file 'arch-root root)))))
 
+(defun vc-arch-find-admin-dir (file)
+  "Return the administrative directory of FILE."
+  (expand-file-name "{arch}" (vc-arch-root file)))
+
 (defun vc-arch-register (files &optional rev _comment)
   (if rev (error "Explicit initial revision not supported for Arch"))
   (dolist (file files)
index 57e23aba4d9fb33a77dc665d45199393b7d4bf26..db3895ccbd13431cc4fee55f5598429bc9d1832f 100644 (file)
@@ -1226,6 +1226,10 @@ is non-nil."
                    table (lambda () (vc-cvs-revision-table (car files))))))
     table))
 
+(defun vc-cvs-find-admin-dir (file)
+  "Return the administrative directory of FILE."
+  (vc-find-root file "CVS"))
+
 (defun vc-cvs-ignore (file &optional _directory _remove)
   "Ignore FILE under CVS."
   (vc-cvs-append-to-ignore (file-name-directory file) file))
index 56536a26b41fb0aa1837c8ddd8379d5769af91c7..22e4004d49bb506d13e779397bd0afa0b9a9778d 100644 (file)
@@ -86,6 +86,9 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
       (vc-file-setprop file 'vc-mtn-root
                        (vc-find-root file vc-mtn-admin-format))))
 
+(defun vc-mtn-find-admin-dir (file)
+  "Return the administrative directory of FILE."
+  (expand-file-name vc-mtn-admin-dir (vc-mtn-root file)))
 
 (defun vc-mtn-registered (file)
   (let ((root (vc-mtn-root file)))
index ef1ae8294b2100b59a9fe52d09b487bb730cea09..618250dedabbe7c47bd7eda7f692463a7df31787 100644 (file)
@@ -593,6 +593,10 @@ files beneath it."
                        (and newvers (concat "-r" newvers)))
                  (vc-switches 'RCS 'diff))))
 
+(defun vc-rcs-find-admin-dir (file)
+  "Return the administrative directory of FILE."
+  (vc-find-root file "RCS"))
+
 (defun vc-rcs-comment-history (file)
   "Return a string with all log entries stored in BACKEND for FILE."
   (with-current-buffer "*vc*"
index 36f27548123117f4b8cbf61b3e09127a57a30028..1fd51dd21485f12bd5a2e0642401944eb2b9e790 100644 (file)
@@ -361,6 +361,10 @@ FILE is a file wildcard, relative to the root directory of DIRECTORY."
   "Return the list of ignored files."
   )
 
+(defun vc-svn-find-admin-dir (file)
+  "Return the administrative directory of FILE."
+  (expand-file-name vc-svn-admin-directory (vc-svn-root file)))
+
 (defun vc-svn-checkout (file &optional editable rev)
   (message "Checking out %s..." file)
   (with-current-buffer (or (get-file-buffer file) (current-buffer))
index 69098efc50beec16a9b8fc527e3650fd72b8577a..13f0d836f910914b3903afa95a3d3780a0632fe7 100644 (file)
 ;;
 ;;   Mark conflicts as resolved.  Some VC systems need to run a
 ;;   command to mark conflicts as resolved.
+;;
+;; - find-admin-dir (file)
+;;
+;;   Return the administrative directory of FILE.
 
 ;; HISTORY FUNCTIONS
 ;;