;;; vc-fossil.el --- VC backend for the fossil sofware configuraiton management system -*- lexical-binding: t; -*-
;; Author: Venkat Iyer <venkat@comit.com>
;; Maintainer: Alfred M. Szmidt <ams@gnu.org>
;; Version: 20221120
;; Package-Version: 20221120.908
;; Package-Commit: e059ca466cc8914757c6bdb26fa9cc6b0820a9c1
;; vc-fossil.el free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published
;; by the Free Software Foundation, either version 3 of the License,
;; or (at your option) any later version.
;; vc-fossil.el is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;; For a copy of the license, please see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file contains a VC backend for the fossil version control
;; system.
;;; Todo:
;; 1) Implement the rest of the vc interface. See the comment at the
;; beginning of vc.el. The current status is:
;; FUNCTION NAME STATUS
;; BACKEND PROPERTIES
;; * revision-granularity OK
;; - update-on-retrieve-tag OK
;; STATE-QUERYING FUNCTIONS
;; * registered (file) OK
;; * state (file) OK
;; - dir-status-files (dir files update-function) OK
;; - dir-extra-headers (dir) OK
;; - dir-printer (fileinfo) ??
;; - status-fileinfo-extra (file) ??
;; * working-revision (file) OK
;; * checkout-model (files) OK
;; - mode-line-string (file) ??
;; STATE-CHANGING FUNCTIONS
;; * create-repo () OK
;; * register (files &optional comment) OK
;; - responsible-p (file) OK
;; - receive-file (file rev) ??
;; - unregister (file) OK
;; * checkin (files comment &optional rev) OK
;; - checkin-patch (patch-string comment) ??
;; * find-revision (file rev buffer) OK
;; * checkout (file &optional rev) OK
;; * revert (file &optional contents-done) OK
;; - merge-file (file &optional rev1 rev2) ??
;; - merge-branch () OK
;; - merge-news (file) ??
;; - pull (prompt) OK
;; ? push (prompt) OK
;; - steal-lock (file &optional revision) ??
;; - modify-change-comment (files rev comment) BROKEN
;; This requires a different version of LOG-VIEW-EXTRACT-COMMENT
;; and LOG-VIEW-CURRENT-FILE to work.
;;
;; For LOG-VIEW-CURRENT-FILE there has been a bug report filed
;; with a fix for GNU Emacs
;; (https://lists.gnu.org/archive/html/emacs-devel/2022-05/msg00759.html).
;;
;; LOG-VIEW-EXTRACT-COMMENT needs to be fixed as well somehow to
;; extract the actual log message around point.
;;
;; - mark-resolved (files) ??
;; - find-admin-dir (file) ??
;; HISTORY FUNCTIONS
;; * print-log (files buffer &optional shortlog start-revision limit) OK
;; * log-outgoing (buffer remote-location) ??
;; * log-incoming (buffer remote-location) ??
;; - log-search (buffer pattern) ??
;; - log-view-mode () OK
;; - show-log-entry (revision) ??
;; - comment-history (file) ??
;; - update-changelog (files) ??
;; * diff (files &optional rev1 rev2 buffer async) OK
;; - revision-completion-table (files) ??
;; - annotate-command (file buf &optional rev) OK
;; - annotate-time () OK
;; - annotate-current-time () ??
;; - annotate-extract-revision-at-line () OK
;; - region-history (file buffer lfrom lto) ??
;; - region-history-mode () ??
;; - mergebase (rev1 &optional rev2) ??
;; TAG/BRANCH SYSTEM
;; - create-tag (dir name branchp) OK
;; - retrieve-tag (dir name update) OK
;; MISCELLANEOUS
;; - make-version-backups-p (file) ??
;; - root (file) OK
;; - ignore (file &optional directory remove) ??
;; - ignore-completion-table (directory) ??
;; - find-ignore-file (file) OK
;; - previous-revision (file rev) OK
;; - next-revision (file rev) OK
;; - log-edit-mode () ??
;; - check-headers () ??
;; - delete-file (file) OK
;; - rename-file (old new) OK
;; - find-file-hook () ??
;; - extra-menu () ??
;; - extra-dir-menu () ??
;; - conflicted-files (dir) ??
;; - repository-url (file-or-dir &optional remote-name) OK
;; - prepare-patch (rev) ??
;;; Code:
;For url-user/passwd setters
;; Internal Functions
;; Customization
;; BACKEND PROPERTIES
;; STATE-QUERYING FUNCTIONS
;;;###autoload (defun vc-fossil-registered (file)
;;;###autoload "Return non-nil if FILE is registered with Fossil."
;;;###autoload (if (vc-find-root file ".fslckout") ; Short cut.
;;;###autoload (progn
;;;###autoload (load "vc-fossil" nil t)
;;;###autoload (vc-fossil-registered file))))
;; - dir-printer (fileinfo)
;; - status-fileinfo-extra (file)
;; - mode-line-string (file)
;; STATE-CHANGING FUNCTIONS
;; - receive-file (file rev)
;; - checkin-patch (patch-string comment)
;; - merge-file (file &optional rev1 rev2)
;; - merge-news (file)
;; - steal-lock (file &optional revision)
;; - mark-resolved (files)
;; - find-admin-dir (file)
;; HISTORY FUNCTIONS
;; * log-outgoing (buffer remote-location)
;; * log-incoming (buffer remote-location)
;; - log-search (buffer pattern)
;; - show-log-entry (revision)
;; - comment-history (file)
;; - update-changelog (files)
;; - annotate-current-time ()
;; - region-history (file buffer lfrom lto)
;; - region-history-mode ()
;; TAG SYSTEM
;; MISCELLANEOUS
;; - make-version-backups-p (file)
;; - ignore (file &optional directory)
;; - ignore-completion-table
;; - log-edit-mode ()
;; - check-headers ()
;; - find-file-hook ()
;; - extra-menu ()
;; - extra-dir-menu ()
;; - conflicted-files (dir)
;; - prepare-patch (rev)
;; Useful functions for interacting with Fossil
;; This snippet enables the Fossil VC backend so it will work once
;; this file is loaded. By also marking it for inclusion in the
;; autoloads file, installing packaged versions of this should work
;; without users having to monkey with their init files.
;;;###autoload
;;; vc-fossil.el ends here