;;; vc-pijul.el --- a VC backend for Pijul -*- lexical-binding: t -*-
;;; Copyright (C) 2004 Jorgen Schaefer <forcer@forcix.cx>
;;; Copyright (C) 2004-2014 Juliusz Chroboczek <jch@pps.univ-paris-diderot.fr>
;;; Copyright (C) 2022 Greg Pfeil <greg@techhnomadic.org>
;; Author: Jorgen Schaefer <forcer@forcix.cx>
;; Juliusz Chroboczek <jch@pps.univ-paris-diderot.fr>
;; Greg Pfeil <greg@techhnomadic.org>
;; Maintainer: Greg Pfeil <greg@techhnomadic.org>
;; Keywords: vc
;; Package-Version: 20220926.2130
;; Package-X-Original-Version: 20141122.1326
;; Version: 0.1
;; Package-Requires: ((emacs "24"))
;;; This program is 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.
;;; This program 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.
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
;;; 02111-1307, USA.
;;; Commentary:
;; Pijul is a distributed version control system, available at
;; http://www.pijul.net/
;; This version of vc-pijul was tested with Emacs 28. It might still work on
;; Emacs 24, but it currently uses features that aren’t available prior to
;; that.
;; A few ideas for this file are directly taken from vc-svn.el. Thanks to
;; Jim Blandy. This file has been forked from vc-darcs.el. Thanks to Jorgen
;; Schaefer, Juliusz Chroboczek, and Libor Čapák <capak@inputwish.com>.
;; To install, put this file into your load-path and add the following to
;; your emacs init file:
;; (add-to-list 'vc-handled-backends 'Pijul)
;; There are a few reasons why vc is difficult to coerce into using Pijul
;; as a backend. By default, vc expects files (not trees) to be versioned
;; as nodes in an AND/OR tree, as is done by RCS and CVS. Recent version
;; of vc allow some customisation of that, which allows smooth integration
;; with e.g. subversion.
;; Pijul doesn't version files at all; a Pijul repository is a collection
;; of patches, and a particular file version is just the set of patches
;; that have been applied in order to build it. While patches might be
;; reordered when moving between repositories, they usually remain ordered
;; (notable exceptions to that being unpull and optimize); hence,
;; a convenient mental shortcut is to identify a version by the latest
;; patch included in that version. This is what we do.
;; Internally, Pijul identifies a patch by its hash, which you may obtain
;; by using `pijul log`. We follow that approach in this code. However,
;; as a hash might be difficult to remember at times (it's 53 characters
;; long), all commands that might take an interactive argument also accept
;; a regexp identifying a patch name. See VC-PIJUL-REV-TO-HASH.
;; The fit with vc is still not quite perfect. A sore point is that vc
;; doesn't normalise versions; hence, if you have a patch called ``Initial
;; import'', you might end up with distinct but identical buffers called
;; vc-pijul.el~Init~, vc-pijul.el~Initial~ and so on.
;;; Code:
;;; State-querying functions
;; Currently, there is not an easy way to tell the default remote from the other
;; remotes (other than parsing the config file), the oldest one the default, and;; order the list chronologically.
;;; State-changing functions
;;; History functions
;;; vc-pijul.el ends here