Sketch the header for level 1

Iulian Stana julian.stana at gmail.com
Sun Aug 18 18:13:59 UTC 2013


2013/8/18 Giovanni Gherdovich <g.gherdovich at gmail.com>

> Hello Iulian,
>
>
> Iulian wrote:
> >
> > I would like to talk ASAP about this issue.
>
> after reading your message, it's unclear what "this issue" is.
> If you want an answer, you have to state a clear question.
>
>
I'm sorry for unclear message...



> My wild guess on what you're asking is the following:
>
> "There are two possibilities on how level 1 commands can behave:
>
> (1) Return immedietely after having sent the command to commandserv,
>     just wrapping a call to hg_rawcommand().
>     Other API functions are provided to retrieve:
>     (a) the data sent in response by the commandserv, in parsed
> (structured) form
>     (b) the exitcode, i.e. the content of the 'r' channel after all things
>         have happened.
> (2) Wait for the commandserv to complete *all* his actions in response to
>     the issued command, which is cache the commandserv response somewhere,
>     and return the actual exitcode (channel 'r' from commandserv)
>     as the result of the chglib API call"
>
> We have already discussed at length and concluded that hg_log() has to
> follow model (1).
> Which one of those two models should I use for hg_add()?"
>
Is this that you're asking Iulian?
> Did I interpret correctly?
>

Yes, you are right about those two possibilities. The log command is
following
model (1).
The hg_add command will follow the second model. The hg_add command will
return to the user the exitcode received from command server. But in case an
error occurs or a 'debug' option is set, what will be the proper way to
pass the
output/error/debug data to the user?

My issue is, how this data will be cache or pass. My thoughts right now is
to
create three pointers on handle structure for every kind of output data
( output / error / debug ). To set the unparse data to those three address
and
to create three new function get_output/error/debug_data. This model will be
used for those commands that Ps
have a low mass of data.
(For example the add command could return some data to show the add files,
or  some output/debug data for unrecognized option)

ps: Giovanni, it seams that there is a third output channel the debug
channel.
You can get data to this channel by using "--debug" option. I had tried
this on
a local add command.


> Giovanni
>
> --
Iulian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20130818/31a5dd21/attachment-0002.html>


More information about the Mercurial-devel mailing list