[Top][All Lists]

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

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

From: Marcin Borkowski
Subject: Re: Project idea: a poor man's VC backend
Date: Wed, 14 Jan 2015 22:41:02 +0100

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
>>>> (
>>>> 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


Marcin Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

reply via email to

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