M-x all-things-emacs

Package Faves: psvn

May 17th, 2007 by Rob Christie · 7 Comments

If you interact with a Subversion version controlled repository and you use emacs, then you are probably already using this package. However, I use this package every day, and if someone was just starting to use emacs, this would be on my short list of packages that must be installed.

psvn mode is similar to pcl-cvs for the Concurrent Version System (CVS). It is a frontend to the subversion client (svn). M-x svn-status will prompt you for the location of your working directory (or subdirectory). Once it is entered a new buffer, *svn-status* , will open up with a status of all files within that directory and any subdirectories. It essentially runs svn status -v. This view of your working copy of the repository shows the status of the files. You have the option of hiding unchanged files with the command _. You can mark multiple files to be committed, and then commit them with the command c which will in turn bring up an edit window where you can write the comment associated with your commit. Additionally, there are commands for diffing files, editing properties, and just about every other interaction you have with subversion. Be sure to check the following options:

  • svn-status-verbose – Setting this to nil will make M-x svn-status run without the -v option at the command line.
  • svn-status-hide-unmodified – Setting this automatically performs the toggle that you can do with _ when in the *svn-status* buffer, so that you only see files with a status that has changed in your working directory.

The package and its commands become an extension of the way you work with your files within emacs. It’s one of my favorites because it doesn’t get in the way of your normal process.

Tags: faves · newbie · reviews

7 responses so far ↓

  • 1 piyo // May 18, 2007 at 12:28 am

    Thumbs up! psvn is a great front-end for Subversion. I use it everyday on Windows and Linux.

    I particularly love the feature to show the changes to be commited by diff shown by C-c C-d (svn-log-edit-svn-diff) when in the svn-log-edit buffer. Also the integration with ediff is the cat’s meow: press ‘E’ (svn-status-ediff-with-revision) on any modified file in the svn-status buffer and ediff mode shows your modified file compared to your BASE file or any revision of your choosing.

    The creator, Stefan Reichoer (xsteve), is responsive with updates and requests. I once asked for a way to update the svn-diff buffer just by pressing “g” in it and xsteve added it.

    I am not sure if psvn improves viewing and checking out repositories, but it is great for the edit-and-commit work flow.

    (commenting on version “psvn.el 24343 2007-04-02 19:45:17Z”)

  • 2 Rob Christie // May 18, 2007 at 2:20 pm

    @piyo,

    I didn’t know about C-c C-d. Thanks. I agree with you on the ediff integration. That is sweet.

  • 3 reptile // May 18, 2007 at 5:42 pm

    Hi Piyo,

    I tried it on both windows and linux. It only works on linux. Mind telling how to do it on windows?

    I am using emacs 21.3.1 on windows. I have copied psvn.el into /emacs-21.3/lisp and add (require ‘psvn) in .emacs. Each time I launch emacs, error happens: File error: “Searching for program”, “no such file or directory”, “diff”.

    The author said he has tested psvn.el for emacs 21.3 for both windows and linux. Anything I missed or did wrong?

    Thanks,

  • 4 Rob Christie // May 18, 2007 at 5:45 pm

    @reptile

    Emacs calls out to the diff program as specified by the variable diff-command. Try installing the cygwin utilities on windows and make sure that cygwin bin directory is in your path.

  • 5 reptile // May 23, 2007 at 6:48 am

    Thanks, Rob.

    I have full cygwin installed on my PC, which includes python and ruby. I also have python and ruby installed on windows evironment. To avoid launching issues I prefer not addding cygwin/bin to PATH.

    Following what you have suggest, I just copied diff.exe and diff3.exe from cygwin/bin to emacs/bin. The psvn is working now. Thanks for the help!

    reptile

  • 6 alex // Jul 17, 2008 at 3:42 pm

    It’s a nice mode, but I prefer the command line for the most operations with repository matter.

  • 7 Virginie // Nov 25, 2008 at 5:43 pm

    I have it set on a Unix machine and it works great except for the function diff, I get and error “ svn: ‘—ignore-eol-style’ is not supported”.
    Do you have any idea how to fix this?