Differences between revisions 1 and 2
Revision 1 as of 2007-12-17 10:59:20
Size: 9165
Editor: abuehl
Comment: Splitting this out of FAQ page
Revision 2 as of 2007-12-17 13:07:49
Size: 9208
Editor: abuehl
Comment: Moving to a subpage of FAQ page
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from FAQMercurialBook

TableOfContents


Mercurial Book

1. What is MBBS(mercurial book build system) ?

2. The Process flow chart mercurial book building in ASCII diagram

  1. PDF version
           |------------------------|    |------------------------|     |------------------------|   
           | Texts in latex         |    | Figures in SVG         |     | Figures in dot         |
           |------------------------|    |------------------------|     |------------------------|
                                             |                            |
                                             | inkscape -D -e $@ $<       | dot -Tps -o $@ $< 
                                             V                            V
                                          |------------------------|    |------------------------|   
                                          | Figures in EPS         |    | Figures in dot         |
                                          |------------------------|    |------------------------|
                                             |
                                             | epspdf *.eps
                                             V 
                                          |------------------------|   
                                          | Figures in PDF         |   
                                          |------------------------|   
    
      
    
                      
    
           |------------------------|
           | Mercurial book in tex  |
           |------------------------|
                       |
                       | pdflatex
                       V
           |------------------------|
           | Mercurial book in PDF  |
           |------------------------|
  2. html version

