test: use `hg log` in the `getid` function
using `hg id` to retrieve full lenght node requires to use --debug. This may
include debug output (regarding branch cache invalidation for example) that
breaks the test. We now use `hg log` with a custom template. This is a simple,
clean and robust solution.