[darcs-devel] [issue1453] case insensitivity and inconsistent state

Simon Peyton-Jones bugs at darcs.net
Thu Apr 30 07:54:12 UTC 2009


Simon Peyton-Jones <simonpj at microsoft.com> added the comment:

Thanks for your prompt help.  The darcs team are really good on that front!

Yes, getting with --hashed works fine.   TRISTAN: no need for a new repo.

But you might want to consider some usability issues:

a) Rather than saying "darcs failed:  File './stackTransitions.pdf' already exists!", could you not emit a message saying
        "Looks as if your repo contains two files that differ only in
        the case of their filename.  Use darcs get --hashed"

b) Similarly, in the other case I had, the failure said that the repo was now in an inconsistent state.  That's alarming, if (as was happily not the case) I'd had a lot of uncommitted changes in the tree.  *Was* it inconsistent?  Couldn't the message say something about using --hashed too?

[These suggestions apply even if --hashed is the default, in case you use --no-hashed.]

c) What *does* happen if you use --hashed and there are two files with the same name? Does one overwrite the other?  Do you make X and X_0?  Should darcs not at least tell the user that something presumably-unintended has happened.  Silence is not golden here.

Simon

| -----Original Message-----
| From: Eric Kow [mailto:bugs at darcs.net]
| Sent: 29 April 2009 18:35
| To: dmitry.kurochkin at gmail.com; kowey at darcs.net; naur at post11.tele.dk;
| simon at joyful.com; Simon Peyton-Jones; tora at doc.ic.ac.uk
| Subject: [issue1453] case insensitivity and inconsistent state
|
|
| Eric Kow <kowey at darcs.net> added the comment:
|
| Here's the promised additional context.
|
| The short answer is "use hashed repositories".
|
| The medium length answer is "we are working to make people use hashed
| repositories without their having to know about them".
|
| Context:  We fixed this sort of issue a long time ago (in darcs 2) by
| introducing hashed repositories.  The remaining problems are (1) that hashed
| repositories can be slower in day to day usage and (2) people aren't using the
| hashed repositories, either because they haven't upgraded to darcs 2 yet, or
| because they aren't aware of the feature.
|
| We have workarounds for (1) which we can discuss if you encounter them.  Petr
| Rockai's Google Summer of Code project should also solve (1) in the long term,
| making hashed repos a lot more practical.
|
| We've been making some progress in (2) by making --darcs-2 the default format
| for Darcs 2.1 (--darcs-2 are hashed darcs 2 format repos; --hashed are hashed
| darcs 1 format repos).  This means that people that fetch repositories created
| by Darcs 2.1 should no longer experience this kind of grief.
|
| But what about repositories created by older versions of Darcs?  These are going
| to be around for a while, so our next plan is to make darcs get use the --hashed
| flag by default.   Your bug report has reminded us to make this a priority for
| the Darcs 2.3 release in July.  Once we do this, users like you will no
| experience these kind of errors from case sensitivity issues on a case
| insensitive file system.
|
| In the meantime, the workaround is to use darcs get --hashed.
|
| In the bigger picture, hashed repositories only fix the issue from the point of
| view of keeping darcs repos consistent.  Occasionally, you may get scary-looking
| messages, which are not as bad as the "inconsistent state" ones when you read
| them, but still look scary because they have the word "inconsistent" in them.
|
| Ultimately, we need a better solution which lets us map the actual filename to
| some internal filename.  In Darcs 3, we plan to implement a plan by Ganesh to
| give files some sort of unique ID internally and also implement this mapping.
|
| But for all intents and purposes, forcing everybody to use these hashed repos
| will effectively resolve the issue in the interim.
|
| ----------
| priority:  -> bug
| title: Inconsistent state -> case insensitivity and inconsistent state
|
| __________________________________
| Darcs bug tracker <bugs at darcs.net>
| <http://bugs.darcs.net/issue1453>
| __________________________________

----------
title: case insensitivity (inconsistent state) -> case insensitivity and inconsistent state

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1453>
__________________________________


More information about the darcs-devel mailing list