[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit invokes $EDITOR not where svn run from

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-08-08 16:52:11 CEST

Alexis Huxley <ahuxley@gmx.net> writes:

> Hi, ok, it's clear that svn is cd'ing to the root of the working copy,
> to do some stuff, and then directly invoking $EDITOR from there.
> In another SCM product ;-) from a subdirectory I often do the
> equivalent of 'svn diff > diff.out', then 'svn commit', and read
> the diff.out file into the editor, and edit it down to a change list.
> Ok, it is possible with svn but by specifying paths relative to
> the WC root, not to the directory in which I invoked svn.

You could edit diff.out prior to the commit, and then use the commit
option '-F diff.out' to cause the file contents to be used as the log

> Is it possible for svn to cd back to the original directory immediately
> before invoking EDITOR?

No, it was a deliberate decision to cd. The temporary file is created
in the temp. area of the path to be committed. By cd'ing we don't
need to put the path into a system() call, which means that the shell
cannot interpret characters in the path as "special".

If subversion had an interface to /tmp and $TMPDIR (or whatever any
given platform uses) we could use that, such a path should be safe and
so we could avoid the cd. It is likely that such an interface would
need APR support for the platform dependent bits; probably not very
hard to do but nobody has done it.

Philip Martin
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 8 16:52:43 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.