Michael Sperber writes:
diff --git a/version.sh b/version.sh.in
rename from version.sh
rename to version.sh.in
--- a/version.sh.in
+++ b/version.sh.in
@@ -8,5 +8,5 @@ infodock_major_version=4
infodock_major_version=4
infodock_minor_version=0
infodock_build_version=8
-xemacs_extra_name="(+CVS-20071205)"
xemacs_release_date="2007-05-21"
+xemacs_extra_name=
\ No newline at end of file
The above looks fragile, and Adrian Aichner's build.el and
build-reports.el have order dependencies. I don't remember the
details, but he complained to me when I moved some lines once.
+ if test -d ${srcdir}/.hg; then \
+ (cd ${srcdir}; hg identify | cut -d " " -f 1 >> version.sh); \
How about something like
xen_matcher='^.*xemacs_extra_name.*$'
xen_value='xemacs_extra_name="(hg: '`hg identify`')"'
cd ${srcdir}
sed -e "s/${xen_matcher}/${xen_value}/" <version.sh.in >version.sh
Note I left in the head identifier. The intent is to pick up a branch
name, but if that doesn't work, the cut version works for me. Works
for me in a quick test from the shell.
What's the deal with ${srcdir}/extra-name? I don't see how that can
get initialized to anything sensible, and I would think if it exists,
there's an argument for it taking precedence over hg identify.
Finally, it occurs to me that
cd ${srcdir}
echo ";;; local-diff.el --- local differences from tip" > lisp/local-diff.el
echo '(setq hg-reference-version "'`hg identify`'")' >>
lisp/local-diff.el
# Use rawstring literal :-)
echo '(setq hg-reference-diff #"' >> lisp/local-diff.el
hg diff >> lisp/local-diff.el
echo '")' >> lisp/local-diff.el
echo ";;; local-diff.el ends here" >> lisp/local-diff.el
deserves mention. :-) If that seems a bit privacy-invading, how about
hg status?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches