unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Philip Kaludercic <philipk@posteo.net>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Reviewing versioned backups
Date: Wed, 31 Mar 2021 17:00:25 +0300	[thread overview]
Message-ID: <YGSAefycrGc+AC4/@protected.localdomain> (raw)
In-Reply-To: <87wntnv4d2.fsf@posteo.net>

* 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	other threads:[~2021-03-31 14:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 19:21 Reviewing versioned backups Philip Kaludercic
2021-03-22 20:25 ` Jean Louis
2021-03-23  8:38   ` Eric S Fraga
2021-03-23  9:31     ` Jean Louis
2021-03-23  9:44       ` Eli Zaretskii
2021-03-23 10:19         ` Jean Louis
2021-03-23 11:12           ` Eli Zaretskii
2021-03-23 15:49             ` [External] : " Drew Adams
2021-03-23  9:56       ` Thibaut Verron
2021-03-23 11:55   ` Philip Kaludercic
2021-03-23 12:36     ` John Yates
2021-03-23 12:38     ` Eli Zaretskii
2021-03-24  8:47       ` Jean Louis
2021-03-24 11:05         ` Jean Louis
2021-03-24 16:53         ` Eli Zaretskii
2021-03-26  5:50 ` Robert Thorpe
2021-03-28  0:38 ` Michael Heerdegen
2021-03-28  9:23   ` Philip Kaludercic
2021-03-30  0:36     ` Michael Heerdegen
2021-03-30  9:29       ` Philip Kaludercic
2021-03-30  9:39         ` Eli Zaretskii
2021-03-30 10:03           ` Philip Kaludercic
2021-03-30 10:16         ` Jean Louis
2021-03-30 23:41         ` Michael Heerdegen
2021-03-31  1:56           ` Stefan Monnier
2021-03-31  6:24             ` Eli Zaretskii
2021-03-31 13:29 ` Philip Kaludercic
2021-03-31 14:00   ` Jean Louis [this message]
2021-04-01 15:52   ` Stefan Monnier
2021-04-01 19:44     ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YGSAefycrGc+AC4/@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).