From 77ab06cf9e2bd3dbe878df5bb07eadba5daddc47 Mon Sep 17 00:00:00 2001 From: "John S. Yates, Jr" Date: Wed, 25 Jan 2023 21:14:27 -0500 Subject: [PATCH 0/3] *** SUBJECT HERE *** MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a series of three bisectable (I hope :-) patches that culminate in support of a new Emacs backup scheme: * [PATCH 1/3] Refactor and document vc-find-revision caching * [PATCH 2/3] Introduce VC timemachine capability * [PATCH 3/3] Introduce vc-bos: backup on save (to an RCS file) This Backup-On-Save scheme exploits a file system mirror scheme introduced in the first patch. By exploiting a little known aspect of RCS's algorithm for locating a master file, backups are stored completely removed from the work file (i.e. no local RCS directories) and under exactly the same filename (i.e. no ',v' suffix or similar). Accessing backed-ups exploits a new vc-timemachine capability, introduced in the second patch. Both the design and code owe much to Peter Stiernström's original git-timemachine.el. To sidestep any copyright issues, Peter has graciously assigned git-timemachine.el's copyright to the FSF. With the submission timemachine functionality is available in both vc-git and vc-rcs. This backup scheme works equaly well with files already under some VCS as well as with files that are not currently version controlled. For me (primarily a C++ programmer) this is: * My first significant bit of elisp * My first exposure to the VC codebase * My first Emacs / FSF submission I welcome all nature of feedback: * Code criticism * Violations of pertinent standards * Bug reports * Suggested improvement * . . . /john John S. Yates, Jr (3): Refactor and document vc-find-revision caching Introduce VC timemachine capability Introduce vc-bos: backup on save (to an RCS file) lisp/vc/vc-bos.el | 207 ++++++++++++++++++ lisp/vc/vc-git.el | 89 +++++++- lisp/vc/vc-hooks.el | 10 +- lisp/vc/vc-rcs.el | 50 +++++ lisp/vc/vc-timemachine.el | 438 ++++++++++++++++++++++++++++++++++++++ lisp/vc/vc.el | 292 ++++++++++++++++--------- 6 files changed, 985 insertions(+), 101 deletions(-) create mode 100644 lisp/vc/vc-bos.el create mode 100644 lisp/vc/vc-timemachine.el -- 2.37.2