On Sat, Apr 06, 2024 at 07:21:33PM +1100, Brendan O'Dea wrote: > On Fri, 5 Apr 2024 at 16:09, david sowerby <d_sowe...@yahoo.com> wrote: > > Hi, in Vim/Neovim I can save a copy of the file when I exit. The copy is > > renamed file-$(date +%s).bak. This gives me a file with an increasing > > number plus .bak. It looks like "date+%s" and "&stime" do the same thing. > > Is this possible in vile? I know I can save a file as file.bak but I like > > to save a series of changed files, not just one. > > I vaguely recall dealing with operating systems which did this (VMS? > MVS?). Every file save added a new version, and you had to > periodically run `PURGE` to recover disk space.
VMS (DEC) is what you're thinking of. MVS (IBM) is different... I wrote a file-manager for VMS in 1984-1985, which implements a command language with "purge": https://invisible-island.net/flist/flist.html https://github.com/ThomasDickey/flist-snapshots/blob/1eeef2322704c5efe0f98b1b287c16a896657f0b/doc/flist.mem#L64 and during the initial development was able to generate a series of versions for the executable that passed 1200. > An alternative is to stash each write in a version control system. > In a previous job (more than a decade ago, before git existed), all of > our production servers had the attached script installed as both `viw` > (update file and send diff), and a link as `vis` (silently update > file). This logged changes to any production files (typically in > /etc), and stashed them in version control so you could easily revert > a problem change; see the difference b/w versions, etc. VMS had a versioning system also - "CMS", which I encountered in 1989. Its archive files looked like SCCS (interleaved deltas), except that the magic character was "*" rather than control/A. With some work, one could determine when it was introduced: http://www.bitsavers.org/pdf/dec/vax/vms/ It's mentioned in the master index for 5.0 (1988). http://www.bitsavers.org/pdf/dec/vax/vms/5.0/ (VMS DEC/CMS is unrelated to IBM VM/CMS) Nowadays, I generally review changes in vile (showing diff's in a buffer). That's usually with RCS, with Git for special cases (and snapshots). https://invisible-island.net/ded/cm_tools.html https://invisible-island.net/personal/git-exports.html (There are of course graphical diff's - sometimes helpful, sometimes not) > Note that this script will prompt for a description of the file on > first commit, and a reason for the change in subsequent updates. > > This worked pretty well for us at the time, and didn't version every > file, just the ones we cared about. > > --bod -- Thomas E. Dickey <dic...@invisible-island.net> https://invisible-island.net
signature.asc
Description: PGP signature