Differences between revisions 2 and 3
Revision 2 as of 2013-07-25 05:13:33
Size: 1831
Editor: vau06-2-82-238-188-31
Comment: added links to email threads
Revision 3 as of 2013-07-25 05:22:16
Size: 2124
Editor: vau06-2-82-238-188-31
Comment: added a few more questions found in emails
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
   More const. Misplaced *. What is configs?
 2. What if we want to run a command without a repository, like init or clone?
 3. How do we get exit codes?
 4. How do we send input to a command like 'hg import -'?
 5. How do we handle interactive commands like merge?
 6. How do we get error output and warnings?
  More const. Misplaced *. What is configs?
 1. What if we want to run a command without a repository, like init or clone?
 1. `int hg_rawcommand(hg_handle *handle, const char *command);`
   
How do we pass args with spaces?
 1. How do we
get exit codes?
 1. How do we send input to a command like 'hg import -'?
 1. How do we handle interactive commands like merge?
 1. How do we get error output and warnings?
Line 17: Line 19:
 7.#7 What does this return? ( The return values for all API functions )
 8. Story for :
 1.#8 What does this return? ( The return values for all API functions )
 1. {{{
int hg_close(hg_handle *handle);
/* The function returns 0 if successful,
 * -1 to indicate an error, with errno set appropriately. */
}}}
   What sorts of errors might we encounter?
 1. Story for :
Line 30: Line 38:
 9. Do you see the * on the left? ( pointer issue)
 10. How do I set encoding for the connection?
 11. Will this do the right thing? If so, how?(adding file with space issue)
 12. How do I get the prompt questions displayed to the user and get the user answers back?
 13. 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?
 1. Do you see the * on the left? ( pointer issue)
 1. How do I set encoding for the connection?
 1. Will this do the right thing? If so, how?(adding file with space issue)
 1. How do I get the prompt questions displayed to the user and get the user answers back?
 1. 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?
Line 39: Line 47:
 14.#14 Action-header, what is an action-header ?
 15. so wpipe is server stdin, rpipe is server stdout. Were have stderr been?
 16. "The repository in which I am", do you mean the first repository found in PWD hierarchy?
 17. What is the default encoding?
 1.#14 Action-header, what is an action-header ?
 1. so wpipe is server stdin, rpipe is server stdout. Were have stderr been?
 1. "The repository in which I am", do you mean the first repository found in PWD hierarchy?
 1. What is the default encoding?

Through time I had received lots of question about C-hglib project.

I made this page to counter those question and to have them in a single place.

Initial commit mail (http://markmail.org/thread/ism45s5vp7jsbp5u):

  1. hg_handle* hg_open(const char *path, char *encoding, char *configs);

    • More const. Misplaced *. What is configs?
  2. What if we want to run a command without a repository, like init or clone?
  3. int hg_rawcommand(hg_handle *handle, const char *command);

    • How do we pass args with spaces?
  4. How do we get exit codes?
  5. How do we send input to a command like 'hg import -'?
  6. How do we handle interactive commands like merge?
  7. How do we get error output and warnings?

C-hglib – Level 0 , API proposal mail (http://mercurial.markmail.org/thread/f5irmijzatlephtw):

  1. What does this return? ( The return values for all API functions )
  2. int hg_close(hg_handle *handle);
    /* The function returns 0 if successful,
     * -1 to indicate an error, with errno set appropriately. */
    • What sorts of errors might we encounter?
  3. Story for :
    1. hg init <- doesn't start with a repo

      b. hg log <- can produce huge output

      c. hg import - <- wants a patch fed to it from client

      d. hg merge <- has prompts

      e. hg verify <- might give warnings intermixed with output

  4. Do you see the * on the left? ( pointer issue)
  5. How do I set encoding for the connection?
  6. Will this do the right thing? If so, how?(adding file with space issue)
  7. How do I get the prompt questions displayed to the user and get the user answers back?
  8. 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?

Header patchbomb mail (http://mercurial.markmail.org/thread/qsfwzmxzzs4ekuuv):

  1. Action-header, what is an action-header ?
  2. so wpipe is server stdin, rpipe is server stdout. Were have stderr been?
  3. "The repository in which I am", do you mean the first repository found in PWD hierarchy?
  4. What is the default encoding?

C-Hglib/Questions (last edited 2013-09-03 03:17:55 by KevinBot)