Matt,<br><br>In Issue 839, jglick is proposing using SHA1 as part of the file name if current file name encoding method creating a file name<br>too long to be handled by OS. The file name to SHA1 encoding is very straightforward. The file name decoding requires reading
<br>a dictionary file. <br><br>I am wondering do we really need the file name decoding function? It seems the decoding is only used in <br>/hg/mercurial/streamclone.py, stream_out() function. Can we just return raw file name there?
<br><br>If we can get rid of file name decoding, maybe we can just use file name SHA1 as .i and .d file name. That is simple. And we don't<br>need a dictionary file for SHA1 to file name mapping either. Simple too. Then we will never run into file name too long problem.
<br><br>I am very new to hg source code, and to python programming. So forgive me if my idea sounds silly.<br><br>Regards,<br>Guo<br><br><div class="gmail_quote">On Jan 6, 2008 9:54 AM, Matt Mackall <<a href="mailto:mpm@selenic.com">
mpm@selenic.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>On Fri, 2008-01-04 at 22:19 -0800, Jens Alfke wrote:
<br>> On 3 Jan '08, at 8:56 PM, Matt Mackall wrote:<br>><br>> > Meh. I hate 'em too. But they exist. The new "store" format largely<br>> > exists to deal with that, but then people go and make unreasonably
<br>> > long<br>> > filenames.<br>><br>><br>> Not as "unreasonable" as you may think. Characters in most Asian<br>> alphabets tend to decompose into three bytes each in UTF-8. If the<br>> filesystem's limit on filenames is 255 *bytes* (as it is in ext2/3 and
<br>> xfs), then that's only 85 *characters* in such an alphabet. That means<br>> such limits get hit a lot earlier in such languages. (I've run into<br>> this issue myself in my job, initially reported by Korean QA engineers.)
<br><br></div>It's a known issue, we're intending to deal with it.<br><br>The fix, I fear, will not be an easy or a happy one. There are important<br>advantages to having a fairly direct mapping of pathnames in the working
<br>directory to pathnames in the repository and I'm not keen on giving them<br>up.<br><div class="Ih2E3d"><br>--<br>Mathematics is the supreme nostalgia of our time.<br><br>_______________________________________________
<br></div><div><div></div><div class="Wj3C7c">Mercurial mailing list<br><a href="mailto:Mercurial@selenic.com">Mercurial@selenic.com</a><br><a href="http://selenic.com/mailman/listinfo/mercurial" target="_blank">http://selenic.com/mailman/listinfo/mercurial
</a><br></div></div></blockquote></div><br>