monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Mtn automate select p: Bug


From: Timothy Brownawell
Subject: Re: [Monotone-devel] Mtn automate select p: Bug
Date: Sun, 22 Feb 2009 16:47:55 +0000

On Sun, 2009-02-22 at 12:55 +0100, Thomas Keller wrote:
> Anthony Edward Cooper schrieb:
> >    Hi peeps,
> > 
> >    Don't know if this one has been fixed already, but try doing `mtn au
> > select p:0' on the net.venge db, it doesn't like it! My db sync details
> > are:
> > 
> > database: default-exclude-pattern
> > database: default-include-pattern net.venge*
> > database: default-server monotone.ca
> > known-servers: monotone.ca .....
> > 
> >    Version on mtn is 0.42 running on a 32 bit WhiteBox 4 Respin 1 (very
> > similar to RHAS4U3).
> > 
> >    Did the command:
> > mtn --db=test-0.40.mtn au select p:0
> > 
> >    And got:
> > mtn: fatal: std::logic_error: selectors.cc:251: invariant
> > 'I(!value.empty())' violated
> > mtn: this is almost certainly a bug in monotone.
> > mtn: please send this error message, the output of 'mtn version --full',
> > mtn: and a description of what you were doing to address@hidden
> > mtn: wrote debugging log to /home/aecoope/.monotone/dump
> > mtn: if reporting a bug, please include this file
> 
> The problem is that decode_hexenc (as used in selectors.cc:196) doesn't
> cope with single digit "hex" values, they're all evaluated to an empty
> string. Try f.e. "p:9", the same invariant fires. I've stumbled upon the
> same problem in other areas before. A possible solution could be to
> "pad" uneven counts of hex values with leading zeros, i.e. "9" would be
> expanded to "09". These are then correctly processed by Botan's
> Hex_Decoder. But this is probably not what people expect, since they
> rather want that to be decoded to something like "9*".

The problem is that the selector value is being round-tripped through
{de,en}code_hexenc before going to add_prefix_matching_constraint, which
handles odd numbers of digits correctly.

It gets hex-decoded where you say, and then at database::select_parent()
it gets sent right back through encode_hexenc().

This should be fixed in e071526ac9b3f68d869dba38d365a7d3c1dee781.

-- 
Timothy

Free (experimental) public monotone hosting: http://mtn-host.prjek.net





reply via email to

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