Added check for empty MergeInfo sets

I created a fix for a problem with empty sequence of parent branches described in issue #637 

It is based on an assumption, that no changeset ID can equal 0. I used that value for situation when no parent in MergeInfo has been found. If anyone thinks it's wrong assumption, please let me know. We can achieve simmilar effect using exceptions, but it's dirtier in my humble ;) opinion.