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, [EMAIL PROTECTED]
/\__/ http://www.ciphergoth.org/


_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to