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

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

Re: Automatic versioning


From: Timothy Hobbs
Subject: Re: Automatic versioning
Date: Fri, 04 Apr 2008 21:21:15 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Xavier Maillard <xma@gnu.org> writes:
>
> Another solution would be to "embed" some sort of the mechanism
> from a modern DVC like GNU Bazaar or Git. Given the fact that
> they have been "libitized" (you can take advantage of them by
> linking your program against them), this should be quite easy to
> implement.

I am a bit cautious of any system with a hierarchical 'bottom' to it.  Git,
Bazaar, CVS, SVN all have these nasty things called repositories which have to
be kept track of.  Do you make / the repository?  Clearly not, you would then
have to give user write perms to it.  Do you make ~/ the repository?  Clearly
not,then etc files wouldn't be versioned in the same system.  I think RCS is
much better from this standpoint, but I'm not sure exactly how to implement
things with RCS.

VC would be great if instead of having that funky C-x v v ring for locking, and
checking in files, files where locked with an after find-file hook, and checked
in with a pre-save hook, given that there was some way to pragmatically skip
the comments prompt(which I always leave blank anyways).

Then there would be two more functions to write.

vc-prev bound to something very convenient like C-<left>

and

vc-next C-<right>

vc-prev would call a cleaned up version of vc-version-other-window which didn't
create the temp files, and of course went to the previous version, instead of
prompting.  vc-prev/next could be even better if they split the frame into 3
windows vertically:

1) Showing the diff between the selected(as it the one cycled to with
vc-next/prev) version and the one before it.

2) Showing the selected version.

3) Showing the diff between the selected version and the latest one.

This would make the whole thing slightly better than media-wiki, because that
3rd diff<the on showing changes in the latest> would be quite use full.

I tried to implement this today, but I ran into significant hurdles.

1) vc's C-x v v is quite a complex bit of functionality, and I wasn't able to
figure out what the basic back-end functions for locking and checking in where.
There is vc-rcs-checkout and vc-rcs-checkin but I wasn't able to figure out how
to use these in the find-file hook and the save buffer defadvice.

2) vc-version-other-window creates those nasty little .~version-number~ temp
files and doesn't clean up after itself.

3) I couldn't figure out how to get the version before "version" or the version
after "version".

So basically all of my prospecting of the vc api failed.

I hope there is someone out there who is more competent with vc than I who is
willing to give me guidance.  I plan to publish this work, so one special
consideration is that I don't walk over those who use vc for svn/cvs ect. I
think that once this is made everyone will realise that seamless versioning in
all files(like a very long term, visual undo)(as well as a method of seeing how
your work progressed/evolved) is not just the way to go, but something that in a
few months people will wonder how they lived without.

Wish me luck, and give me help!  Please.

Timothy Hobbs




reply via email to

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