627de3bf16 2009-01-25 drh: #!/usr/bin/tclsh 627de3bf16 2009-01-25 drh: # 627de3bf16 2009-01-25 drh: # Run this to generate the FAQ 627de3bf16 2009-01-25 drh: # 627de3bf16 2009-01-25 drh: set cnt 1 627de3bf16 2009-01-25 drh: proc faq {question answer} { 627de3bf16 2009-01-25 drh: set ::faq($::cnt) [list [string trim $question] [string trim $answer]] 627de3bf16 2009-01-25 drh: incr ::cnt 627de3bf16 2009-01-25 drh: } 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: faq { 627de3bf16 2009-01-25 drh: What GUIs are available for fossil? 627de3bf16 2009-01-25 drh: } { 627de3bf16 2009-01-25 drh: The fossil executable comes with a web-based GUI built in. Just run: 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: <blockquote> 627de3bf16 2009-01-25 drh: <b>fossil ui</b> <i>REPOSITORY-FILENAME</i> 627de3bf16 2009-01-25 drh: </blockquote> 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: And your default web browser should pop up and automatically point to 627de3bf16 2009-01-25 drh: the fossil interface. (Hint: You can omit the <i>REPOSITORY-FILENAME</i> 627de3bf16 2009-01-25 drh: if you are within an open check-out.) 627de3bf16 2009-01-25 drh: } 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: faq { 627de3bf16 2009-01-25 drh: What is the difference between a "branch" and a "fork"? 627de3bf16 2009-01-25 drh: } { 627de3bf16 2009-01-25 drh: This is a big question - too big to answer in a FAQ. Please 627de3bf16 2009-01-25 drh: read the <a href="branching.wiki">Branching, Forking, Merging, 627de3bf16 2009-01-25 drh: and Tagging</a> document. 627de3bf16 2009-01-25 drh: } 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: faq { 627de3bf16 2009-01-25 drh: How do I create a new branch in fossil? 627de3bf16 2009-01-25 drh: } { 627de3bf16 2009-01-25 drh: There are lots of ways: 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: When you are checking in a new change using the <b>commit</b> 627de3bf16 2009-01-25 drh: command, you can add the option "--branch <i>BRANCH-NAME</i>" to 627de3bf16 2009-01-25 drh: make the change be the founding check-in for a new branch. You can 627de3bf16 2009-01-25 drh: also add the "--bgcolor <i>COLOR</i>" option to give the branch a 627de3bf16 2009-01-25 drh: specific background color on timelines. 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: If you want to create a new branch whose founding check-in is the 627de3bf16 2009-01-25 drh: same as an existing check-in, use this command: 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: <blockquote> 627de3bf16 2009-01-25 drh: <b>fossil branch new</b> <i>BRANCH-NAME BASIS</i> 627de3bf16 2009-01-25 drh: </blockquote> 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: The <i>BRANCH-NAME</i> argument is the name of the new branch and the 627de3bf16 2009-01-25 drh: <i>BASIS</i> argument is the name of the check-in that the branch splits 627de3bf16 2009-01-25 drh: off from. 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: If you already have a fork in your check-in tree and you want to convert 627de3bf16 2009-01-25 drh: that fork to a branch, you can do this from the web interface. 627de3bf16 2009-01-25 drh: First locate the check-in that you want to be 627de3bf16 2009-01-25 drh: the founding check-in of your branch on the timeline and click on its 627de3bf16 2009-01-25 drh: link so that you are on the <b>ci</b> page. Then find the "<b>edit</b>" 627de3bf16 2009-01-25 drh: link (near the "Commands:" label) and click on that. On the 627de3bf16 2009-01-25 drh: "Edit Check-in" page, check the box beside "Branching:" and fill in 627de3bf16 2009-01-25 drh: the name of your new branch to the right and press the "Apply Changes" 627de3bf16 2009-01-25 drh: button. 627de3bf16 2009-01-25 drh: } 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: faq { 627de3bf16 2009-01-25 drh: How do I create a private branch that won't get pushed back to the 627de3bf16 2009-01-25 drh: main repository. 627de3bf16 2009-01-25 drh: } { 627de3bf16 2009-01-25 drh: You cannot. All branches in fossil are public in the sense that 627de3bf16 2009-01-25 drh: are all pushed and pulled together. There is no way to tell fossil 627de3bf16 2009-01-25 drh: to only push or pull a subset of branches. 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: Of course, as long as you never push, you can make as many private 627de3bf16 2009-01-25 drh: changes as you want. 627de3bf16 2009-01-25 drh: } 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: ############################################################################# 627de3bf16 2009-01-25 drh: # Code to actually generate the FAQ 627de3bf16 2009-01-25 drh: # 627de3bf16 2009-01-25 drh: puts "<h1 align=\"center\">Frequently Asked Questions</h1>\n" 627de3bf16 2009-01-25 drh: puts "<p>Note: See also <a href=\"qandc.wiki\">Questions and Criticisms</a>.\n" 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: puts {<ol>} 627de3bf16 2009-01-25 drh: for {set i 1} {$i<$cnt} {incr i} { 627de3bf16 2009-01-25 drh: puts "<li><a href=\"#q$i\">[lindex $faq($i) 0]</a></li>" 627de3bf16 2009-01-25 drh: } 627de3bf16 2009-01-25 drh: puts {</ol>} 627de3bf16 2009-01-25 drh: puts {<hr>} 627de3bf16 2009-01-25 drh: 627de3bf16 2009-01-25 drh: for {set i 1} {$i<$cnt} {incr i} { 627de3bf16 2009-01-25 drh: puts "<a name=\"q$i\"></a>" 627de3bf16 2009-01-25 drh: puts "<p><b>($i) [lindex $faq($i) 0]</b></p>\n" 627de3bf16 2009-01-25 drh: set body [lindex $faq($i) 1] 627de3bf16 2009-01-25 drh: regsub -all "\n *" [string trim $body] "\n" body 627de3bf16 2009-01-25 drh: puts "<blockquote>$body</blockquote></li>\n" 627de3bf16 2009-01-25 drh: } 627de3bf16 2009-01-25 drh: puts {</ol>}