You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andreas Wolff <ru...@ptbv.de> on 2011/01/25 19:32:07 UTC

directory problem on 'svn ci'

Hello everybody,

Today I encountered an unusual behaviour with my newly updated 
Subversion version (Win32, version 1.6.15):

Just as always, a simple commit, using 'svn ci', still fires up my 
configured editor to edit a corresponding svn-commit.tmp file.
The problem is, that this file gets created within the wrong directory: 
not within the current working directory, but one level above!
The effect is, that after finishing and saving a log message the 
'commit' won't find a 'svn-commit.tmp' in CWD.

This happens with gvim.exe, notepad.exe and even with the vintage 
'edit'. Investigation with process-explorer indicates that the editor's 
process gets started into the wrong CWD.

Can someone please confirm this is a bug?
Or maybe point to a related configuration setting? As working with -m is 
tedious and annoying.

Greetings,
Andreas

directory problem on 'svn ci'

Posted by Paul Maier <sv...@web.de>.
Hi!

I'm running 1.6.13 on Windows, and I can confirm that the temp file is
created one level up relatve to the current directory (unless I am in 
the top level dir of the WC: then the temp file is created in that dir).

For me, SVN is able to read te temp file at the place where it was put 
and edited.

Reproduction script:
svn mkdir 1/a
svn ci -m ''
cd 1/a
svn mkdir x
svn ci --editor-cmd vi
... leave the vi open, and open another window; there:
cd 1  # one level up 
ls -l

gives: 
drwxr-xr-x+ 1 Test2 Kein     0 05.02.2011 18.13 .svn/
drwxr-xr-x+ 1 Test2 Kein     0 05.02.2011 18.13 a/
-rwxr-xr-x+ 1 Test2 Kein    69 05.02.2011 18.13 svn-commit.tmp

ls -l a  # no temp file in directory a:

drwxr-xr-x+ 1 Test2 Kein 0 05.02.2011 18.13 .svn/
drwxr-xr-x+ 1 Test2 Kein 0 05.02.2011 18.13 x/


Ryan: Hope that helps.

Paul
 

> -----Ursprüngliche Nachricht-----
> Von: Ryan Schmidt [mailto:subversion-2011a@ryandesign.com] 
> Gesendet: Donnerstag, 27. Januar 2011 04:22
> An: Daniel Shahaf
> Cc: Andreas Wolff; Subversion Users
> Betreff: Re: directory problem on 'svn ci'
> 
> On Jan 26, 2011, at 12:19, Daniel Shahaf wrote:
> > Ryan Schmidt wrote on Wed, Jan 26, 2011 at 09:12:44 -0600:
> >> If I am in a subdirectory of that working copy and I commit,
> >> svn-commit.tmp is created in the parent directory. For example, if
> >> I am in /path/to/wc/foo/bar and I commit, svn-commit.tmp 
> is created in
> >> /path/to/wc/foo.
> > 
> > The directory of the tempfile depends on the invocation.  IIRC it's
> > different for 'cd wc/sub/dir/; svn ci foo' and 'svn ci 
> wc/sub/dir/' and
> > 'svn ci wc/sub/dir/foo'.
> 
> In all my tests above, I used "cd" to get to the directory in 
> question, then "svn ci" without specifying a path.
> 
> 


Re: directory problem on 'svn ci'

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 26, 2011, at 12:19, Daniel Shahaf wrote:
> Ryan Schmidt wrote on Wed, Jan 26, 2011 at 09:12:44 -0600:
>> If I am in a subdirectory of that working copy and I commit,
>> svn-commit.tmp is created in the parent directory. For example, if
>> I am in /path/to/wc/foo/bar and I commit, svn-commit.tmp is created in
>> /path/to/wc/foo.
> 
> The directory of the tempfile depends on the invocation.  IIRC it's
> different for 'cd wc/sub/dir/; svn ci foo' and 'svn ci wc/sub/dir/' and
> 'svn ci wc/sub/dir/foo'.

In all my tests above, I used "cd" to get to the directory in question, then "svn ci" without specifying a path.



