hgext/hgk.py
changeset 3173 eb0906ebba81
parent 3090 edefbb3a3b08
child 3468 0e68608bd11d
equal deleted inserted replaced
3172:76ab39df0917 3173:eb0906ebba81
   277     revtree(copy, repo, full, opts['max_count'], opts['parents'])
   277     revtree(copy, repo, full, opts['max_count'], opts['parents'])
   278 
   278 
   279 def view(ui, repo, *etc, **opts):
   279 def view(ui, repo, *etc, **opts):
   280     "start interactive history viewer"
   280     "start interactive history viewer"
   281     os.chdir(repo.root)
   281     os.chdir(repo.root)
   282     optstr = ' '.join(['--%s %s' % (k, v) for k, v in opts.iteritems()])
   282     optstr = ' '.join(['--%s %s' % (k, v) for k, v in opts.iteritems() if v])
   283     os.system(ui.config("hgk", "path", "hgk") + " %s %s" % (optstr, " ".join(etc)))
   283     cmd = ui.config("hgk", "path", "hgk") + " %s %s" % (optstr, " ".join(etc))
       
   284     ui.debug("running %s\n" % cmd)
       
   285     os.system(cmd)
   284 
   286 
   285 cmdtable = {
   287 cmdtable = {
   286     "view": (view,
   288     "view": (view,
   287              [('l', 'limit', '', 'limit number of changes displayed')],
   289              [('l', 'limit', '', 'limit number of changes displayed')],
   288              'hg view [-l LIMIT] [REVRANGE]'),
   290              'hg view [-l LIMIT] [REVRANGE]'),