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

Re: [PATCH] fixes svn's chdir before invoking $EDITOR for commit log message

From: Zack Weinberg <zack_at_codesourcery.com>
Date: 2002-08-26 19:06:41 CEST

On Mon, Aug 26, 2002 at 06:37:43PM +0200, Alexis Huxley wrote:
>
> svn invokes editor in a different directory from that in
> which it itself is invoked, which means prepared log
> messages cannot intuitively be loaded into editor.

Granted this is an annoyance, but...

> The patch tries to open the temp file for the log message
> in the current directory, and only if it gets 'access denied'
> does it fall back to cd'ing to the WC base in order to
> open the temp file there.

you've missed the point. The chdir to the WC base has nothing to do
with possible OS-level access problems. It's done because we have no
other portable way to ensure that the file name passed to the external
editor is not misinterpreted by the user's shell. Consider

         svnadmin create repos
         svn co file://`pwd`/repos "My Documents"
        touch "My Documents/2002 Proposal.doc"
        svn add "My Documents/2002 Proposal.doc"
         svn commit "My Documents"

A space character is actually one of the easiest cases to deal with;
the nasty ones are !`'"\ etc. SVN must assume that any single byte
could appear in a file path, except 0x00.

Not invoking the shell is also not an option, people expect to be able
to embed shell constructs in EDITOR.

zw

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 26 19:07:22 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.