darcs

Issue 1453 case insensitivity and inconsistent state (old-fashioned)

Title case insensitivity and inconsistent state (old-fashioned)
Priority bug Status wont-fix
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, simonpj, thorkilnaur, tora, twb
Assigned To
Topics

Created on 2009-04-29.16:00:19 by simonpj, last changed 2009-08-27.14:20:15 by admin.

Messages
msg7761 (view) Author: simonpj Date: 2009-04-29.16:00:13
Noooooo!  Two "your repo is in an inconsitent state" in one day. See below.  This is Darcs 2.2.0 on Windows, and a very small repo (a paper I'm writing).

Running 'darcs repair' doesn't seem to help.

Sigh.

Simon

bash-3.1$ darcs pull -av
Pulling from "code.haskell.org:/srv/code/explicitCallStackPaper"...
They have the following patches to pull:
Tue Apr 28 18:22:12 GMT Daylight Time 2009  tora@zonetora.co.uk
  * More changes for building
Tue Apr 28 18:22:37 GMT Daylight Time 2009  tora@zonetora.co.uk
  * Small typos, Real world example, extras in the compiler pass
Getting and merging the following patches:
Tue Apr 28 18:22:12 GMT Daylight Time 2009  tora@zonetora.co.uk
  * More changes for building
Tue Apr 28 18:22:37 GMT Daylight Time 2009
darcs failed:  File './stackTransitions.pdf' already exists!
Your repository is now in an inconsistent state.
This must be fixed by running darcs repair.

  tora@zonetora.co.uk
  * Small typos, Real world example, extras in the compiler pass
Applying to pristine... Tue Apr 28 18:22:12 GMT Daylight Time 2009  tora@zonetora.co.uk
  * More changes for building
Tue Apr 28 18:22:37 GMT Daylight Time 2009  tora@zonetora.co.uk
  * Small typos, Real world example, extras in the compiler pass
msg7763 (view) Author: simonpj Date: 2009-04-29.16:23:10
OK something is very very very weird.  Look:

$ darcs get code.haskell.org:/srv/code/explicitCallStackPaper
Unapplicable patch:
Tue Apr 28 18:22:12 GMT Daylight Time 2009  tora@zonetora.co.uk
  * More changes for building

darcs failed:  File './stackTransitions.pdf' already exists!

=======
Same command  works fine on Unix.  This is Darcs 2.2.0 on Windows.  Exact same thing happens with 2.2.1.

Not only can I not get GHC (separate bug report), I can't get the paper I'm writing!  (Well, I can on Linux, but my laptop runs Windows.)  Alas.

Simon

| -----Original Message-----
| From: Simon Peyton-Jones [mailto:bugs@darcs.net]
| Sent: 29 April 2009 17:00
| To: dmitry.kurochkin@gmail.com; kowey@darcs.net; naur@post11.tele.dk;
| simon@joyful.com; Simon Peyton-Jones
| Subject: [issue1453] Inconsistent state
|
|
| New submission from Simon Peyton-Jones <simonpj@microsoft.com>:
|
| Noooooo!  Two "your repo is in an inconsitent state" in one day. See below.  This is
| Darcs 2.2.0 on Windows, and a very small repo (a paper I'm writing).
|
| Running 'darcs repair' doesn't seem to help.
|
| Sigh.
|
| Simon
|
| bash-3.1$ darcs pull -av
| Pulling from "code.haskell.org:/srv/code/explicitCallStackPaper"...
| They have the following patches to pull:
| Tue Apr 28 18:22:12 GMT Daylight Time 2009  tora@zonetora.co.uk
|   * More changes for building
| Tue Apr 28 18:22:37 GMT Daylight Time 2009  tora@zonetora.co.uk
|   * Small typos, Real world example, extras in the compiler pass
| Getting and merging the following patches:
| Tue Apr 28 18:22:12 GMT Daylight Time 2009  tora@zonetora.co.uk
|   * More changes for building
| Tue Apr 28 18:22:37 GMT Daylight Time 2009
| darcs failed:  File './stackTransitions.pdf' already exists!
| Your repository is now in an inconsistent state.
| This must be fixed by running darcs repair.
|
|   tora@zonetora.co.uk
|   * Small typos, Real world example, extras in the compiler pass
| Applying to pristine... Tue Apr 28 18:22:12 GMT Daylight Time 2009
| tora@zonetora.co.uk
|   * More changes for building
| Tue Apr 28 18:22:37 GMT Daylight Time 2009  tora@zonetora.co.uk
|   * Small typos, Real world example, extras in the compiler pass
|
| ----------
| messages: 7761
| nosy: dmitry.kurochkin, kowey, simon, simonpj, thorkilnaur
| status: unread
| title: Inconsistent state
|
| __________________________________
| Darcs bug tracker <bugs@darcs.net>
| <http://bugs.darcs.net/issue1453>
| __________________________________
msg7766 (view) Author: simonpj Date: 2009-04-29.16:46:52
OK looking further on Linux, I see two files
        stackTransitions.pdf
        StackTransitions.pdf

So I'm guessing that on Windows these two are "the same" and that confuses darcs.  Another case sensitivity bug.

You may argue that it's Windows's fault for not having a case-sensitive file system, but regardless of that I think it's unacceptable for darcs to fall over like this.  It can report that it is overwriting one file with another, or name them something different, or whatever you like.  But simply saying that it "already exists" (when it doesn't -- this is a clean 'get') or "repo in inconsistent state" is very bad.

The difficulty for the Darcs team is that darcs is a version-control system so it holds the Crown Jewels. So people are going to apply unusually high quality standards.

I tried removing the file in Linux and pushing, but I still can't get the repo.  It seems that this repo is irredeemable poisoned from a Windows point of view.

TRISTAN: can you create a brand new repo, without this "two files the same" problem, pls?

Simon

| -----Original Message-----
| From: Simon Peyton-Jones [mailto:bugs@darcs.net]
| Sent: 29 April 2009 17:23
| To: Simon Peyton-Jones
| Subject: [issue1453] Inconsistent state
|
|
| Simon Peyton-Jones <simonpj@microsoft.com> added the comment:
|
| OK something is very very very weird.  Look:
|
| $ darcs get code.haskell.org:/srv/code/explicitCallStackPaper
| Unapplicable patch:
| Tue Apr 28 18:22:12 GMT Daylight Time 2009  tora@zonetora.co.uk
|   * More changes for building
|
| darcs failed:  File './stackTransitions.pdf' already exists!
|
| =======
| Same command  works fine on Unix.  This is Darcs 2.2.0 on Windows.  Exact same thing
| happens with 2.2.1.
|
| Not only can I not get GHC (separate bug report), I can't get the paper I'm writing!
| (Well, I can on Linux, but my laptop runs Windows.)  Alas.
|
| Simon
|
| | -----Original Message-----
| | From: Simon Peyton-Jones [mailto:bugs@darcs.net]
| | Sent: 29 April 2009 17:00
| | To: dmitry.kurochkin@gmail.com; kowey@darcs.net; naur@post11.tele.dk;
| | simon@joyful.com; Simon Peyton-Jones
| | Subject: [issue1453] Inconsistent state
| |
| |
| | New submission from Simon Peyton-Jones <simonpj@microsoft.com>:
| |
| | Noooooo!  Two "your repo is in an inconsitent state" in one day. See below.  This
| is
| | Darcs 2.2.0 on Windows, and a very small repo (a paper I'm writing).
| |
| | Running 'darcs repair' doesn't seem to help.
| |
| | Sigh.
| |
| | Simon
| |
| | bash-3.1$ darcs pull -av
| | Pulling from "code.haskell.org:/srv/code/explicitCallStackPaper"...
| | They have the following patches to pull:
| | Tue Apr 28 18:22:12 GMT Daylight Time 2009  tora@zonetora.co.uk
| |   * More changes for building
| | Tue Apr 28 18:22:37 GMT Daylight Time 2009  tora@zonetora.co.uk
| |   * Small typos, Real world example, extras in the compiler pass
| | Getting and merging the following patches:
| | Tue Apr 28 18:22:12 GMT Daylight Time 2009  tora@zonetora.co.uk
| |   * More changes for building
| | Tue Apr 28 18:22:37 GMT Daylight Time 2009
| | darcs failed:  File './stackTransitions.pdf' already exists!
| | Your repository is now in an inconsistent state.
| | This must be fixed by running darcs repair.
| |
| |   tora@zonetora.co.uk
| |   * Small typos, Real world example, extras in the compiler pass
| | Applying to pristine... Tue Apr 28 18:22:12 GMT Daylight Time 2009
| | tora@zonetora.co.uk
| |   * More changes for building
| | Tue Apr 28 18:22:37 GMT Daylight Time 2009  tora@zonetora.co.uk
| |   * Small typos, Real world example, extras in the compiler pass
| |
| | ----------
| | messages: 7761
| | nosy: dmitry.kurochkin, kowey, simon, simonpj, thorkilnaur
| | status: unread
| | title: Inconsistent state
| |
| | __________________________________
| | Darcs bug tracker <bugs@darcs.net>
| | <http://bugs.darcs.net/issue1453>
| | __________________________________
|
| ----------
| status: unread -> chatting
|
| __________________________________
| Darcs bug tracker <bugs@darcs.net>
| <http://bugs.darcs.net/issue1453>
| __________________________________
msg7767 (view) Author: kowey Date: 2009-04-29.17:05:39
Hi Simon,

I didn't see my reply on the bugtracker, so I'll send it again

On Wed, Apr 29, 2009 at 16:46:55 -0000, Simon Peyton-Jones wrote:
> I tried removing the file in Linux and pushing, but I still can't get
> the repo.  It seems that this repo is irredeemable poisoned from a
> Windows point of view.

The short answer is to do a darcs get --hashed when fetching this
repository.

More later!
msg7770 (view) Author: kowey Date: 2009-04-29.17:35:15
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.
msg7771 (view) Author: kowey Date: 2009-04-29.17:47:13
On Wed, Apr 29, 2009 at 16:00:19 -0000, Simon Peyton-Jones wrote:
> Noooooo!  Two "your repo is in an inconsitent state" in one day. See
> below.  This is Darcs 2.2.0 on Windows, and a very small repo (a paper
> I'm writing).

Sorry darcs is causing you so much grief, Simon.

Short answer
------------
Please use darcs get --hashed to fetch this repository.
I can confirm that getting without the hashed option breaks on Mac and
that getting it with hashed works.

Long answer
-----------
This error is caused by having a file called 'stackTransitions.pdf' and
'StackTransitions.pdf' in the same repository.

Thankfully, this issue has been resolved since the early days of darcs 2
if not during the darcs 2 release itself.  The solution was the use of
these "hashed" repositories.

More on this in a later message.
msg7777 (view) Author: simonpj Date: 2009-04-30.07:54:08
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@darcs.net]
| Sent: 29 April 2009 18:35
| To: dmitry.kurochkin@gmail.com; kowey@darcs.net; naur@post11.tele.dk;
| simon@joyful.com; Simon Peyton-Jones; tora@doc.ic.ac.uk
| Subject: [issue1453] case insensitivity and inconsistent state
|
|
| Eric Kow <kowey@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@darcs.net>
| <http://bugs.darcs.net/issue1453>
| __________________________________
msg7803 (view) Author: twb Date: 2009-05-13.02:12:17
On Wed, Apr 29, 2009 at 09:54:08PM +0000, Simon Peyton-Jones wrote:
> 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"

Hopefully this is no longer a big issue, as --hashed is on by default
post-Darcs 2.2 (see issue1435).  Thus it will only affect people who
explicitly darcs get --old-fashioned-inventory.

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

Granted.

> c) What *does* happen if you use --hashed and there are two files
> with the same name?

Tests welcome! :-)
msg7807 (view) Author: kowey Date: 2009-05-13.03:30:43
For book-keeping purposes only,  I'd like to note that I've posted some
longer-winded answers to Simon's questions on the mailing list:

