diff hgRevision.m @ 1072:6468a5f6ec79 feature/grids/LaplaceSquared

Merge with default
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 12 Feb 2019 17:12:42 +0100
parents fd85412c7a99
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hgRevision.m	Tue Feb 12 17:12:42 2019 +0100
@@ -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