[Bug 3621] New: Path lengths in fncache repos are still unbounded

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Tue Sep 11 15:22:42 CDT 2012


http://bz.selenic.com/show_bug.cgi?id=3621

          Priority: normal
            Bug ID: 3621
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Path lengths in fncache repos are still unbounded
          Severity: bug
    Classification: Unclassified
                OS: All
          Reporter: adrian at cadifra.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: unspecified
         Component: Mercurial
           Product: Mercurial

The original intention of the "fncache" repo format was to have limited path
lengths in the store of the repo.

However, "extensions" (=everything after the last period of a path name) are
appended in full, unlimited length.

For example, the path

'data/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPRSTUVWXYZ-1234567890-xxxxxxxxx-xxxxxxxxx-xxxxxxxx-xxxxxxxxx-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww'

is "encoded" as

'dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/28de8651e30eeb95f4b97edb7d12b281d3fb3ce0.3456789-12345-abcdefghijklmnoprstuvwxyz-abcdefghjiklmnopqrstuvwxyz-abcdefghijklmnoprstuvwxyz-1234567890-xxxxxxxxx-xxxxxxxxx-xxxxxxxx-xxxxxxxxx-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww-wwwwwwwww'

which isn't really shorter.

(see
http://selenic.com/repo/hg/file/8fea378242e3/tests/test-hybridencode.py.out#l411
)

This probably isn't that relevant in real-world use cases, as such abnormal
"extensions" will likely be extremely rare, especially on Windows.

Nevertheless, it's still a deficiency, as the path lengths are effectively
unbounded.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list