[PATCH] introduce upath repositories (issue793)
Adrian Buehlmann
adrian at cadifra.com
Wed Jun 18 18:09:26 UTC 2008
On 18.06.2008 14:49, Paul Moore wrote:
> On 18/06/2008, Adrian Buehlmann <adrian at cadifra.com> wrote:
>> As mpm laid out, best disk performance is achieved if the files in the
>> store and in the working dir are in the same directory order
>> (mpm: "Ideally, the store layout should roughly mirror the working dir layout").
>>
>> The current filename encoding (also upath as presented) uses "_x"
>> to encode "X". Wouldn't it be a bit more efficient to do "X" -> "x_"?
>>
>> What was the reasoning for chosing "X" -> "_x" and not "X" -> "x_"?
>
> My guess (and it's nothing more than that) is that it's related to this:
>
>>>> 'x' < 'X'
> False
>>>> 'x' < '_x'
> False
>>>> 'x' < 'x_'
> True
>
> Paul.
>
Sorry, my bad. It seems the current encoding *is* actually the best with
regards to ordering. At least an ls -l on FreeBSD in the working dir and inside
.hg/store/data of the hg repo lists the files in the same order.
Interesting thing is, dir command on Windows lists them in different order:
> dir
Volume in drive W is Sys
Volume Serial Number is 8017-C29E
Directory of W:\hgrepo
18.06.2008 19:51 <DIR> .
18.06.2008 19:51 <DIR> ..
18.06.2008 19:51 <DIR> .hg
18.06.2008 19:51 326 .hgignore
18.06.2008 19:51 1'056 .hgsigs
18.06.2008 19:51 921 .hgtags
18.06.2008 19:51 <DIR> contrib
18.06.2008 19:51 1'663 CONTRIBUTORS
18.06.2008 19:51 17'992 COPYING
18.06.2008 19:51 <DIR> doc
18.06.2008 19:51 537 hg
18.06.2008 19:51 1'251 hgeditor
18.06.2008 19:51 <DIR> hgext
18.06.2008 19:51 886 hgweb.cgi
18.06.2008 19:51 1'506 hgwebdir.cgi
18.06.2008 19:51 2'277 Makefile
18.06.2008 19:51 <DIR> mercurial
18.06.2008 19:51 310 README
18.06.2008 19:51 4'631 setup.py
18.06.2008 19:51 <DIR> templates
18.06.2008 19:51 <DIR> tests
12 File(s) 33'356 bytes
9 Dir(s) 31'105'040'384 bytes free
> cd .hg\store\data
> dir
Volume in drive W is Sys
Volume Serial Number is 8017-C29E
Directory of W:\hgrepo\.hg\store\data
18.06.2008 19:51 <DIR> .
18.06.2008 19:51 <DIR> ..
18.06.2008 19:50 4'193 .hgignore.i
18.06.2008 19:50 1'653 .hgsigs.i
18.06.2008 19:50 2'207 .hgtags.i
18.06.2008 19:50 977 comparison.txt.i
18.06.2008 19:50 <DIR> contrib
18.06.2008 19:50 529 convert-repo.i
18.06.2008 19:50 <DIR> doc
18.06.2008 19:50 27'362 hg.i
18.06.2008 19:50 5'988 hgeditor.i
18.06.2008 19:50 <DIR> hgext
18.06.2008 19:50 11'219 hgmerge.i
18.06.2008 19:50 3'033 hgweb.cgi.i
18.06.2008 19:50 6'746 hgweb.py.i
18.06.2008 19:50 3'168 hgwebdir.cgi.i
18.06.2008 19:50 <DIR> mercurial
18.06.2008 19:50 5'018 notes.txt.i
18.06.2008 19:50 5'244 purge.py.i
18.06.2008 19:50 321 rewrite-log.i
18.06.2008 19:50 13'997 setup.py.i
18.06.2008 19:50 <DIR> templates
18.06.2008 19:50 <DIR> tests
18.06.2008 19:51 110 tkmerge.i
18.06.2008 19:50 2'993 _c_o_n_t_r_i_b_u_t_o_r_s.i
18.06.2008 19:50 6'901 _c_o_p_y_i_n_g.i
18.06.2008 19:50 6'901 _c_o_p_y_i_n_g._g_p_l.i
18.06.2008 19:50 3'608 _makefile.i
18.06.2008 19:50 3'688 _m_a_n_i_f_e_s_t.in.i
18.06.2008 19:50 418 _p_k_g-_i_n_f_o.i
18.06.2008 19:50 11'330 _r_e_a_d_m_e.i
18.06.2008 19:50 5'620 _t_o_d_o.i
24 File(s) 133'224 bytes
8 Dir(s) 31'105'044'480 bytes free
But since the whole block of the uppercase entries is most likely kept
together it probably doesn't matter much where that block is moved to.
It's most likely the best thing to have all the uppercase entries
together. And that's what we have with the current encoding.
So my question was stupid and useless. Sorry for the noise.
More information about the Mercurial-devel
mailing list