You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Reichör <re...@web.de> on 2002/08/20 06:00:39 UTC

svn.el - an emacs interface for subversion

I started to write an emacs interface for subversion.
It should work like pcl-cvs for cvs.

It can be found at http://xsteve.nit.at/prg/emacs

I would be interessted in any thoughts about it!

Stefan.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn.el - an emacs interface for subversion

Posted by Ben Collins-Sussman <su...@collab.net>.
Nuutti Kotivuori <na...@iki.fi> writes:

> Or, if you have never taken a peek inside 'svn-dev.el', go check out
> the function 'svn-log-message' - it does pretty much the same thing.

In the Chicago Collabnet office, we live and die by this function.  I
can't imagine coding without it anymore!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

The various Emacs interfaces to SVN

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Michael Alan Dorman <md...@debian.org> writes:
> > Or, if you have never taken a peek inside 'svn-dev.el', go check out
> > the function 'svn-log-message' - it does pretty much the same thing.
> 
> Ah.  I shall have to check that out.  I missed svn-dev.el somehow.

Hmmm.  Time to paint the Big Picture here:

There are now at least three ways to for Emacs and SVN to talk to each
other:

   * tools/dev/svn-dev.el
       Written earliest, rudimentary functionality, mainly meant to
       support Subversion development specifically, but with vague
       intentions about becoming more general someday.

   * tools/client-side/vc-svn.el
       Jim Blandy wrote this to use the Emacs VC interface, which is
       designed around editing a single file at a time.  Jim is aware
       that this is not the ideal way to work with Subversion (or CVS,
       for that matter), but his first goal was compatibility with the
       Emacs VC interface.  This package does do some nifty things,
       like showing status in the modeline.

   * svn.el, at http://xsteve.nit.at/prg/emacs
       Similar to pcl-cvs, but (apparently) written from scratch, not
       based on the pcl-cvs code.

So: VC operates most naturally on a single file at a time, whereas
pcl-foo operates most naturally on multiple files at once.  Each *can*
work the other way, but it's a little awkward.

Nowadays, both vc and pcl-cvs are distributed with Emacs.  They exist
independently in the Emacs tree, eyeing each other warily, knowing
full well that they overlap heavily, and that if justice prevails they
will someday be merged.  Why?  Because there are times when one needs
to operate on directory trees, and times when one needs to operate on
single files, and there's no point having two completely separate
packages for these two complementary yet compatible styles of working.

Of course, merging them is a non-trivial task, and certainly not the
inherent responsibility of someone writing an SVN mode for Emacs.
However, if things continue as they are, then:

   - The VC interface gets svn support, but is rarely used because it
     doesn't really suit a lot of svn operations...

   - A *new* PCL-style code base gets written, probably duplicating a
     lot of what pcl-cvs does, but not sharing code with it nor with
     VC.  Sigh...

   - Users have to make seemingly arbitrary choices about which
     package to load, i.e., which interface style to use, because who
     has time to learn every available package?

This way lies only madness :-).

Please, please: if you're going to spend a lot of effort writing an
Emacs mode for Subversion, consider instead *first* tackling the
VC/pcl-foo merge problem in Emacs, then when that's done, add svn
support into the new interface (much the way Jim did with vc-svn.el,
but now the api will be richer and better able to support Subversion).

The Emacs developers will welcome you.  If you join the emacs-devel
list and say that you'd like to fix the current state of vc interface
horrendousness, I'll bet there will be very few objections.  And I
know at least one person who will cheer :-).

Or, possibly, everyone else is in the same boat that Jim and I are in:
we have time to cobble together some Elisp using the current
half-baked interfaces, but not time to solve the root problem of Emacs
not offering a single, sufficiently rich api for revision control.
Yes, if we're *all* in that boat, then I guess we'll just continue
dumping code at the problem... But it's only more duplication to sort
out later.  So if you see me sobbing in the corner, you know why.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn.el - an emacs interface for subversion

Posted by Michael Alan Dorman <md...@debian.org>.
Nuutti Kotivuori <na...@iki.fi> writes:
> That does make sense. Actually, it's the way people make changes
> even without a version control system. Try typing C-x 4 a inside a
> function in some file.

