You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Husterer, Thomas RD-CP1" <Th...@heidelberg.com> on 2006/10/12 15:09:35 UTC

svn: Can't open '.svn/tmp/tempfile.tmp': No such file or directory

Hello,

some days ago i discovered a strange effect.
I wanted to execute a 'svn status -u' in a completely write protected
filesystem.
This produces an error-message which i didn't expect.
  'svn: Can't open '.svn/tmp/tempfile.tmp': No such file or directory'
Why does the simple status query write to the filesystem?

After some gdb-session i figured out two functions which use temporary
files
and which try to place them into the current '.svn' directory.

  1. svn_wc_translated_file()
  2. svn_wc_create_tmp_file()

I changed the implementation to use 'svn_io_temp_dir()' and my problem
disappeared.

Now come the questions?

1. Why don't these (kind of) functions use svn_io_temp_dir() ?

2. Wouldn't it be wise to use for nearly any call to
'svn_io_open_unique_file'
    a temp path delivered by svn_io_temp_dir() ? Because these files
    don't have fix names and therefore have all a 'temporary' nature

3. Wouldn't it be more comfortable to integrate the call sequence
     -svn_io_temp_dir()
     -svn_path_join 
     -svn_io_open_unique_file
    into one function named 'svn_io_open_unique_tmp_file' ?


thus
 



Confidentiality note:
The information in this email and any attachment may contain confidential and proprietary information of Heidelberger Druckmaschinen AG and/or its affiliates and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you are hereby notified that any review, reliance or distribution by others or forwarding without express permission is strictly prohibited and may cause liability. In case you have received this message due to an error in transmission, we kindly ask you to notify the sender immediately and to delete this email and any attachment from your system.

Re: Re: svn: Can't open '.svn/tmp/tempfile.tmp': No such file or directory

Posted by Paul Burba <pa...@softlanding.com>.
"Erik Huelsmann" <e....@gmx.net> wrote on 10/13/2006 02:39:03 PM:

> -------- Original-Nachricht --------
> Datum: Thu, 12 Oct 2006 12:41:38 -0700
> Von: Daniel Rall <dl...@collab.net>
> An: Erik Huelsmann <eh...@gmail.com>
> Betreff:     Re: svn: Can\'t open \'.svn/tmp/tempfile.tmp\': No such
> file or directory
> 
> > On Thu, 12 Oct 2006, Erik Huelsmann wrote:
> > 
> > > On 10/12/06, Malcolm Rowe <ma...@farside.org.uk> wrote:
> > > >On Thu, Oct 12, 2006 at 05:09:35PM +0200, Husterer, Thomas RD-CP1
> > wrote:
> > > >> 1. Why don't these (kind of) functions use svn_io_temp_dir() ?
> > > >>
> > > >
> > > >The main reason is because the same functions are called to 
generate
> > > >temporary files that are atomically moved over the top of existing
> > files
> > > >in the working copy (and so they need to be on the same 
filesystem);
> > > >creating them in .svn is a good way to ensure this.
> > > >
> > > >However, I think I'm right in saying that those functions are now 
(in
> > > >the current trunk version of SVN) able to create temporary files in 
the
> > > >system temporary directory if the caller requests it, enabling 
things
> > > >like repos-wc diffs to work on read-only working copies.  I'm not 
sure
> > > >whether 'svn st -u' works yet, though.
> > > 
> > > 'svn st -u' does that now for trunk as of r21904. The problem was 
that
> > > svn st -u was creating a repository session which forcibly wrote its
> > > temp files in .svn/ even though there is no need for this 
(read-only)
> > > operation.

Erik,

r21904 is causing the following DAV failures on Windows:

FAIL:  stat_tests.py 18: status on ignored directory
FAIL:  stat_tests.py 20: status on missing directory
FAIL:  stat_tests.py 24: run 'status -u' variations w/ incoming 
propchanges
FAIL:  stat_tests.py 25: run 'status -uv' w/ incoming propchanges 

The failures occur becuase tempfile.tmp, now created in the WC itself 
rather than the administrative area, shows up as an unversioned item in 
the output to svn -u.  tmpfile.tmp is deleted when we call 
reporter_finish_report() libsvn_ra_dav/fetch.c, but by then we've already 
called svn_wc_crawl_revisions2() and the unexpected unversioned path has 
been reported.

Paul B.



> > What do you think about backporting this change to the 1.4.x line?
> 
> Proposed for backport now.
> 
> bye,
> 
> Erik.

Re: Re: svn: Can't open '.svn/tmp/tempfile.tmp': No such file or directory

