monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] update bug with read only file


From: Timothy Brownawell
Subject: Re: [Monotone-devel] update bug with read only file
Date: Thu, 27 Apr 2006 15:07:31 -0500

On Thu, 2006-04-27 at 09:38 +0200, Johan Bolmsjö wrote:
> Hello,
> 
> I found a bug in 0.24, it still exist in 0.26. This is on windows.
...
> address@hidden ~/test/foo
> $ chmod 444 bar
> 
> address@hidden ~/test/foo
> $ ls -l
> total 1
> drwxr-xr-x    2 johan    Administ        0 Apr 27 07:21 _MTN
> -r--r--r--    1 johan    Administ        4 Apr 27 07:18 bar
> 
> address@hidden ~/test/foo
> $ mtn update
> mtn: updating along branch 'test'
> mtn: selected update target f200d6554b8b33f3f63b551988641f01bb837ae6
> mtn: updating bar
> mtn: wrote debugging log to c:/Documents and Settings/johan/Mina 
> dokument/test/foo/_MTN/debug
> mtn: if reporting a bug, please include this file

Interesting lines from the log:
   ...
   using MoveFileEx for renames
   ...
   attempted rename of '_MTN/data.tmp.1848' to 'bar' failed: 5
   [that line is repeated 12 times]

Looking at the code, that line should be repeated 16 times, and should
be folloved by
   error: renaming '_MTN/data.tmp.1848' to 'bar' failed: 5
. 5 is ERROR_ACCESS_DENIED, which I think is the expected result from
the destination file being read-only (we should probably use
FormatMessage to print a string, instead of / in addition to the
number).

What I don't get is how rename_clobberingly apparently crashed in some
way other than throwing an exception (else it would have given the "this
is almost certainly a bug" text), in the middle of a loop that should be
doing the exact same thing each time.

I tried to reproduce this, and got the expected behavior.

Tim






reply via email to

[Prev in Thread] Current Thread [Next in Thread]