Added test for getHeadRev for branches with namespace
Fix for getHeadRev bug when using branch namespaces

JENKINS-20767