Emacs version control

July 30, 2008

I discovered how emacs version control worked today… and was duelly impressed. (Having previously thought that it didn’t work at all well – guess this means I should learn to read manuals).[1]

Regardless, emacs comes with a unified version control front-end which supports back-ends for most version control systems : I believe this includes git, svn and bzr).  This can do most of the things that one wants to do.

One of my only irritations is that one can’t revert individual lines of the diffs that it shows.

Summary for the impatient

Emacs version control is wonderful, I’m dim for not realising this earlier. To make it work do the following:

C-x v = in a file for a diff

To submit:

C-x v d <TOP LEVEL DIR> to get a list of all modifed files, then mark everything (hold down m) and press C-x v v.

If you want to see diffs for individual files press v=.

[1] As an aside, one of the reasons I hadn’t found this out earlier was because I was under the false impression the mode help (C-h m) would show all relevant keybindings… I’m not quite sure why, C-h b is (strangely!) better for this purpose.

Entry Filed under: Uncategorized. Tags: , .

3 Comments Add your own

  • 1. Rodrigo Amestica  |  August 7, 2008 at 3:36 pm

    I just wish that maintenance for pcl-cvs is just revived. I think that this mode supports only cvs, which happens to be what I need to use.

    Reply
  • 2. Interesting Emacs Links -&hellip  |  March 15, 2009 at 5:48 pm

    [...] are posts on searching multiple buffers, emacs version control and emacs buttons within the same [...]

    Reply
  • 3. Ivan Andrus  |  March 17, 2009 at 4:02 am

    I’m not sure if this is what you are wanting, but I use diff-split-hunk (C-c C-s) to take a hunk and split it into two, and then I can apply the hunk with diff-apply-hunk (C-c C-a) and it asks me if I want to revert the hunk, which I do (prefix argument also forces a reverse). This could of course be made into a function which quite easily.

    Reply

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Meta

Facets

Archives

Pages

 

July 2008
M T W T F S S
« May   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031