Re: directory problem on 'svn ci'

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Ryan Schmidt wrote on Wed, Jan 26, 2011 at 09:12:44 -0600:
> If I am in a subdirectory of that working copy and I commit,
> svn-commit.tmp is created in the parent directory. For example, if
> I am in /path/to/wc/foo/bar and I commit, svn-commit.tmp is created in
> /path/to/wc/foo.

The directory of the tempfile depends on the invocation.  IIRC it's
different for 'cd wc/sub/dir/; svn ci foo' and 'svn ci wc/sub/dir/' and
'svn ci wc/sub/dir/foo'.

Re: directory problem on 'svn ci'

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jan 26, 2011 at 08:21:12PM +0200, Daniel Shahaf wrote:
> Ryan Schmidt wrote on Wed, Jan 26, 2011 at 09:12:44 -0600:
> > Note I did all tests with apr 1.4.2 and apr-util 1.3.10. Perhaps this
> 
> Just curious, why mix apr/apr-util of different minor (1.%d) versions?

There is no apr-util 1.4.x. See http://apr.apache.org/

Stefan

Re: directory problem on 'svn ci'

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 26, 2011, at 12:21, Daniel Shahaf wrote:

> Ryan Schmidt wrote on Wed, Jan 26, 2011 at 09:12:44 -0600:
>> Note I did all tests with apr 1.4.2 and apr-util 1.3.10. Perhaps this
> 
> Just curious, why mix apr/apr-util of different minor (1.%d) versions?

These are the current versions available in MacPorts at this time.


Re: directory problem on 'svn ci'

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Ryan Schmidt wrote on Wed, Jan 26, 2011 at 09:12:44 -0600:
> Note I did all tests with apr 1.4.2 and apr-util 1.3.10. Perhaps this

Just curious, why mix apr/apr-util of different minor (1.%d) versions?

> is an apr or apr-util issue and trying earlier versions of those would
> produce different results. Andreas, do you know what versions of apr
> and apr-util you have now, and what versions you had before?

Re: directory problem on 'svn ci'

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 26, 2011, at 05:07, Stefan Sperling wrote:
> On Tue, Jan 25, 2011 at 08:28:08PM -0600, Ryan Schmidt wrote:
>> 
>>>> I _know_, by sheer evidence of the svn-commit.tmp file being  
>>>> "physically" there, that it is created one directory level above where  
>>>> it was used to be created!
>> 
>> FWIW, on my Mac OS X installation (Mac OS X 10.6.6, SVN 1.6.15), I also notice the svn-commit.tmp is created one directory up, but that appears to be normal for Subversion (now anyway; not sure what used to be normal), and works fine for me.
> 
> Can someone take the time to confirm if this has changed from earlier
> versions, and if so, in which version this changed?

I tested 1.6.15, 1.6.4, and 1.6.0, and they all behaved the same, which was:

If I have a working copy /path/to/wc and I am in that directory and I commit, svn-commit.tmp is created in /path/to/wc.

If I am in a subdirectory of that working copy and I commit, svn-commit.tmp is created in the parent directory. For example, if I am in /path/to/wc/foo/bar and I commit, svn-commit.tmp is created in /path/to/wc/foo.

I'm still unclear what problem this behavior is perceived to cause.

Note I did all tests with apr 1.4.2 and apr-util 1.3.10. Perhaps this is an apr or apr-util issue and trying earlier versions of those would produce different results. Andreas, do you know what versions of apr and apr-util you have now, and what versions you had before?



Re: directory problem on 'svn ci'

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jan 25, 2011 at 08:28:08PM -0600, Ryan Schmidt wrote:
> 
> >> I _know_, by sheer evidence of the svn-commit.tmp file being  
> >> "physically" there, that it is created one directory level above where  
> >> it was used to be created!
> > 
> 
> FWIW, on my Mac OS X installation (Mac OS X 10.6.6, SVN 1.6.15), I also notice the svn-commit.tmp is created one directory up, but that appears to be normal for Subversion (now anyway; not sure what used to be normal), and works fine for me.
> 

Can someone take the time to confirm if this has changed from earlier
versions, and if so, in which version this changed?

Thanks,
Stefan

Re: directory problem on 'svn ci'

