monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Revision numbering height compaction


From: Paul Crowley
Subject: Re: [Monotone-devel] Revision numbering height compaction
Date: Wed, 14 Feb 2007 23:08:22 +0000
User-agent: Icedove 1.5.0.9 (X11/20061220)

Paul Crowley wrote:
Either there's a problem with the height compaction proposal on the wiki as it currently stands, or I don't understand it.

Forgot to link to it:

http://www.venge.net/monotone/wiki/RevisionNumbering

Also my proposal in dumb Python:

def tobin(l, i):
    if l == 0:
        return ""
    return tobin(l-1,i>>1) + str(i & 1)

def _heightstring(l, i):
    lim = 128L**(l+1)
    if i < lim:
        return "1" * l + "0" + tobin(7*(l+1), i)
    return _heightstring(l+1, i-lim)

def heightstring(i): return _heightstring(0, i)

--
  __
\/ o\ Paul Crowley, address@hidden
/\__/ http://www.ciphergoth.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]