There appears to be problem with Mercurial 3.4 even when the log command executes successfully. We are finding that the command returns a number of unwanted changesets (in our case ~2000 of them), apparently everything which is not an ancestor of the current branch head.
I tested this command manually and found that it returns the expected result for 3.3.3 and the extra results for 3.4 (and 3.6):
hg log --rev <branch_name>:0 --follow --prune <last_changeset>
The following command returns the desired results on 3.3.3, 3.4, and 3.6
hg log --rev "ancestors('<branch_name>')" --prune <last_changeset>
The single quotes around <branch_name> also fix the whitespace problem.
This is due to the following change:
log: make -fr show complete history from the given revs