[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: Marcus Comstedt <marcus_at_mc.pp.se>
Date: 2002-08-09 01:11:32 CEST

Alexis Huxley <ahuxley@gmx.net> writes:

> Blimey, I had no idea it would be so complicated :-) Still, I'd like
> to try writing a patch - I'm using SVN a lot and this would be a
> small payback. I printed HACKING out today :-)
> The easiest to implement I guess is use /tmp (Unix) or use
> getenv("WINTMP") || getenv("TMP") || ... (Windows). Ok, on Unix
> /tmp can be relied upon, but can somebody confirm that the env.var +
> fallback env.vars is the way on Windows? Alternatively, Karl's way
> daunts me, and I think I would have to chicken out.
> Is TMPDIR support in APR imminent? Should I just grit my teeth -
> very gently - and type ":r <subdir>/diffs.out" in vi instead of
> ":r diffs.out". ?
> My question then is simply: what is the correct solution? Subject to
> how easy it is I'll start trying to code it (and the 'commit
> message file not left around on commit error bug' at the same time).

If you want to do something right away, what Karl and Philip talked
about should be the way to go; first try using the cwd if it's
writable, and then possibly the temp area of the current directory if
it's a wc dir, and then fall back to the current behaviour. That is,
the file should still be referenced relative to the current directory,
but the current directory set by the code could be chosen differently
from now.

The path passed to the editor must not contain components that
originate from an expanded environment variable, a repository entry,
or the expanded cwd, since that would mean letting arbitrary
characters in, which would require quoting. (And we can't do quoting,
since we're not sure which shell will be interpreting the command.)

  // Marcus

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 9 01:18:36 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.