In some condition, there is no log info for almost new changeset after pretxncommit
Created originally on Bitbucket by DannyWan
My repository is like:
-- empty place in [myrepo]
I added an external hook (myhook.exe) for pretxncommit. During the pretxncommit hook, there will be a almost new changeset. In myhook.exe, I executed another hg command line to get the log of this almost new changeset.
The command i used is: hg log -v -r NewChangesetId(HG_NODE). The output should be some details about this changeset.
Assume that fileB.h is modified. If i right click [myrepo] or right click [second] to call a commit for the file fileB.h, the hook will be triggered and the output is correct.
THE PROBLEM IS: If i right click the mouse JUST INSIDE [myrepo] (for example click [first1] or click the empty place in [myrepo]) to call a commit for the file fileB.h, the hook will also be triggered, but the output is empty.
I've tried many times. No matter which file i want to commit (inside top folder like fileA.h, deeply inside some folders like fileC.h), this problem always happened if I did the COMMIT JUST INSIDE THE TOP FOLDER OF THE REPOSITORY.
If I do the commit in other folders (outside [myrepo], inside [first], inside [second], or inside [third]), it will not happen. If I use hg command line to do the commit (not by UI), it will not happen either, so the problem seems really to comes from TortoiseHG and not Hg itself.