comparison hgRevision.m @ 891:fd85412c7a99

Add function to get the hgRevision hash as a string
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 22 Nov 2018 07:25:52 +0100
parents
children
comparison
equal deleted inserted replaced
879:9be370486d36 891:fd85412c7a99
1 % Returns the short mercurial revision Id.
2 % ok is false if there are uncommited changes.
3 function [revId, ok] = hgRevision()
4 [~, s] = system('hg id -i');
5 revId = strtrim(s);
6
7 ok = s(end) ~= '+';
8 end