From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Project idea: a poor man's VC backend Date: Wed, 14 Jan 2015 22:41:02 +0100 Message-ID: <87iog9hwgo.fsf@wmi.amu.edu.pl> References: <87h9x26ue6.fsf@wmi.amu.edu.pl> <83388mt6dp.fsf@gnu.org> <87egs66keh.fsf@wmi.amu.edu.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1421271695 30478 80.91.229.3 (14 Jan 2015 21:41:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2015 21:41:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 14 22:41:31 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YBVgv-0008Ms-2l for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jan 2015 22:41:29 +0100 Original-Received: from localhost ([::1]:48201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBVgu-0004yS-BR for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jan 2015 16:41:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBVgg-0004yM-29 for help-gnu-emacs@gnu.org; Wed, 14 Jan 2015 16:41:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBVgb-0008Qp-Jg for help-gnu-emacs@gnu.org; Wed, 14 Jan 2015 16:41:14 -0500 Original-Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:60483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBVgb-0008Qi-7z for help-gnu-emacs@gnu.org; Wed, 14 Jan 2015 16:41:09 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id B1E1B47F10 for ; Wed, 14 Jan 2015 22:41:07 +0100 (CET) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pRZ9Ik9J-HMK for ; Wed, 14 Jan 2015 22:41:07 +0100 (CET) Original-Received: from localhost (117-116.echostar.pl [213.156.117.116]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 2A63347F07 for ; Wed, 14 Jan 2015 22:41:07 +0100 (CET) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:808:114:2::50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102072 Archived-At: On 2014-12-12, at 09:11, Rainer M Krug wrote: > Marcin Borkowski writes: > >> On 2014-12-11, at 18:59, Eli Zaretskii wrote: >> >>>> From: Marcin Borkowski >>>> Date: Thu, 11 Dec 2014 17:09:05 +0100 >>>> >>>> In a recent question on ESE >>>> (http://emacs.stackexchange.com/questions/2849/save-current-file-with-a-slightly-different-name) >>>> the topic of versioning by means of putting a timestamp into the >>>> filename came up again (it does have its place, especially when >>>> communicating with people unable to learn a real VCS). >>>> >>>> Just wondering: would it be possible/easy/reasonable to provide >>>> something like this within the Emacs VC framework? >>> >>> Are you talking about time-stamp.el? >> >> Not really. >> >> I mean that e.g. C-x v v will "do the right thing", for instance: >> >> I'm editing file.el (the only file in the current directory). I press >> C-x v v. I'm asked for a "commit message" and the current contents of >> file.el are save as e.g. file.el.2014-12-11-20:39:01-CET or something >> like that, with the "commit message" put at the beginning in a comment >> (for example). I edit it further, and C-x v v behaves similarly. Then, >> I can press C-x v =, and see the diff between the current version and >> the last stamped one. Or C-u C-x v = and be asked (with autocompletion) >> for the timestamp. Then, have similar commands for analogs of >> blame/annotate, revert to earlier versions etc. >> >> Of course, it's impossible to recreate the functionality of Git in this >> way. Or even RCS, I'm afraid. But for many use cases this might be >> enough (for instance, one/two authors working on a single LaTeX file of >> the paper). (One paticular functionality that would be difficult to >> implement would be branching; while possible, it might be even >> misleading and hence dangerous. Remember, the target would be the >> users, uhm, not wise enough to use a real VCS;-).) >> >> The rationale would be that e.g. if I work with a non-computer-savvy >> researcher, any "real" VCS might be confusing; I might be expected to >> e.g. send him file versions with a timestamp in the filename etc. > > As it seems you are really aware of the pitfalls and dangers of using > this approach, I would suggest to not look into creating a > "time-stamp-file-based" VCS, but rather use on your side e.g. git, and > write some batch files which will be create time-stamped versions based > on git and also add a new time-stamped (time of check in) file to git. In this way, you > will have a good working VCS (git) with all the advantages, but also the > possibility to create consistent time-stamped files and check in new > time-stamped files. Let me necromance this thread. Thanks for this suggestion; it is a very good one. However, what I *really* would like to do is learning how Emacs' VC works. Now I have another problem. I decided to start reading the code for VC, and after seeing the lisp/vc directory with its 41 files, felt a bit overwhelmed. Any suggestions on where to start reading to actually understand anything? > Cheers, > > Rainer Regards, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University