Comments
Patch
@@ -1356,6 +1356,23 @@
return sum;
}
+/* The high level tag command for hglib API. */
+int hg_tag(hg_handle *handle, int(*callback)(const char *msg, size_t len),
+ char *argument[])
+{
+ int exitcode;
+ char **command = cmdbuilder("tag", argument , NULL);
+
+ if(hg_rawcommand(handle, command) < 0){
+ return -1;
+ }
+ free(command);
+
+ exitcode = hg_runcommand(handle, callback, NULL);
+
+ return exitcode;
+}
+
/* The yield next step. Getting the next entry. */
int hg_fetch_entry(hg_stream_buffer *stream, int (*detect_byte)(char *buff,
int buf_size, int data_on_pipe), int func_type)
@@ -2066,6 +2066,41 @@
**/
hg_summary_entry *hg_summary(hg_handle *handle, int(*callback)
(const char *msg, size_t len), char *argument[]);
+
+/**
+ * \brief hg_tag command for hglib API.
+ *
+ * Name a particular revision using <name>.
+ *
+ * Tags are used to name particular revisions of the repository and are very
+ * useful to compare different revisions, to go back to significant earlier
+ * versions or to mark branch points as releases, etc. Changing an existing tag
+ * is normally disallowed; use -f/--force to override.
+ *
+ * If no revision is given, the parent of the working directory is used.
+ *
+ * Options/Argument list option:
+ *
+ * -f, --force force tag
+ * -l, --local make the tag local
+ * -r, --rev revision to tag
+ * --remove remove a tag
+ * -e, --edit edit commit message
+ * -m, --message use <text> as commit message
+ * -d, --date record the specified date as commit date
+ * -u, --user record the specified user as committer
+ *
+ * \param handle The handle of the connection, wherewith I want to communicate
+ * \param callback A function that will handle error data.
+ * A NULL pointer will ignore error data.
+ * \param argument The option list. Will contain all option that you wish.
+ * \retval exitcode To indicate the end of tag_command.
+ *
+ * errno can be:
+ * - hg_rawcommand errors
+ **/
+int hg_tag(hg_handle *handle, int(*callback)(const char *msg, size_t len),
+ char *argument[]);
/**
* \brief The yield mechanism that will get the next entry.