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.&nbsp; 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&#39;t<br>need a dictionary file for SHA1 to file name&nbsp; mapping either.&nbsp; Simple too.&nbsp; 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 &lt;<a href="mailto:mpm@selenic.com">
mpm@selenic.com</a>&gt; 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>&gt; On 3 Jan &#39;08, at 8:56 PM, Matt Mackall wrote:<br>&gt;<br>&gt; &gt; Meh. I hate &#39;em too. But they exist. The new &quot;store&quot; format largely<br>&gt; &gt; exists to deal with that, but then people go and make unreasonably
<br>&gt; &gt; long<br>&gt; &gt; filenames.<br>&gt;<br>&gt;<br>&gt; Not as &quot;unreasonable&quot; as you may think. Characters in most Asian<br>&gt; alphabets tend to decompose into three bytes each in UTF-8. If the<br>&gt; filesystem&#39;s limit on filenames is 255 *bytes* (as it is in ext2/3 and
<br>&gt; xfs), then that&#39;s only 85 *characters* in such an alphabet. That means<br>&gt; such limits get hit a lot earlier in such languages. (I&#39;ve run into<br>&gt; this issue myself in my job, initially reported by Korean QA engineers.)
<br><br></div>It&#39;s a known issue, we&#39;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&#39;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>