3. How do I setup MBBS using Fedora VMWare appliance approach ?

  1. [http://www.vmware.com/download/player/ Download VMWare player 2.0] or using VMWare workstation/VMWare ESX if you have a license.

  2. [http://download.thoughtpolice.co.uk/fedora-7-i386.zip.torrent Download Fedora 7 vmware image] from [http://www.thoughtpolice.co.uk/vmware/ Though police].

  3. Use YUM install the missing rpm packages.
    • [root@localhost ~]# yum install yum graphviz tetex mercurial rcs inkscape patchutils tex4ht tetex-latex
  4. Pull hg book source from [http://hg.serpentine.com/mercurial/book hg.serpentine.com book source repository].

    [root@localhost ~]# hg clone http://hg.serpentine.com/mercurial/book
    destination directory: book
    requesting all changes
    adding changesets
    adding manifests
    adding file changes
    added 277 changesets with 855 changes to 319 files
    315 files updated, 0 files merged, 0 files removed, 0 files unresolved
    [root@localhost ~]#
  5. Do a dry run to see what is going to happen.
    [root@localhost en]# make -n
    echo -n '92660e72d6bf, dated 2007-12-07 21:25 -0800,' > build_id.tex
    echo -n 'Mercurial Distributed SCM (version 0.9.4)' > hg_id.tex
    dot -Tps -o feature-branches.eps feature-branches.dot
    epstopdf feature-branches.eps
    <snip>
    inkscape -E wdir-pre-branch.eps wdir-pre-branch.svg
    epstopdf wdir-pre-branch.eps
    cd examples && ./run-example backout
    <snip>
    cd examples && ./run-example tour-merge-conflict
    touch examples/.run
    mkdir -p pdf/
    TEXINPUTS=./: pdflatex -interaction batchmode -output-directory pdf/ -jobname hgbook 00book.tex || (rm -f pdf/hgbook.pdf; exit 1)
    cp 99book.bib pdf/
    cd pdf/ && bibtex hgbook
    cd pdf/ && makeindex hgbook
    TEXINPUTS=./: pdflatex -interaction batchmode -output-directory pdf/ -jobname hgbook 00book.tex || (rm -f pdf/hgbook.pdf; exit 1)
    TEXINPUTS=./: pdflatex -interaction batchmode -output-directory pdf/ -jobname hgbook 00book.tex || (rm -f pdf/hgbook.pdf; exit 1)
    if grep 'Reference.*undefined' pdf/hgbook.log; then exit 1; fi
    dot -Tsvg -o feature-branches.svg feature-branches.dot
    inkscape -D -e feature-branches.png feature-branches.svg
    <snip>
    dot -Tsvg -o undo-simple.svg undo-simple.dot
    inkscape -D -e undo-simple.png undo-simple.svg
    <snip>
    inkscape -D -e wdir-pre-branch.png wdir-pre-branch.svg
    mkdir -p html/onepage/
    cp 99book.bib html/onepage/
    TEXINPUTS=./: ./htlatex.book 00book.tex "bookhtml,html4-uni," " -cunihtf -utf8" "html/onepage/" "-interaction batchmode -output-directory html/onepage/ -jobname hgbook" || (rm -f html/onepage/hgbook.html; exit 1)
    cd html/onepage/ && tex4ht -f/hgbook -cvalidate -cunihtf
    cd html/onepage/ && t4ht -f/hgbook
    ./fixhtml.py html/onepage//*.html
    rm html/onepage//hgbook.css
    cp hgbook.css html/onepage/hgbook.css
    cp feature-branches.png html/onepage/feature-branches.png
    <snip>
    cp kdiff3.png html/onepage/kdiff3.png
    cp note.png html/onepage/note.png
    mkdir -p html/split/
    cp 99book.bib html/split/
    TEXINPUTS=./: ./htlatex.book 00book.tex "bookhtml,html4-uni,2" " -cunihtf -utf8" "html/split/" "-interaction batchmode -output-directory html/split/ -jobname hgbook" || (rm -f html/split/hgbook.html; exit 1)
    cd html/split/ && tex4ht -f/hgbook -cvalidate -cunihtf
    cd html/split/ && t4ht -f/hgbook
    ./fixhtml.py html/split//*.html
    rm html/split//hgbook.css
    cp hgbook.css html/split/hgbook.css
    cp feature-branches.png html/split/feature-branches.png
    <snip>
    cp kdiff3.png html/split/kdiff3.png
    cp note.png html/split/note.png
    rm undo-non-tip.eps wdir-after-commit.eps wdir-merge.eps undo-manual.eps wdir-branch.eps metadata.eps snapshot.eps wdir-pre-branch.eps tour-merge-sep-repos.eps tour-merge-pull.eps revlog.eps tour-merge-conflict.eps tour-merge-merge.eps feature-branches.svg undo-manual-merge.eps undo-simple.svg feature-branches.eps undo-simple.eps tour-history.eps filelog.eps wdir.eps mq-stack.eps undo-manual-merge.svg undo-non-tip.svg undo-manual.svg
    [root@localhost en]#

4. How do I setup MBBS using OpenSolaris x86/Solaris 10 x86 VMWare appliance approach ?

Followings are just brief steps.

  1. create a vmware session using Solaris 10.
  2. get the book system needed software.

5. How do I check in the changes I made ?

  1. TBA.

6. How do I back out the changes in Mercurial book changes history ?

  1. Backout to a known working copy to discard the changes.
  2. Ex. the changes set after "271:8627f718517a" break the book building on Fedora 7(also on 6 and 8).
    1. Error message, failed at "run-example bisect".
      cd examples && ./run-example backout
      running backout ..............
      cd examples && ./run-example bisect
      running bisect .....
      Output of bisect.search.init has changed!
      --- bisect.search.init.out      2007-12-08 07:47:25.000000000 -0500
      +++ bisect.search.init.err      2007-12-08 07:52:01.000000000 -0500
      @@ -1,3 +1 @@
      
      -
      -
      .......
      (exit 0)
      make: *** [examples/bisect.run] Error 1
      rm undo-non-tip.eps wdir-after-commit.eps wdir-merge.eps undo-manual.eps wdir-br anch.eps metadata.eps snapshot.eps wdir-pre-branch.eps tour-merge-sep-repos.eps  tour-merge-pull.eps revlog.eps tour-merge-conflict.eps tour-merge-merge.eps undo -manual-merge.eps feature-branches.eps undo-simple.eps tour-history.eps filelog. eps wdir.eps mq-stack.eps
      [root@localhost en]#
    2. The change logs
    [root@localhost book]# hg log  | head -40
    changeset:   276:92660e72d6bf
    tag:         tip
    user:        "Dongsheng Song" <dongsheng.song@gmail.com>
    date:        Fri Dec 07 21:25:07 2007 -0800
    summary:     [hgbook] Fix a typo
    
    changeset:   275:96ea24a916f9
    parent:      274:b049cb10bde3
    parent:      273:00f69e8825c5
    user:        Bryan O'Sullivan <bos@serpentine.com>
    date:        Mon Nov 26 20:42:36 2007 -0800
    summary:     Merge with myself.
    
    changeset:   274:b049cb10bde3
    parent:      271:8627f718517a
    user:        Bryan O'Sullivan <bos@serpentine.com>
    date:        Mon Nov 26 20:42:17 2007 -0800
    summary:     Add a link to myself.
    
    changeset:   273:00f69e8825c5
    user:        Bryan O'Sullivan <bos@serpentine.com>
    date:        Mon Nov 26 12:24:53 2007 -0800
    summary:     Bring book up to date with recent changes.
    
    changeset:   272:74c079e0051f
    user:        Bryan O'Sullivan <bos@serpentine.com>
    date:        Mon Nov 26 11:18:46 2007 -0800
    summary:     Account for change in bisect output.
    
    changeset:   271:8627f718517a
    user:        Max Vozeler <max@nusquama.org>
    date:        Mon Sep 10 19:38:41 2007 +0200
    summary:     Fix typo "paptches"
    
    changeset:   270:4c767178c1aa
    user:        Eric Hanchrow <offby1@blarg.net>
    date:        Mon Jun 04 13:23:53 2007 -0700
    summary:     Fix typos
    
    changeset:   269:abfe426f7e08
    [root@localhost book]#
  3. run the following commands to undo the change after Sept 10 2007. the revision number is 271.
      hg backout --merge -m 'Sep102007' 271

BuildingMercurialBook (last edited 2013-09-03 03:31:36 by KevinBot)