On Mon, 5 Mar 2012, Kip Warner wrote:

On Sun, 2012-03-04 at 23:20 -0500, Aditya Mahajan wrote:
If you want to use the automagic way, you can define \BazaarRevision to
redefined \BazaarRevision, for example:

\def\BazaarRevision
       {\ctxlua{context.setevalue(
                 "BazaarRevision",
                  os.resultof"bzr revno | tr -d '\\n'")}%
        \BazaarRevision}

Hey Aditya. I tried the automagic method, but ConTeXt bails:

! TeX capacity exceeded, sorry [text input levels=127].
\BazaarRevision ...ltof"bzr revno | tr -d '\\n'")}
                                                 \BazaarRevision
l.4 }

\BazaarRevision ...ltof"bzr revno | tr -d '\\n'")}
                                                 \BazaarRevision
l.4 }

\BazaarRevision ...ltof"bzr revno | tr -d '\\n'")}
                                                 \BazaarRevision
l.4 }

...
l.58

The attached file works at my end.


Based on what I saw from htop, it looks like it running the command into
the ground over and over again which is the exact opposite of what we
are trying to do.

No. It is defining \BazaarVersion once and then reusing the result. Add \loggingall to your file to see what is happening.

Aditya

Attachment: test.tex
Description: TeX document

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to