3

I plan to get hgk to work.However, no matter how I configure the redhat linux, it still does not have any response. Here is information for my machine.

  1. RedHat 5.3
  2. Mercurial 1.8.1-1
  3. I installed mercurial-hgk_1.8.1-1.elf5.x86_64.rpm by rpm and it generated a directory /usr/bin/hgk

When I typed hg help, it didn't show the view..etc the additional extensions commands. Here are things I have tried.

  1. Manually created a .hgrc file at home directory and put the configuration as

    [extensions]
    hgk = /usr/lib64/python2.4/site-packages/hgext/hgk.py
    
  2. Add all these configurations at hgrc files of my local repository such at

    /home/Cassie/CassieRepo/Repo1/.hg  
    

Nothing happened — When I typed hg help or hg view, the mercurial still does not recognize the additional view command.

I typed hgk. Here are the outputs.

Error in startup script: can't read "env(HG)": no such variable
    while executing
"exec $env(HG) debug-config"
    (procedure "getconfig" line 4)
    invoked from within
"getconfig"
    invoked from within
"array set config [getconfig]"
    (file "/usr/bin/hgk" line 4054)

I typed rpm -ql mercurial | grep bin and here are the outputs.

/usr/bin/hg

I typed python -c 'import sys; print sys.path and here are the outputs.

['', '/usr/lib64/python24.zip', '/usr/lib64/python2.4', '/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk', '/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages', '/usr/lib64/python2.4/site-packages/Numeric', '/usr/lib64/python2.4/site-packages/gtk-2.0', '/usr/lib/python2.4/site-packages']
Anthon
  • 78,313
  • 42
  • 165
  • 222
Cassie
  • 221
  • 1
  • 3
  • 6
  • Please add output of `type hg`. `rpm -ql mercurial | grep bin`. `type python`. `python -c 'import sys; print sys.path'`. `type hgk`. And (2) is wrong: `[hgk]path` should name the `hgk` TCL script, not the Python module. What happens if you just try running `hgk`? – Mikel May 11 '12 at 22:05
  • "it generated a directory /usr/bin/hgk"? `/usr/bin/hgk` should be a file I think. – Mikel May 11 '12 at 22:06
  • Use tortoisehg. hgk is depreciated. If you are using RHEL 5.3, please say so. Redhat 5.3 would refer to Red Hat's original distribution, which is dead for many years now. – Faheem Mitha May 12 '12 at 18:14
  • @Mikel, would you please see the added part of my questions? For Faheem, I did try to install the tortoiseHg. However, I encountered problem as [here](http://superuser.com/questions/420722/tortoisehg-installation-error-on-redhat-5-3). If you have any surggestion, please let me know. Thanks. – Cassie May 18 '12 at 18:02
  • In addition, my Redhat 5.3 is not personal use linux.Hope it helps. – Cassie May 18 '12 at 18:11

1 Answers1

2

I just ran into this same issue. Adding the following lines to ~/.hgrc resolved the issue for me:

[extensions]
hgext.hgk = 

Then hgk was available using the hg view command.

Dan Morgan
  • 21
  • 3