[prev in list] [next in list] [prev in thread] [next in thread]
List: mercurial-devel
Subject: Re: [PATCH 1 of 2 RFC C-hglib] level 1 prototypes: model (2) commands (hd_add - like commands)
From: Iulian Stana <julian.stana () gmail ! com>
Date: 2013-08-29 12:05:42
Message-ID: CAABE7MiJgyZtFdrFRt-wQqVp-Fso9aLr3GQzRjf2dfwd4QJLSw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
I would like to receive some remarks for some of those commands. The rest
of
commands will have the same stories.
+/**
> + * Example of description.
> + * \brief hg_add command for hglib API.
> + *
> + * Add the specified files on the next commit.
> + * If no files are given, add all files to the repository.
> + *
> + * dryrun - do no perform actions
> + * subrepos - recurse into subrepositories
> + * include - include names matching the given patterns
> + * exclude - exclude names matching the given patterns
> + *
> + * \param handle The handle of the connection, wherewith I want to
> communicate
> + * \param callback The handle function for error data.
> + * \param option The option list for mercurial add command.
> + * \retval exitcode To indicate the end of add_command.
> + *
> + * errno can be:
> + * - hg_rawcommand errors
> + * */
> +int hg_add(hg_handle *handle, int (*callback)(const char *msg, size_t
> len),
> + char *argument[]);
> +
>
Almost all of those commands have the same signature. I would like to
know if this signature will fit with mercurial or if I must change it.
The callback function will handle the error data.
> +/**
> + * bookmarks description.
> + * The return value will be a list of tuples(name, rev, node)
> + * */
> +hg_rev_entry_t *hg_bookmarks(hg_handle *handle, int(*callback)
> + (const char *msg, size_t len), char *argument[]);
> +
>
I would like to know if this command is a model (1) command... (probably
the list will have a lots of bookmarks).
Also I would like to know if the hg_rev_entry_t is the proper name for this
tuple.
> +/**
> + * branches description.
> + * The return value will be a list of tuples(name, rev, node)
> + * */
> +hg_rev_entry_t *hg_branches(hg_handle *handle, int(*callback)
> + (const char *msg, size_t len), char *argument[]);
> +
>
Same story like above.
> +/**
> + * commit description.
> + * The return value will be a tuple(rev, node)
> + * */
> +hg_rev_entry_t hg_commit(hg_handle *handle, int(*callback)
> + (const char *msg, size_t len), char *argument[]);
> +
>
The return value must be the exitcode or a tuple?
> +/**
> + * identify description
> + * I would really like to know how to parse this data...
> + * */
> +char *hg_identify(hg_handle *handle, int(*callback)(const char *msg,
> size_t len),
> + char *argument[]);
> +
>
What kind of data is this function returning ?
+/**
> + * merge function
> + * The merge function can have prompts.
> + * */
> +int hg_merge(hg_handle *handle, int (*callback)(const char *msg, size_t
> len),
> + char (*prompt)(const char *msg, size_t len), char
> *argument[]);
> +
>
A command that can have prompts...
> +/**
> + * paths description
> + * retrun some parse data.
> + * I don't really know how this command is working and what data will
> deliver.
> + * */
> +hg_struct hg_paths(hg_handle *handle, int(*callback)(const char *msg,
> size_t len),
> + char *argument[]);
> +
>
What kind of data is this function returning ?
+/**
> + * tags description
> + * return a list of tags.
> + **/
> +hg_tags_struct *hg_tags(hg_handle *handle, int(*callback)
> + (const char *msg, size_t len), char *argument[]);
> +
>
Same story like bookmarks command.
> +/**
> + * tip description
> + * The return value will be a cset_entry structure (the tip cset will be
> parse
> + * and pass to directly to user). If any error occur, the return value
> will be a
> + * NULL pointer and errno will be set appropiate.
> + * */
> +hg_cset_entry_t *hg_tip(hg_handle *handle, int(*callback)(const char *msg,
> + size_t len), char
> *argument[]);
> +
>
The return value is the parse changeset. It would be better to return the
exitcode and the cset structure to be put in command signature?
> +/**
> + * verify description
> + **/
> +hg_verify_entry_t *hg_verify(hg_handle *handle, int(*callback)
> + (const char *msg, size_t len), char
> *argument[]);
> +
>
What kind of data is this function returning ? How will verify structure
look like? What I will parse in this structure?
[Attachment #5 (text/html)]
<div dir="ltr"><div class="gmail_extra"><span \
style="font-family:arial,sans-serif;font-size:13px">I would like to receive some \
remarks for some of those commands. The rest of </span><div \
style="font-family:arial,sans-serif;font-size:13px"> commands will have the same \
stories. <div><br></div><div> +/**<br><div class="gmail_extra"><div \
class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0px \
0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+ * Example of description.<br>+ * \brief hg_add command for hglib API.<br>+ *<br>+ \
* Add the specified files on the next commit.<br>+ * If no files are given, add all \
files to the repository.<br>+ *<br>+ * dryrun - do no perform actions<br> + * \
subrepos - recurse into subrepositories<br>+ * include - include names matching \
the given patterns<br>+ * exclude - exclude names matching the given \
patterns<br>+ *<br>+ * \param handle The handle of the connection, wherewith I want \
to communicate<br> + * \param callback The handle function for error data.<br>+ * \
\param option The option list for mercurial add command.<br>+ * \retval exitcode To \
indicate the end of add_command.<br>+ *<br>+ * errno can be:<br>+ * - \
hg_rawcommand errors<br> + * */<br>+int hg_add(hg_handle *handle, int \
(*callback)(const char *msg, size_t len),<br>+ \
char *argument[]);<br>+<br></blockquote><div><br></div></div><div>Almost all of those \
commands have the same signature. I would like to </div> <div>know if this signature \
will fit with mercurial or if I must change it.<br></div><div>The callback function \
will handle the error data. </div><div class="im"><div><br></div><div> \
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+/**<br>+ * bookmarks description.<br>+ * The return value will be a list of \
tuples(name, rev, node)<br>+ * */<br>+hg_rev_entry_t *hg_bookmarks(hg_handle *handle, \
int(*callback)<br>+ (const char *msg, size_t len), char \
*argument[]);<br> +<br></blockquote><div><br></div></div><div>I would like to know if \
this command is a model (1) command... (probably</div><div>the list will have a lots \
of bookmarks).</div><div><br></div><div>Also I would like to know if the \
hg_rev_entry_t is the proper name for this</div> <div>tuple.</div><div \
class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">+/**<br>+ \
* branches description.<br> + * The return value will be a list of tuples(name, rev, \
node)<br>+ * */<br>+hg_rev_entry_t *hg_branches(hg_handle *handle, \
int(*callback)<br>+ (const char *msg, size_t len), char \
*argument[]);<br>+<br> </blockquote><div> </div></div><div>Same story like \
above.</div><div class="im"><div> </div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+/**<br>+ * commit description.<br>+ * The return value will be a tuple(rev, \
node)<br>+ * */<br>+hg_rev_entry_t hg_commit(hg_handle *handle, int(*callback)<br>+ \
(const char *msg, size_t len), char *argument[]);<br> \
+<br></blockquote><div><br></div></div><div>The return value must be the exitcode or \
a tuple?</div><div class="im"><div><br></div><div> </div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+/**<br>+ * identify description<br>+ * I would really like to know how to parse \
this data...<br>+ * */<br>+char *hg_identify(hg_handle *handle, int(*callback)(const \
char *msg, size_t len),<br>+ \
char *argument[]);<br> +<br></blockquote><div> </div></div><div>What kind of data is \
this function returning ?</div><div class="im"><div><br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+/**<br>+ * merge function<br>+ * The merge function can have prompts.<br>+ * \
*/<br>+int hg_merge(hg_handle *handle, int (*callback)(const char *msg, size_t \
len),<br>+ char (*prompt)(const char *msg, size_t len), char \
*argument[]);<br> +<br></blockquote><div><br></div></div><div>A command that can have \
prompts...</div><div class="im"><div><br></div><div> </div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+/**<br>+ * paths description<br>+ * retrun some parse data.<br>+ * I don't \
really know how this command is working and what data will deliver.<br>+ * \
*/<br>+hg_struct hg_paths(hg_handle *handle, int(*callback)(const char *msg, size_t \
len),<br> + char \
*argument[]);<br>+<br></blockquote><div><br></div></div><div>What kind of data is \
this function returning ?</div><div class="im"><div><br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+/**<br>+ * tags description<br>+ * return a list of tags.<br>+ \
**/<br>+hg_tags_struct *hg_tags(hg_handle *handle, int(*callback)<br>+ \
(const char *msg, size_t len), char *argument[]);<br>+<br></blockquote> <div> \
</div></div><div>Same story like bookmarks command.</div><div class="im"><div> \
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+/**<br>+ * tip description<br>+ * The return value will be a cset_entry structure \
(the tip cset will be parse<br>+ * and pass to directly to user). If any error occur, \
the return value will be a<br>+ * NULL pointer and errno will be set appropiate.<br> \
+ * */<br>+hg_cset_entry_t *hg_tip(hg_handle *handle, int(*callback)(const char \
*msg,<br>+ size_t len), char \
*argument[]);<br>+<br></blockquote><div><br></div></div><div>The return value is the \
parse changeset. It would be better to return the </div> <div>exitcode and the cset \
structure to be put in command signature? </div><div class="im"><div><br></div><div> \
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+/**<br>+ * verify description<br>+ **/<br>+hg_verify_entry_t *hg_verify(hg_handle \
*handle, int(*callback)<br>+ (const char *msg, size_t \
len), char *argument[]);<br>+<br></blockquote><div><br> </div></div><div>What kind of \
data is this function returning ? How will verify structure <br></div><div>look like? \
What I will parse in this structure?</div></div></div></div></div> </div></div>
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic