|
1
|
<title>Fossil Tips And Usage Hints</title> |
|
2
|
|
|
3
|
A collection of useful hints and tricks in no particular order: |
|
4
|
|
|
5
|
1. Click on two nodes of any timeline graph in succession |
|
6
|
to see a diff between the two versions. |
|
7
|
|
|
8
|
2. Add the "--tk" option to "[/help/diff | fossil diff]" commands |
|
9
|
to get a pop-up |
|
10
|
window containing a complete side-by-side diff. (NB: The pop-up |
|
11
|
window is run as a separate Tcl/Tk process, so you will need to |
|
12
|
have Tcl/Tk installed on your machine for this to work. Visit |
|
13
|
[http://www.activestate.com/activetcl] for a quick download of |
|
14
|
Tcl/Tk if you do not already have it on your system.) |
|
15
|
|
|
16
|
3. The "[/help/clean | fossil clean -x]" command is a great |
|
17
|
alternative to "make clean". You can use "[/help/clean | fossil clean -f]" |
|
18
|
as a slightly safer alternative if the "ignore-glob" setting is |
|
19
|
not set. WARNING: make sure you did a "fossil add" for all source-files |
|
20
|
you plan to commit, otherwise those files will be deleted without warning. |
|
21
|
|
|
22
|
4. Use "[/help/all | fossil all changes]" to look for any uncommitted |
|
23
|
edits in any of your Fossil projects. Use |
|
24
|
"[/help/all | fossil all pull]" on your laptop |
|
25
|
prior to going off network (for example, on a long plane ride) |
|
26
|
to make sure you have all the latest content locally. Then run |
|
27
|
"[/help/all|fossil all push]" when you get back online to upload |
|
28
|
your changes. |
|
29
|
|
|
30
|
5. To see an entire timeline, type "all" into the "Max:" entry box. |
|
31
|
|
|
32
|
6. You can manually add a "c=CHECKIN" query parameter to the timeline |
|
33
|
URL to get a snapshot of what was going on about the time of some |
|
34
|
check-in. The "CHECKIN" can be |
|
35
|
[./checkin_names.wiki | any valid check-in or version name], including |
|
36
|
tags, branch names, and dates. For example, to see what was going |
|
37
|
on in the Fossil repository on 2008-01-01, visit |
|
38
|
[/timeline?c=2008-01-01]. |
|
39
|
|
|
40
|
7. Further to the previous two hints, there are lots of query parameters |
|
41
|
that you can add to timeline pages. The available query parameters |
|
42
|
are tersely documented [/help/www/timeline | here]. |
|
43
|
|
|
44
|
8. You can run "[/help/xdiff | fossil xdiff --tk $file1 $file2]" |
|
45
|
to get a Tk pop-up window with side-by-side diffs of two files, even if |
|
46
|
neither of the two files is part of any Fossil repository. Note that |
|
47
|
this command is "xdiff", not "diff". Change <nobr>--tk</nobr> to |
|
48
|
<nobr>--by</nobr> to see the diff in your web browser. |
|
49
|
|
|
50
|
9. On web pages showing the content of a file (for example |
|
51
|
[/artifact/c7dd1de9f]) you can manually |
|
52
|
add a query parameter of the form "ln=FROM,TO" to the URL that |
|
53
|
will cause the range of lines indicated to be highlighted. This |
|
54
|
is useful in pointing out a few lines of code using a hyperlink |
|
55
|
in an email or text message. Example: |
|
56
|
[/artifact/c7dd1de9f?ln=28,30]. |
|
57
|
Adding the "ln" query parameter without any argument simply turns |
|
58
|
on line numbers. This feature only works right with files with |
|
59
|
a mimetype of text/plain, of course. |
|
60
|
|
|
61
|
10. When editing documentation to be checked in as managed files, you can |
|
62
|
preview what the documentation will look like by using the special |
|
63
|
"ckout" branch name in the "doc" URL while running "fossil ui". |
|
64
|
See the [./embeddeddoc.wiki | embedded documentation] for details. |
|
65
|
|
|
66
|
11. Use the "[/help/ui|fossil ui /]" command to bring up a menu of |
|
67
|
all of your local Fossil repositories in your web browser. |
|
68
|
|
|
69
|
12. If you have a bunch of Fossil repositories living on a remote machine |
|
70
|
that you are able to access using ssh using a command like |
|
71
|
"ssh login@remote", then you can bring up a user interface for all |
|
72
|
those remote repositories using the command: |
|
73
|
"[/help/ui|fossil ui login@remote:/]". This works by tunneling |
|
74
|
all HTTP traffic through SSH to the remote machine. |
|
75
|
|