help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reviewing versioned backups


From: Jean Louis
Subject: Re: Reviewing versioned backups
Date: Wed, 31 Mar 2021 17:00:25 +0300
User-agent: Mutt/2.0.6 (2021-03-06)

* Philip Kaludercic <philipk@posteo.net> [2021-03-31 16:30]:
> Philip Kaludercic <philipk@posteo.net> writes:
> 
> > Hey,
> >
> > I have been using version-control for years now, but have always
> > wondered if there was a better way to review previous versions besides
> > just going into your backup directory and manually comparing them. Is
> > there maybe a vc backend that uses the backup information? Or has
> > someone written some code to make it easier that they would care to
> > share?
> 
> I sat down and wrote a sketch for a VC backend that uses version
> backups. Find it attached to this message. It's not that mature yet, but
> it does the basics. Would there be any interest to add this to Emacs or
> as an ELPA package?

I think it is great idea. Go ahead.

Back in time I was making such backups all the time, then due to
changes of configurations and $HOME directories, somehow it got lost,
then I used various version control systems, and finally RCS which I
find one of best for personal version control.

Post your packages, that we can test it.

I am currently using the database backed automated version control
with diff and expansion into files when necessary. I find it very
handy as personal and collaborative tool. I will come soon in
situation to solve merging issues.

That way my version control is out of the file system and if any file
moves anywhere else, it is matter of a second to update its full path.

But if the file moves from one place to other, then I would need to
find it in the database by using similarity function.

I need tool to compare similarity between files. PostgreSQL can do
that, but maybe there is some GNU/Linux tool. I found references to
Spacy (Python) and will look into it.

In PostgreSQL it seems easy to solve similarity by using pg_tgrm
module: https://www.postgresql.org/docs/current/pgtrgm.html

Then query like this:

SELECT vc_id, similarity((SELECT vc_value FROM vc WHERE vc_id = 6514), 
vc_value) FROM vc WHERE vc_filename ~ '/emacs-lisp/rcd-devel-utilities.el';

gives result like this

 vc_id | similarity 
-------+------------
  6514 |          1
  6486 |  0.9906323
  6507 |  0.9911007
  6508 |  0.9911007
  6509 |  0.9911007
  6550 |  0.9842665
  6611 |  0.9842665
(7 rows)

Maybe there is some similar GNU/Linux tool on command line? I would
like to know if there is some tool that may compare text to text to be
similar?


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns




reply via email to

[Prev in Thread] Current Thread [Next in Thread]