Fix proposal for getHeadRev bug when using branch namespaces

Fix proposal for getHeadRev bug when using branch namespaces (e.g. feature1/master).
See https://issues.jenkins-ci.org/browse/JENKINS-20767?focusedCommentId=195996&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-195996

For the tests the branches test/namespace(1-3)/master (with different head commits!!) have to exist. I demonstrated this in my fork and switched the URL in localMirror() temporarily to my repo!