[darcs-users] [patch258] Bug fix: treat filenames in darcs-2 patc... (and 1 more)

Eric Kow bugs at darcs.net
Fri Jun 18 22:53:42 UTC 2010


Eric Kow <kowey at darcs.net> added the comment:

3 patches for repository http://darcs.net:

Fri Jun 18 23:51:04 BST 2010  Eric Kow <kowey at darcs.net>
  * Slightly more aggresive and extendable issue1763 test.

Another modification of the test, this time setting the locale to C and in one
place since there's no block scope on environment variables.

On Fri, Jun 18, 2010 at 21:32:05 +0000, Reinier Lamers wrote:
> >+function check_consistent_filename {
> >+  export LC_ALL='en.UTF8'
> >+  count=`darcs changes -v | grep 'hunk .*\.lisp' | sed -e 's/.*hunk //' -e
> > 's/.lisp.*//' | sort | uniq | wc -l`
> > +  test $count -eq 1
> 
> It has a problem, however, in that the locale "en.UTF8" is very unlikely to 
> exist. "en_US.UTF8" does exist and is the default on most Linux distros, but I 
> don't think that it is actually required to be present.

> The file names should be equal, no matter what the locale is,
> shouldn't they?

So I think I just worked a little something out.

1. The trickiness is not the test failing, but it failing to fail.
   That is, it incorrectly passes with my en_GB.UTF8 locale.

   I'm not entirely sure why having a UTF-8 locale causes the test
   to spuriously pass... and would be happier with a good story for it.
   How does the locale affect the printing of darcs changes output
   again? :-/

2. 'en.UTF8' actually does not exist on my machine; the reason it seemed 
   to make the test do the right thing by virtue of being a nonsense
   locale, causing some sort of default to C?  Note that LC_ALL
   isn't actually set in my environment, but LANG is (en_GB.UTF-8)

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch258>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug-fix_-inverse-conflictors-should-also-use-raw-bytes-for-filenames_.dpatch
Type: text/x-darcs-patch
Size: 69554 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100618/53f628dc/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unnamed
Type: application/octet-stream
Size: 5 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20100618/53f628dc/attachment-0001.obj>


More information about the darcs-users mailing list