C-hglib - Level 0, API proposal.

Iulian Stana julian.stana at gmail.com
Tue Jul 9 11:14:41 CDT 2013


>  b) hg log <- can produce huge output
>> I know that some repo could have a huge log, but I don't know if the user
>> will use that huge output. My single thought right now is to set a limit
>> for the huge mass of data.
>> “The memory is full, the log data for this repo it's bigger than
>> MAX_SIZE, you can specify a file were the data to be store.”
>> I don't know if this is the best solution... Other ideas are welcome.
>>
>
> Limiting the amount of data sounds sensible, but why write it to a file?
> What about a cursor-like interface, similar to those returned by SQL
> queries?
>

I will try to see what do you mean by cursor-like interface.
Right now I am watching how mmap is functioning and if it can solve my
problem.


>
>
>>
>> c) hg import - <- wants a patch fed to it from client
>> If patch is a list of files or a file-like, then the input for the
>> command server will be from those files. In this case the data will be send
>> line by line to the server.
>>
>
> Note that the command server may ask for line-input or input in bulks with
> a size hint: http://mercurial.selenic.com/wiki/CommandServer#Channels
> I don't remember what happens in import, but you shouldn't assume one or
> the other.
>

I mean line by line, in that limited length size, that server asked.



> It sounds fine as a first step, anything fancier is definitely not "level
> 0".
>

Thank you for your opinion. Other opinions are welcome too .

-- 
Iulian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130709/71e0de4d/attachment.html>


More information about the Mercurial-devel mailing list