(This was seen on a Windows 7 machine)

When opening a repo, if you select to overwrite all files, and a file to be 
updated happens to be read-only (R attrib set), the overwrite fails (it should) 
but if you then change the read-only to read-write, and try to see changes or 
try to revert the failed to update file with the repo version, nothing happens. 
 FOSSIL somehow assumes that the checkout is in a correct state, even though it 
failed to overwrite, and the repo and check-out have different copies of the 
same file.

Here’s the test batch file I ran which shows the problem:

@echo off
echo Reproduce fossil issue with read-only overwrite failure consequences
echo (where f = fossil)
f ver -v
f new sample.fossil
md xxx
dir > xxx\aaa
cd xxx
f o ..\sample.fossil
f add aaa
f com -m "Initial"
f close
echo Make some changes to our file
dir ../s > aaa
attrib +r aaa
echo Answer Y or A(ll)
f o ..\sample.fossil
echo Failed to update.  Let's remove the read-only status, and see...
attrib -r aaa
f cha
f rev
f com
echo Nothing shown here.  But, if we close and re-open the repo.
f close
echo Answer N
f o ..\sample.fossil
f cha
echo Obviously, there are changes!!!


------------------
OUTPUT
------------------
Reproduce fossil issue with read-only overwrite failure consequences
(where f = fossil)
This is fossil version 1.30 [b9a1beda9e] 2014-10-25 01:01:31 UTC
Compiled on Oct 25 2014 19:30:07 using msc-18.00 (32-bit)
SQLite 3.8.7 2014-10-17 11:24:17 e4ab094f8a
Schema version 2011-04-25 19:50
zlib 1.2.8, loaded 1.2.8
SSL (OpenSSL 1.0.1j 15 Oct 2014)
project-id: 097d5ac10db92bfe4d77daf15c6f2d34b75aaef7
server-id:  2f3a9fff39ebc03e8d9879929afa6075b8ee766f
admin-user: Tony (initial password is "db3f67")
project-name: <unnamed>
repository:   C:/temp/xxx/..\sample.fossil
local-root:   C:/temp/xxx/
config-db:    C:/Users/Tony/AppData/Local/_fossil
project-code: 097d5ac10db92bfe4d77daf15c6f2d34b75aaef7
checkins:     0
ADDED  aaa
New_Version: e2507b54298d9a57da83578667dc510861fed766
Make some changes to our file
Answer Y or A(ll)
overwrite C:/temp/xxx/aaa (a=always/y/N)? y
aaa
unable to open file "C:/temp/xxx/aaa" for writing
Failed to update.  Let's remove the read-only status, and see...
nothing has changed; use --allow-empty to override
Nothing shown here.  But, if we close and re-open the repo.
Answer N
overwrite C:/temp/xxx/aaa (a=always/y/N)?
WARNING: manifest checksum does not agree with disk
project-name: <unnamed>
repository:   C:/temp/xxx/..\sample.fossil
local-root:   C:/temp/xxx/
config-db:    C:/Users/Tony/AppData/Local/_fossil
project-code: 097d5ac10db92bfe4d77daf15c6f2d34b75aaef7
checkout:     e2507b54298d9a57da83578667dc510861fed766 2014-11-12 21:12:17 UTC
leaf:         open
tags:         trunk
comment:      Initial (user: Tony)
checkins:     1
EDITED     aaa
Obviously, there are changes!!!
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to