Changes To Cookbook
Not logged in

Changes to "Cookbook" between 2011-01-28 03:58:13 and 2011-01-28 11:04:31

21
22
23
24
25
26
27

28
29
30
31
32
33
34
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35







+







  </li>
  <li><a href="#ticket-checkin-links">Link tickets to checkins</a></li>
  <li><a href="#th1-usage">Fossil and Th1</a></li>
  <li><a href="#versionCompressed">Versioning compressed files</a></li>
  <li><a href="#ColorPicker">Color selector in check-in properties</a></li>
  <li><a href="#SearchWiki">Searching wiki text</a></li>
  <li><a href="#HighlightDiff">Highlight diff's</a></li>
  <li><a href="#Mercurial">Importing from Mercurial</a></li>
</ul>

<h2><a name="CGI">Using <cite>Fossil</cite>'s Built-In CGI</a></h2>
<h3>Motivation</h3>
  *  You want to share a repository through your existing web infrastructure.
  *  You want to share more than one repository at the same time.

1056
1057
1058
1059
1060
1061
1062











































1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 background-color: #F5C2C1 !important;
}

================================

That's it: the script will automatically detect diffs and color them.
</verbatim>


<h2><a name="Mercurial">Importing from Mercurial</a></h2>

<h3>Problem</h3>

Fossil supports [/doc/trunk/www/inout.wiki|importing from Git], but not from Mercurial.

<h3>Solution</h3>

We'll use Git as an intermediary: first by converting Mercurial repository to Git, and then by converting Git repository
to Fossil. You'll need both Git and Mercurial installed for this to work.

Get <i>hg2git.py</i>, <i>hg-fast-export.py</i>, and <i>hg-fast-export.sh</i> from [http://repo.or.cz/w/fast-export.git/tree],
and put them into a single directory (we'll use ~/Downloads/).

Change directory to your Mercurial working copy (for the example we'll use "project"), and create a new Git repository
there:

<verbatim>
  cd project
  git init
</verbatim>

Run export:

<verbatim>
  sh ~/Downloads/hg-fast-export.sh
</verbatim>

Once it finishes, check if it correctly imported everything by running "git log". 

If you got "ImportError: No module named mercurial" make sure your PYTHONPATH variable is set to point to the location
where mercurial modules are installed (on Mac OS X when Mercurial was installed via "easy_install mercurial", enter the
following into bash: "export PYTHONPATH=/Library/Python/2.6/site-packages").

Now we can import Git repository into Fossil (we'll put it into
parent directory under the "our-repository.fossil" name):

<verbatim>
  git fast-export --all | fossil import --git ../our-repository.fossil
</verbatim>