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

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

Re: Project idea: a poor man's VC backend


From: Rainer M Krug
Subject: Re: Project idea: a poor man's VC backend
Date: Fri, 12 Dec 2014 09:11:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin)

Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:

> On 2014-12-11, at 18:59, Eli Zaretskii wrote:
>
>>> From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
>>> 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.

Cheers,

Rainer


>
> Best,

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

Attachment: signature.asc
Description: PGP signature


reply via email to

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