hgext/hgk.py
changeset 5760 0145f9afb0e7
parent 5395 e73a83af7926
child 5859 e0f86c1e3ae5
equal deleted inserted replaced
5759:027264e720aa 5760:0145f9afb0e7
    11 #
    11 #
    12 # hgk consists of two parts: a Tcl script that does the displaying and
    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,
    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
    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
    15 # the contrib directory, and hgk.py can be found in the hgext
    16 # directory.  
    16 # 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 #
   307     revtree(copy, repo, full, opts['max_count'], opts['parents'])
   307     revtree(copy, repo, full, opts['max_count'], opts['parents'])
   308 
   308 
   309 def config(ui, repo, **opts):
   309 def config(ui, repo, **opts):
   310     """print extension options"""
   310     """print extension options"""
   311     def writeopt(name, value):
   311     def writeopt(name, value):
   312         ui.write('k=%s\nv=%s\n' % (name, value)) 
   312         ui.write('k=%s\nv=%s\n' % (name, value))
   313 
   313 
   314     writeopt('vdiff', ui.config('hgk', 'vdiff', ''))
   314     writeopt('vdiff', ui.config('hgk', 'vdiff', ''))
   315     
   315 
   316 
   316 
   317 def view(ui, repo, *etc, **opts):
   317 def view(ui, repo, *etc, **opts):
   318     "start interactive history viewer"
   318     "start interactive history viewer"
   319     os.chdir(repo.root)
   319     os.chdir(repo.root)
   320     optstr = ' '.join(['--%s %s' % (k, v) for k, v in opts.iteritems() if v])
   320     optstr = ' '.join(['--%s %s' % (k, v) for k, v in opts.iteritems() if v])