darcs

Issue 1572 darcs get can retrieve a not-yet-recorded setpref setting

Title darcs get can retrieve a not-yet-recorded setpref setting
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey
Assigned To
Topics

Created on 2009-08-27.00:54:55 by kowey, last changed 2017-07-30.23:04:13 by gh.

Messages
msg8522 (view) Author: kowey Date: 2009-08-27.00:54:52
I intend to submit something like this as a test:

. ../tests/lib                  # Load some portability helpers.
rm -rf R S S2                   # Another script may have left a mess.
darcs init      --repo R        # Create our test repos.

echo 'boringfile fake-boring' > R/_darcs/prefs/prefs
darcs get R S
not test -e S/_darcs/prefs/prefs

rm R/_darcs/prefs/prefs
darcs setpref --repo R boringfile fake-boring
darcs get R S2
not test -e S/_darcs/prefs/prefs

In both of these cases, we can see that it's possible to fetch a setpref setting
that wasn't actually recorded.

This isn't a serious bug, more a nuisance than anything else.  Introducing
setpref corruption into darcs seems all too easy.  "Luckily", setpref is so dumb
that this sort of corruption doesn't affect Darcs operation in any serious way
(except to give surprising results) and is easy to recover from.

In case of corruption, I the workaround is to use darcs changes to look for
changepref patches and then manually write the last changepref.

Fixing this bug seems tricky.  I imagine you want some part of the pristine
cache set aside for darcs metadata so that you can have a pristine/working
distinction for prefs.

I think we'd need somebody to think about the problem and work out a way either
(a) of doing it with backward compatibility -- so that it doesn't confuse old
darcs or (b) just conclude that it can't be done without a minor repo format
change, which is fine too.
History
Date User Action Args
2009-08-27 00:54:56koweycreate
2009-08-27 01:07:46koweylinkissue1573 superseder
2009-08-27 13:44:03adminsetnosy: kowey, darcs-devel, dmitry.kurochkin
2009-08-27 14:33:49adminsetnosy: kowey, darcs-devel, dmitry.kurochkin
2017-07-30 23:04:13ghsetstatus: needs-reproduction -> given-up