hgext/hgk.py
changeset 9261 1a9a650004b6
parent 9209 62114b1cea85
child 9467 4c041f1ee1b4
equal deleted inserted replaced
9260:b2f37dbc5952 9261:1a9a650004b6
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2, incorporated herein by reference.
     6 # GNU General Public License version 2, incorporated herein by reference.
     7 
     7 
     8 '''browse the repository in a graphical way
     8 '''browse the repository in a graphical way
     9 
     9 
    10 The hgk extension allows browsing the history of a repository in a graphical
    10 The hgk extension allows browsing the history of a repository in a
    11 way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is not distributed with
    11 graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is not
    12 Mercurial.)
    12 distributed with Mercurial.)
    13 
    13 
    14 hgk consists of two parts: a Tcl script that does the displaying and querying
    14 hgk consists of two parts: a Tcl script that does the displaying and
    15 of information, and an extension to Mercurial named hgk.py, which provides
    15 querying of information, and an extension to Mercurial named hgk.py,
    16 hooks for hgk to get information. hgk can be found in the contrib directory,
    16 which provides hooks for hgk to get information. hgk can be found in
    17 and the extension is shipped in the hgext repository, and needs to be enabled.
    17 the contrib directory, and the extension is shipped in the hgext
    18 
    18 repository, and needs to be enabled.
    19 The hg view command will launch the hgk Tcl script. For this command to work,
    19 
    20 hgk must be in your search path. Alternately, you can specify the path to hgk
    20 The hg view command will launch the hgk Tcl script. For this command
    21 in your .hgrc file::
    21 to work, hgk must be in your search path. Alternately, you can specify
       
    22 the path to hgk in your .hgrc file::
    22 
    23 
    23   [hgk]
    24   [hgk]
    24   path=/location/of/hgk
    25   path=/location/of/hgk
    25 
    26 
    26 hgk can make use of the extdiff extension to visualize revisions. Assuming you
    27 hgk can make use of the extdiff extension to visualize revisions.
    27 had already configured extdiff vdiff command, just add::
    28 Assuming you had already configured extdiff vdiff command, just add::
    28 
    29 
    29   [hgk]
    30   [hgk]
    30   vdiff=vdiff
    31   vdiff=vdiff
    31 
    32 
    32 Revisions context menu will now display additional entries to fire vdiff on
    33 Revisions context menu will now display additional entries to fire
    33 hovered and selected revisions.
    34 vdiff on hovered and selected revisions.
    34 '''
    35 '''
    35 
    36 
    36 import os
    37 import os
    37 from mercurial import commands, util, patch, revlog, cmdutil
    38 from mercurial import commands, util, patch, revlog, cmdutil
    38 from mercurial.node import nullid, nullrev, short
    39 from mercurial.node import nullid, nullrev, short