From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Reviewing versioned backups Date: Wed, 31 Mar 2021 17:00:25 +0300 Message-ID: References: <87a6qvat9v.fsf@posteo.net> <87wntnv4d2.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12447"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0.6 (2021-03-06) Cc: help-gnu-emacs@gnu.org To: Philip Kaludercic Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 31 16:03:48 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRbRk-00037v-IG for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 16:03:48 +0200 Original-Received: from localhost ([::1]:57258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRbRj-0000gr-Jo for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 31 Mar 2021 10:03:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRbQv-0000g6-9K for help-gnu-emacs@gnu.org; Wed, 31 Mar 2021 10:02:57 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:35853) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRbQo-0007cX-JI for help-gnu-emacs@gnu.org; Wed, 31 Mar 2021 10:02:56 -0400 Original-Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E0AB.0000000060648107.00002D2F; Wed, 31 Mar 2021 07:02:47 -0700 Mail-Followup-To: Philip Kaludercic , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87wntnv4d2.fsf@posteo.net> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128794 Archived-At: * Philip Kaludercic [2021-03-31 16:30]: > Philip Kaludercic 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