http://lists.osuosl.org/pipermail/darcs-users/2009-May/019695.html

Thanks,
msg7816 (view) Author: kowey Date: 2009-05-16.06:56:30
A quick wrap-up: the workaround to this bug is to use hashed format repositories.

The discussion on this bug has uncovered another long-term issue where the
*working* directory can be corrupted.  I have filed that as issue1461.

As for this particular bug here, there isn't any real solution, so I'm marking
this as wont-fix.  Please use hashed repositories instead.
History
Date User Action Args
2009-04-29 16:00:19simonpjcreate
2009-04-29 16:23:13simonpjsetstatus: unread -> unknown
nosy: kowey, simonpj, simon, thorkilnaur, dmitry.kurochkin
messages: + msg7763
2009-04-29 16:46:55simonpjsetnosy: + tora
messages: + msg7766
2009-04-29 17:05:41koweysetnosy: kowey, simonpj, simon, thorkilnaur, dmitry.kurochkin, tora
messages: + msg7767
2009-04-29 17:35:20koweysetpriority: bug
nosy: kowey, simonpj, simon, thorkilnaur, dmitry.kurochkin, tora
messages: + msg7770
title: Inconsistent state -> case insensitivity and inconsistent state
2009-04-29 17:47:15koweysetnosy: + darcs-devel
messages: + msg7771
title: case insensitivity and inconsistent state -> Inconsistent state
2009-04-29 19:11:17koweysetnosy: kowey, darcs-devel, simonpj, simon, thorkilnaur, dmitry.kurochkin, tora
title: Inconsistent state -> case insensitivity (inconsistent state)
2009-04-30 07:54:12simonpjsetnosy: kowey, darcs-devel, simonpj, simon, thorkilnaur, dmitry.kurochkin, tora
messages: + msg7777
title: case insensitivity (inconsistent state) -> case insensitivity and inconsistent state
2009-05-13 02:12:32twbsetnosy: + twb
messages: + msg7803
2009-05-13 03:30:53koweysetnosy: kowey, darcs-devel, simonpj, simon, twb, thorkilnaur, dmitry.kurochkin, tora
messages: + msg7807
2009-05-16 06:56:32koweysetstatus: unknown -> wont-fix
nosy: kowey, darcs-devel, simonpj, simon, twb, thorkilnaur, dmitry.kurochkin, tora
messages: + msg7816
title: case insensitivity and inconsistent state -> case insensitivity and inconsistent state (old-fashioned)
2009-08-25 17:44:47adminsetnosy: - simon
2009-08-27 14:20:15adminsetnosy: kowey, darcs-devel, simonpj, twb, thorkilnaur, dmitry.kurochkin, tora