ChangeLogs seem to me to be more about duplicating 'cvs log' in the
absence of VC, where the information I'm thinking of logging might be
more like NEWS---a little less detail obsessed.

But I see your analogy, yes.

> Or, if you have never taken a peek inside 'svn-dev.el', go check out
> the function 'svn-log-message' - it does pretty much the same thing.

Ah.  I shall have to check that out.  I missed svn-dev.el somehow.

Mike.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn.el - an emacs interface for subversion

Posted by Nuutti Kotivuori <na...@iki.fi>.
Michael Alan Dorman wrote:
> I think the one non-trivial feature I would like to see from an
> interface like this is the ability to manage log information for me.
> 
> That is, I'd like the ability to annotate the changes I made to a
> given file at various points during work, and then, on commit, have
> the information from all the files I'm committing pulled together to
> be a default log message, which I could then edit as appropriate.

[...]

> Does that make sense to anyone else, or is that just my own twisted
> ideas about how to manage stuff?  Or have I missed some facility
> that is in svn itself (instead of an interface) to make this simple?

That does make sense. Actually, it's the way people make changes even
without a version control system. Try typing C-x 4 a inside a function
in some file. Or, if you have never taken a peek inside 'svn-dev.el',
go check out the function 'svn-log-message' - it does pretty much the
same thing.

This could ofcourse be pulled together in the svn.el to provide the
functionality properly - but the idea is already here.

-- Naked


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn.el - an emacs interface for subversion

Posted by Michael Alan Dorman <md...@debian.org>.
Stefan Reichör <re...@web.de> writes:
> I started to write an emacs interface for subversion.
> It should work like pcl-cvs for cvs.
> 
> It can be found at http://xsteve.nit.at/prg/emacs
> 
> I would be interessted in any thoughts about it!

It appears to fine for me on a Debian GNU/Linux system.

My only comment about what's there currently is that I think massaging
the output of svn status to be more self-explanatory would be nice---I
know I still have to think about exactly what the (unlabeled) columns
are indicating.

I think the one non-trivial feature I would like to see from an
interface like this is the ability to manage log information for me.

That is, I'd like the ability to annotate the changes I made to a
given file at various points during work, and then, on commit, have
the information from all the files I'm committing pulled together to
be a default log message, which I could then edit as appropriate.

In effect, I'd love to see a marriage between a pseudo-vc mode, which
would let me deal with files on a one-by-one basis, making changes,
annotating what I did (in place of committing), and a mode like
pcl-cvs that would let me examine the project as a whole, deciding
what to commit and so forth.

So my workflow would look like (in terms of vc):

   edit file
   C-x v v
   Enter change description
   edit other file
   C-x v v
   M-x svn-status
   c

Does that make sense to anyone else, or is that just my own twisted
ideas about how to manage stuff?  Or have I missed some facility that
is in svn itself (instead of an interface) to make this simple?

Mike.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn.el - an emacs interface for subversion

Posted by Jim Blandy <ji...@red-bean.com>.
Stefan =?iso-8859-1?q?Reich=F6r?= <re...@web.de> writes:
> I started to write an emacs interface for subversion.
> It should work like pcl-cvs for cvs.
> 
> It can be found at http://xsteve.nit.at/prg/emacs
> 
> I would be interessted in any thoughts about it!

Nice!

When the user types a command like `m' on a directory tree, it marks
the entire directory tree, but only moves point to the next line.  I
think it should move point after the last thing it marked.

DEL should move up a line and unmark the file there, as in dired.

You should use '*' in the left margin for marks, just like dired.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn.el - an emacs interface for subversion

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Stefan Reichör <re...@web.de> writes:
> I started to write an emacs interface for subversion.
> It should work like pcl-cvs for cvs.
> 
> It can be found at http://xsteve.nit.at/prg/emacs
> 
> I would be interessted in any thoughts about it!

Btw, Stefan, imho it would be fine to put this in the Subversion tree
when you feel it's ready, so you can develop it "inline", so to speak.

This is independent of whether you want to take on the larger, more
general task outlined in the long mail I just sent :-).

Probably we should call it psvn.el, to match `pcvs.el' etc (that's the
prefix for pcl-cvs in the Emacs distribution now).

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org