Posted by Ryan Schmidt <su...@ryandesign.com>.
>> I _know_, by sheer evidence of the svn-commit.tmp file being  
>> "physically" there, that it is created one directory level above where  
>> it was used to be created!
> 

FWIW, on my Mac OS X installation (Mac OS X 10.6.6, SVN 1.6.15), I also notice the svn-commit.tmp is created one directory up, but that appears to be normal for Subversion (now anyway; not sure what used to be normal), and works fine for me.



Re: directory problem on 'svn ci'

Posted by Andreas Wolff <an...@ptbv.de>.
Daniel Shahaf wrote:
> What version did you upgrade to 1.6.15 from?

 From a 1.6.4 installation.

> Are there any svn-commit.tmp, svn-commit.2.tmp preexisting?

No, there are none. I double checked and deleted all *.tmp in the 
concerned directories.

> What happens if you use the following script as your editor:
>
> 	#!/bin/sh
> 	echo "hi">  $1

That would be quite hard to do, as I'm experiencing this problem on a 
windows machine. Introducing cygwin to the problem probably won't be of 
much help.
Understanding what you are driving at, i used this Batch command script:

	@echo off
	echo Path test > %1

It yields the exact same result as the earlier mentioned true editors do.
svn-commit.tmp ends up one directory up from CWD and the 'svn 
ci'-process keeps asking me:

	Log message unchanged or not specified
	(a)bort, (c)ontinue, (e)dit:

Greetings,
Andreas

Re: directory problem on 'svn ci'

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
What version did you upgrade to 1.6.15 from?

Are there any svn-commit.tmp, svn-commit.2.tmp preexisting?

What happens if you use the following script as your editor:

	#!/bin/sh
	echo "hi" > $1

Andreas Wolff wrote on Wed, Jan 26, 2011 at 00:10:13 +0100:
> Well, if you wish:
>
> What i did is quite simple. I upgraded my subversion installation and  
> committing stopped working as it used to do.
>
> I _know_, by sheer evidence of the svn-commit.tmp file being  
> "physically" there, that it is created one directory level above where  
> it was used to be created!
> And it is also evident that "svn ci" uses the temp-file from the CWD.  
> Because when I put such a file there, while the editor is opened, its  
> contents are used as comments to be checked into the repository!
>
> Greetings,
> Andreas
>
> Daniel Shahaf wrote:
>> You haven't actually stated what IS happening, just what you THINK is
>> happening.  (Most of your assumptions regarding what should/shouldn't be
>> in cwd are wrong.)
>>
>> The short answer is, svn runs 'gvim /path/to/file' and then reads
>> /path/to/file.  The cwd isn't involved.
>>
>> Feel free to follow up with more details.
>>
>> Daniel
>>
>> Andreas Wolff wrote on Tue, Jan 25, 2011 at 19:32:07 +0100:
>>> Hello everybody,
>>>
>>> Today I encountered an unusual behaviour with my newly updated
>>> Subversion version (Win32, version 1.6.15):
>>>
>>> Just as always, a simple commit, using 'svn ci', still fires up my
>>> configured editor to edit a corresponding svn-commit.tmp file.
>>> The problem is, that this file gets created within the wrong directory:
>>> not within the current working directory, but one level above!
>>> The effect is, that after finishing and saving a log message the
>>> 'commit' won't find a 'svn-commit.tmp' in CWD.
>>>
>>> This happens with gvim.exe, notepad.exe and even with the vintage
>>> 'edit'. Investigation with process-explorer indicates that the editor's
>>> process gets started into the wrong CWD.
>>>
>>> Can someone please confirm this is a bug?
>>> Or maybe point to a related configuration setting? As working with -m is
>>> tedious and annoying.
>>>
>>> Greetings,
>>> Andreas
>

Re: directory problem on 'svn ci'

Posted by Andreas Wolff <an...@ptbv.de>.
Well, if you wish:

What i did is quite simple. I upgraded my subversion installation and 
committing stopped working as it used to do.

