Output the branch a particular commit is on; this is easy for
mercurial and monotone, but slightly harder till impossible to do properly for git and svn. Please review and eventually adapt the code to make it work better (partially fixes issue 450)
This commit is contained in:
@@ -429,6 +429,8 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
||||
$c['author'] = $match[2];
|
||||
} elseif ($match[1] == 'summary') {
|
||||
$c['title'] = $match[2];
|
||||
} elseif ($match[1] == 'branch') {
|
||||
$c['branch'] = $match[2];
|
||||
} else {
|
||||
$c[$match[1]] = trim($match[2]);
|
||||
}
|
||||
@@ -443,6 +445,7 @@ class IDF_Scm_Mercurial extends IDF_Scm
|
||||
}
|
||||
}
|
||||
$c['tree'] = !empty($c['commit']) ? trim($c['commit']) : '';
|
||||
$c['branch'] = empty($c['branch']) ? 'default' : $c['branch'];
|
||||
$c['full_message'] = !empty($c['full_message']) ? trim($c['full_message']) : '';
|
||||
$res[] = (object) $c;
|
||||
return $res;
|
||||
|
Reference in New Issue
Block a user