Mercurial > repos > public > sbplib
diff hgRevision.m @ 943:21394c78c72e feature/utux2D
Merge with default
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Tue, 04 Dec 2018 15:24:36 -0800 |
parents | fd85412c7a99 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hgRevision.m Tue Dec 04 15:24:36 2018 -0800 @@ -0,0 +1,8 @@ +% 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