view hgRevision.m @ 987:1d70f29c7ab2

Add assertLength
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 08 Jan 2019 14:59:43 +0100
parents fd85412c7a99
children
line wrap: on
line source

% Returns the short mercurial revision Id.
%  ok is false if there are uncommited changes.
function [revId, ok] = hgRevision()
    [~, s] = system('hg id -i');
    revId = strtrim(s);

    ok = s(end) ~= '+';
end