hgext/hgk.py
changeset 5395 e73a83af7926
parent 5393 c2ad1890fc53
child 5760 0145f9afb0e7
equal deleted inserted replaced
5394:0ad0e97345eb 5395:e73a83af7926
     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 #
       
     8 # The hgk extension allows browsing the history of a repository in a
       
     9 # graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is
       
    10 # not distributed with Mercurial.)
       
    11 #
       
    12 # hgk consists of two parts: a Tcl script that does the displaying and
       
    13 # querying of information, and an extension to mercurial named hgk.py,
       
    14 # which provides hooks for hgk to get information. hgk can be found in
       
    15 # the contrib directory, and hgk.py can be found in the hgext
       
    16 # directory.  
       
    17 #
       
    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
       
    20 # can specify an absolute path:
       
    21 #
       
    22 #   [extensions]
       
    23 #   hgk=/usr/local/lib/hgk.py
       
    24 #
       
    25 # Mercurial can also scan the default python library path for a file
       
    26 # named 'hgk.py' if you set hgk empty:
       
    27 #
       
    28 #   [extensions]
       
    29 #   hgk=
       
    30 #
       
    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
       
    33 # specify the path to hgk in your .hgrc file:
       
    34 #
       
    35 #   [hgk]
       
    36 #   path=/location/of/hgk
       
    37 #
       
    38 # hgk can make use of the extdiff extension to visualize
       
    39 # revisions. Assuming you had already configured extdiff vdiff
       
    40 # command, just add:
       
    41 #
       
    42 #   [hgk]
       
    43 #   vdiff=vdiff
       
    44 #
       
    45 # Revisions context menu will now display additional entries to fire
       
    46 # vdiff on hovered and selected revisions.
     7 
    47 
     8 import sys, os
    48 import sys, os
     9 from mercurial import hg, fancyopts, commands, ui, util, patch, revlog
    49 from mercurial import hg, fancyopts, commands, ui, util, patch, revlog
    10 
    50 
    11 def difftree(ui, repo, node1=None, node2=None, *files, **opts):
    51 def difftree(ui, repo, node1=None, node2=None, *files, **opts):