I _know_, by sheer evidence of the svn-commit.tmp file being 
"physically" there, that it is created one directory level above where 
it was used to be created!
And it is also evident that "svn ci" uses the temp-file from the CWD. 
Because when I put such a file there, while the editor is opened, its 
contents are used as comments to be checked into the repository!

Greetings,
Andreas

Daniel Shahaf wrote:
> You haven't actually stated what IS happening, just what you THINK is
> happening.  (Most of your assumptions regarding what should/shouldn't be
> in cwd are wrong.)
>
> The short answer is, svn runs 'gvim /path/to/file' and then reads
> /path/to/file.  The cwd isn't involved.
>
> Feel free to follow up with more details.
>
> Daniel
>
> Andreas Wolff wrote on Tue, Jan 25, 2011 at 19:32:07 +0100:
>> Hello everybody,
>>
>> Today I encountered an unusual behaviour with my newly updated
>> Subversion version (Win32, version 1.6.15):
>>
>> Just as always, a simple commit, using 'svn ci', still fires up my
>> configured editor to edit a corresponding svn-commit.tmp file.
>> The problem is, that this file gets created within the wrong directory:
>> not within the current working directory, but one level above!
>> The effect is, that after finishing and saving a log message the
>> 'commit' won't find a 'svn-commit.tmp' in CWD.
>>
>> This happens with gvim.exe, notepad.exe and even with the vintage
>> 'edit'. Investigation with process-explorer indicates that the editor's
>> process gets started into the wrong CWD.
>>
>> Can someone please confirm this is a bug?
>> Or maybe point to a related configuration setting? As working with -m is
>> tedious and annoying.
>>
>> Greetings,
>> Andreas


Re: directory problem on 'svn ci'

Posted by Andreas Wolff <an...@ptbv.de>.
Daniel Shahaf wrote:
> BTW, with gvim you may have to use 'gvim -f' as your editor.

Besides totally not being the point: That is simply wrong. GVim.exe does 
not require that parameter. And hasn't for years.

Greeting,
Andreas



Re: directory problem on 'svn ci'

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
It's quite relevant actually, but I won't bother arguing that point.

Andreas Wolff wrote on Wed, Jan 26, 2011 at 00:12:27 +0100:
> Daniel Shahaf wrote:
>> BTW, with gvim you may have to use 'gvim -f' as your editor.
>
> Besides totally not being the point: That is simply wrong. GVim.exe does  
> not require that parameter. And hasn't for years.
>
> Greeting,
> Andreas
>
>

Re: directory problem on 'svn ci'

Posted by Andreas Wolff <an...@ptbv.de>.
Daniel Shahaf wrote:
> BTW, with gvim you may have to use 'gvim -f' as your editor.

Besides totally not being the point: That is simply wrong. GVim.exe does 
not require that parameter. And hasn't for years.

Greeting,
Andreas



Re: directory problem on 'svn ci'

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
BTW, with gvim you may have to use 'gvim -f' as your editor.

Re: directory problem on 'svn ci'

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
You haven't actually stated what IS happening, just what you THINK is
happening.  (Most of your assumptions regarding what should/shouldn't be
in cwd are wrong.)

The short answer is, svn runs 'gvim /path/to/file' and then reads
/path/to/file.  The cwd isn't involved.

Feel free to follow up with more details.

Daniel

Andreas Wolff wrote on Tue, Jan 25, 2011 at 19:32:07 +0100:
> Hello everybody,
>
> Today I encountered an unusual behaviour with my newly updated  
> Subversion version (Win32, version 1.6.15):
>
> Just as always, a simple commit, using 'svn ci', still fires up my  
> configured editor to edit a corresponding svn-commit.tmp file.
> The problem is, that this file gets created within the wrong directory:  
> not within the current working directory, but one level above!
> The effect is, that after finishing and saving a log message the  
> 'commit' won't find a 'svn-commit.tmp' in CWD.
>
> This happens with gvim.exe, notepad.exe and even with the vintage  
> 'edit'. Investigation with process-explorer indicates that the editor's  
> process gets started into the wrong CWD.
>
> Can someone please confirm this is a bug?
> Or maybe point to a related configuration setting? As working with -m is  
> tedious and annoying.
>
> Greetings,
> Andreas