Commit the hg build identification patch from the pymigr repo.
diff --git a/configure.in b/configure.in
index d1833be..3c6bd6f 100644
--- a/configure.in
+++ b/configure.in
@@ -785,6 +785,21 @@
 	SVNVERSION="echo Unversioned directory"
 fi
 
+AC_SUBST(HGVERSION)
+AC_SUBST(HGTAG)
+AC_SUBST(HGBRANCH)
+AC_CHECK_PROG(HAS_HG, hg, found, not-found)
+if test $HAS_HG = found
+then
+    HGVERSION="hg id -i \$(srcdir)"
+    HGTAG="hg id -t \$(srcdir)"
+    HGBRANCH="hg id -b \$(srcdir)"
+else
+    HGVERSION=""
+    HGTAG=""
+    HGBRANCH=""
+fi
+
 case $MACHDEP in
 bsdos*|hp*|HP*)
 	# install -d does not work on BSDI or HP-UX