A little bit about how long revision prefixes have to be and the caveats of having one too short.
If the API is returning a revision, it will always be in full and not be a prefix. If you are passing a revision and you choose to pass a prefix, note that an overly short prefix may be ambiguous, in which case the API chooses the first revision it finds that matches. If your prefix is so short that it matches the number Mercurial assigns to some revision, that revision will be chosen. For example, if you pass "9910", the API might think that you meant r9910 rather than 9910837f279a. This is the same behavior as the Kiln website user interface.
Return to API Idioms.