darcs

Issue 1880 record reports different filenames than whatsnew (Unicode)

Title record reports different filenames than whatsnew (Unicode)
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List dmitry.kurochkin, kowey, thorkilnaur
Assigned To
Topics FilePath

Created on 2010-06-23.20:31:13 by kowey, last changed 2020-08-01.15:06:03 by bfrk.

Files
File name Uploaded Type Edit Remove
failing-issueXXXX-macosx-filepath.sh kowey, 2010-06-23.20:31:12 application/x-sh
Messages
msg11562 (view) Author: kowey Date: 2010-06-23.20:31:12
When we have filenames with non-ASCII characters in them, darcs record
and darcs whatsnew will report different filenames.

The good news is that this has been around since Darcs 2.3.1 perhaps
earlier (could somebody have darcs 1.0.9 on their Mac they could confirm
this with?)

Attached is the test I will push to the Darcs repository.

Since we have a test, the next we need to do is to investigate the cause
of the discrepancy.  Could be good to see what we're using to retrieve
these filenames in the first places, System.Directory?

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
Attachments
msg11596 (view) Author: thorkilnaur Date: 2010-06-26.16:03:26
With

$ uname -a
Darwin thorkil-naurs-mac-mini.local 9.8.0 Darwin Kernel Version 9.8.0:
Wed Jul 15 16:57:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_PPC Power
Macintosh
$ ./dist/build/darcs/darcs --version
2.4.4 (unknown)
$

I tried

> runghc Setup.lhs test tests/failing-issueXXXX-macosx-filepath.sh

with the attached failing-issueXXXX-macosx-filepath.sh, modified as follows:

> $ darcs w
> hunk ./tests/failing-issueXXXX-macosx-filepath.sh 9
> +PATH="/Users/thorkilnaur/tn/install/darcs-1.0.9/bin:$PATH"
> +darcs --version
> $

The difference between the output of this test and the output of the
unmodified test is:

> $ diff
runghc_Setup_lhs_test_tests_failing_issueXXXX_macosx_filepath_sh_20100626_173757.out
runghc_Setup_lhs_test_tests_failing_issueXXXX_macosx_filepath_sh_20100626_174516.out
> 42,45d41
> < PATH="/Users/thorkilnaur/tn/install/darcs-1.0.9/bin:$PATH"
> < +
PATH=/Users/thorkilnaur/tn/install/darcs-1.0.9/bin:/Volumes/tn18_HD_1/Users/thorkilnaur/tn/darcsDarcsRepository/darcs.net_stable-for-misc-work-20081118_2206/darcs.net/dist/build/darcs:/Users/thorkilnaur/tn/install/ghc-6.10.4/bin:/Users/thorkilnaur/tn/install/hscolour-1.10.1/bin:/Users/thorkilnaur/tn/install/darcs-2.4/bin:/Users/thorkilnaur/tn/install/maybench-0.2.4.1/bin:/Users/thorkilnaur/tn/install/haddock-0.8/bin:/Users/thorkilnaur/tn/install/happy-1.17/bin:/Users/thorkilnaur/tn/install/alex-2.2/bin:/Users/thorkilnaur/tn/install/darcs-1.0.9/bin:/opt/local/bin:/opt/local/sbin:/Users/thorkilnaur/tn/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
> < darcs --version
> < + darcs --version
> 61d56
> < 1.0.9 (release)
> 124,128d118
> < PATH="/Users/thorkilnaur/tn/install/darcs-1.0.9/bin:$PATH"
> < 1.0.9 (release)
> < +
PATH=/Users/thorkilnaur/tn/install/darcs-1.0.9/bin:/Volumes/tn18_HD_1/Users/thorkilnaur/tn/darcsDarcsRepository/darcs.net_stable-for-misc-work-20081118_2206/darcs.net/dist/build/darcs:/Users/thorkilnaur/tn/install/ghc-6.10.4/bin:/Users/thorkilnaur/tn/install/hscolour-1.10.1/bin:/Users/thorkilnaur/tn/install/darcs-2.4/bin:/Users/thorkilnaur/tn/install/maybench-0.2.4.1/bin:/Users/thorkilnaur/tn/install/haddock-0.8/bin:/Users/thorkilnaur/tn/install/happy-1.17/bin:/Users/thorkilnaur/tn/install/alex-2.2/bin:/Users/thorkilnaur/tn/install/darcs-1.0.9/bin:/opt/local/bin:/opt/local/sbin:/Users/thorkilnaur/tn/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
> < darcs --version
> < + darcs --version
> 206,210d195
> < PATH="/Users/thorkilnaur/tn/install/darcs-1.0.9/bin:$PATH"
> < 1.0.9 (release)
> < +
PATH=/Users/thorkilnaur/tn/install/darcs-1.0.9/bin:/Volumes/tn18_HD_1/Users/thorkilnaur/tn/darcsDarcsRepository/darcs.net_stable-for-misc-work-20081118_2206/darcs.net/dist/build/darcs:/Users/thorkilnaur/tn/install/ghc-6.10.4/bin:/Users/thorkilnaur/tn/install/hscolour-1.10.1/bin:/Users/thorkilnaur/tn/install/darcs-2.4/bin:/Users/thorkilnaur/tn/install/maybench-0.2.4.1/bin:/Users/thorkilnaur/tn/install/haddock-0.8/bin:/Users/thorkilnaur/tn/install/happy-1.17/bin:/Users/thorkilnaur/tn/install/alex-2.2/bin:/Users/thorkilnaur/tn/install/darcs-1.0.9/bin:/opt/local/bin:/opt/local/sbin:/Users/thorkilnaur/tn/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
> < darcs --version
> < + darcs --version
> $ 

I would conclude that this problem existed for darcs-1.0.9 as well.

And, by the way: This test also fails with:

> $ uname -a
> Linux tn24 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC
2010 i686 GNU/Linux
> $ ./dist/build/darcs/darcs --version
> 2.4 (+ 142 patches)
> $

Best regards
Thorkil
msg11637 (view) Author: kowey Date: 2010-06-30.15:48:53
On Sat, Jun 26, 2010 at 16:03:28 +0000, Thorkil Naur wrote:
> I would conclude that this problem existed for darcs-1.0.9 as well.

Many thanks!  That's very comforting.  It's nice to see that we're
starting into the old-bugs territory and not just cope with our
regressions.

> And, by the way: This test also fails with:
> 
> > $ uname -a
> > Linux tn24 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC
> 2010 i686 GNU/Linux

OH! Good thinking...  huh! I wonder why the issue1763 test works on
Linux but not on OS X then.  Perhaps issue1763 sets the locale just
so...

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
msg12198 (view) Author: kowey Date: 2010-08-15.20:15:00
I have a note from myself asking me what "locale" prints on my Mac:

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

It was originally for issue1763, but some recent past version of myself
said issue1880 may be more appropriate.
msg22362 (view) Author: bfrk Date: 2020-08-01.15:06:00
This should be fixed by now. We have lots of tests for this and they 
all succeed (nowadays).
History
Date User Action Args
2010-06-23 20:31:13koweycreate
2010-06-26 16:03:27thorkilnaursetnosy: + thorkilnaur
messages: + msg11596
2010-06-30 15:48:55koweysetmessages: + msg11637
2010-07-01 21:02:25koweysetpriority: bug
topic: + FilePath
title: record reports different filenames than whatsnew (Mac, Unicode) -> record reports different filenames than whatsnew (Unicode)
2010-08-15 20:15:01koweysetmessages: + msg12198
2020-08-01 15:06:03bfrksetstatus: unknown -> resolved
messages: + msg22362