Mercurial > hg
comparison hgext/hgk.py @ 6666:53465a7464e2
convert comments to docstrings in a bunch of extensions
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Thu, 12 Jun 2008 11:33:47 +0200 |
parents | e9dfe4e3ee6f |
children | f6c00b17387c |
comparison
equal
deleted
inserted
replaced
6665:73f49bef13ad | 6666:53465a7464e2 |
---|---|
2 # | 2 # |
3 # Copyright 2005, 2006 Chris Mason <mason@suse.com> | 3 # Copyright 2005, 2006 Chris Mason <mason@suse.com> |
4 # | 4 # |
5 # This software may be used and distributed according to the terms | 5 # This software may be used and distributed according to the terms |
6 # of the GNU General Public License, incorporated herein by reference. | 6 # of the GNU General Public License, incorporated herein by reference. |
7 # | 7 '''browsing the repository in a graphical way |
8 # The hgk extension allows browsing the history of a repository in a | 8 |
9 # graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is | 9 The hgk extension allows browsing the history of a repository in a |
10 # not distributed with Mercurial.) | 10 graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is |
11 # | 11 not distributed with Mercurial.) |
12 # hgk consists of two parts: a Tcl script that does the displaying and | 12 |
13 # querying of information, and an extension to mercurial named hgk.py, | 13 hgk consists of two parts: a Tcl script that does the displaying and |
14 # which provides hooks for hgk to get information. hgk can be found in | 14 querying of information, and an extension to mercurial named hgk.py, |
15 # the contrib directory, and hgk.py can be found in the hgext | 15 which provides hooks for hgk to get information. hgk can be found in |
16 # directory. | 16 the contrib directory, and hgk.py can be found in the hgext directory. |
17 # | 17 |
18 # To load the hgext.py extension, add it to your .hgrc file (you have | 18 To load the hgext.py extension, add it to your .hgrc file (you have |
19 # to use your global $HOME/.hgrc file, not one in a repository). You | 19 to use your global $HOME/.hgrc file, not one in a repository). You |
20 # can specify an absolute path: | 20 can specify an absolute path: |
21 # | 21 |
22 # [extensions] | 22 [extensions] |
23 # hgk=/usr/local/lib/hgk.py | 23 hgk=/usr/local/lib/hgk.py |
24 # | 24 |
25 # Mercurial can also scan the default python library path for a file | 25 Mercurial can also scan the default python library path for a file |
26 # named 'hgk.py' if you set hgk empty: | 26 named 'hgk.py' if you set hgk empty: |
27 # | 27 |
28 # [extensions] | 28 [extensions] |
29 # hgk= | 29 hgk= |
30 # | 30 |
31 # The hg view command will launch the hgk Tcl script. For this command | 31 The hg view command will launch the hgk Tcl script. For this command |
32 # to work, hgk must be in your search path. Alternately, you can | 32 to work, hgk must be in your search path. Alternately, you can |
33 # specify the path to hgk in your .hgrc file: | 33 specify the path to hgk in your .hgrc file: |
34 # | 34 |
35 # [hgk] | 35 [hgk] |
36 # path=/location/of/hgk | 36 path=/location/of/hgk |
37 # | 37 |
38 # hgk can make use of the extdiff extension to visualize | 38 hgk can make use of the extdiff extension to visualize revisions. |
39 # revisions. Assuming you had already configured extdiff vdiff | 39 Assuming you had already configured extdiff vdiff command, just add: |
40 # command, just add: | 40 |
41 # | 41 [hgk] |
42 # [hgk] | 42 vdiff=vdiff |
43 # vdiff=vdiff | 43 |
44 # | 44 Revisions context menu will now display additional entries to fire |
45 # Revisions context menu will now display additional entries to fire | 45 vdiff on hovered and selected revisions.''' |
46 # vdiff on hovered and selected revisions. | |
47 | 46 |
48 import os | 47 import os |
49 from mercurial import commands, util, patch, revlog, cmdutil | 48 from mercurial import commands, util, patch, revlog, cmdutil |
50 from mercurial.node import nullid, nullrev, short | 49 from mercurial.node import nullid, nullrev, short |
51 | 50 |