Posted by Erik Huelsmann <e....@gmx.net>.
-------- Original-Nachricht --------
Datum: Thu, 12 Oct 2006 12:41:38 -0700
Von: Daniel Rall <dl...@collab.net>
An: Erik Huelsmann <eh...@gmail.com>
Betreff: 	 Re: svn: Can\'t open \'.svn/tmp/tempfile.tmp\': No such file or directory

> On Thu, 12 Oct 2006, Erik Huelsmann wrote:
> 
> > On 10/12/06, Malcolm Rowe <ma...@farside.org.uk> wrote:
> > >On Thu, Oct 12, 2006 at 05:09:35PM +0200, Husterer, Thomas RD-CP1
> wrote:
> > >> 1. Why don't these (kind of) functions use svn_io_temp_dir() ?
> > >>
> > >
> > >The main reason is because the same functions are called to generate
> > >temporary files that are atomically moved over the top of existing
> files
> > >in the working copy (and so they need to be on the same filesystem);
> > >creating them in .svn is a good way to ensure this.
> > >
> > >However, I think I'm right in saying that those functions are now (in
> > >the current trunk version of SVN) able to create temporary files in the
> > >system temporary directory if the caller requests it, enabling things
> > >like repos-wc diffs to work on read-only working copies.  I'm not sure
> > >whether 'svn st -u' works yet, though.
> > 
> > 'svn st -u' does that now for trunk as of r21904. The problem was that
> > svn st -u was creating a repository session which forcibly wrote its
> > temp files in .svn/ even though there is no need for this (read-only)
> > operation.
> 
> What do you think about backporting this change to the 1.4.x line?

Proposed for backport now.

bye,

Erik.
-- 
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl

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

Re: svn: Can't open '.svn/tmp/tempfile.tmp': No such file or directory

Posted by Daniel Rall <dl...@collab.net>.
On Thu, 12 Oct 2006, Erik Huelsmann wrote:

> On 10/12/06, Malcolm Rowe <ma...@farside.org.uk> wrote:
> >On Thu, Oct 12, 2006 at 05:09:35PM +0200, Husterer, Thomas RD-CP1 wrote:
> >> 1. Why don't these (kind of) functions use svn_io_temp_dir() ?
> >>
> >
> >The main reason is because the same functions are called to generate
> >temporary files that are atomically moved over the top of existing files
> >in the working copy (and so they need to be on the same filesystem);
> >creating them in .svn is a good way to ensure this.
> >
> >However, I think I'm right in saying that those functions are now (in
> >the current trunk version of SVN) able to create temporary files in the
> >system temporary directory if the caller requests it, enabling things
> >like repos-wc diffs to work on read-only working copies.  I'm not sure
> >whether 'svn st -u' works yet, though.
> 
> 'svn st -u' does that now for trunk as of r21904. The problem was that
> svn st -u was creating a repository session which forcibly wrote its
> temp files in .svn/ even though there is no need for this (read-only)
> operation.

What do you think about backporting this change to the 1.4.x line?

Re: svn: Can't open '.svn/tmp/tempfile.tmp': No such file or directory

Posted by Erik Huelsmann <eh...@gmail.com>.
On 10/12/06, Malcolm Rowe <ma...@farside.org.uk> wrote:
> On Thu, Oct 12, 2006 at 05:09:35PM +0200, Husterer, Thomas RD-CP1 wrote:
> > 1. Why don't these (kind of) functions use svn_io_temp_dir() ?
> >
>
> The main reason is because the same functions are called to generate
> temporary files that are atomically moved over the top of existing files
> in the working copy (and so they need to be on the same filesystem);
> creating them in .svn is a good way to ensure this.
>
> However, I think I'm right in saying that those functions are now (in
> the current trunk version of SVN) able to create temporary files in the
> system temporary directory if the caller requests it, enabling things
> like repos-wc diffs to work on read-only working copies.  I'm not sure
> whether 'svn st -u' works yet, though.

'svn st -u' does that now for trunk as of r21904. The problem was that
svn st -u was creating a repository session which forcibly wrote its
temp files in .svn/ even though there is no need for this (read-only)
operation.


bye,

Erik.

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

Re: svn: Can't open '.svn/tmp/tempfile.tmp': No such file or directory

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Thu, Oct 12, 2006 at 05:09:35PM +0200, Husterer, Thomas RD-CP1 wrote:
> 1. Why don't these (kind of) functions use svn_io_temp_dir() ?
> 

The main reason is because the same functions are called to generate
temporary files that are atomically moved over the top of existing files
in the working copy (and so they need to be on the same filesystem);
creating them in .svn is a good way to ensure this.

However, I think I'm right in saying that those functions are now (in
the current trunk version of SVN) able to create temporary files in the
system temporary directory if the caller requests it, enabling things
like repos-wc diffs to work on read-only working copies.  I'm not sure
whether 'svn st -u' works yet, though.

Regards,
Malcolm