1

I am using another developer's Ubuntu box and trying to tell if Mercurial is installed and working.

As @stew pointed out, I did the 'dpkg -l mercurial' command and got this:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version               Description
+++-=====================-=====================-==========================================================
ii  mercurial             1.8-0ppa1~lucid1      scalable distributed version control system
agenadinik@slabrams-desktop:/usr/bin$ dpkg -l Mercurial

While it says the installation is recognized, it also gives some cryptic warning-like messages above. It looks like it might be a bad installation. Could anyone help me decipher those messages?

Thanks! :)

2

you could see if the mercurial package were installed by checking if dpkg -l mercurial spits out a line with 'i' in the second column. you could also try running hg help and see if you get a list of mercurial commands.

|improve this answer|||||
  • Thanks - I have some funky output to that command which I pasted as an answer because it allowed me to format the funky output to be more readable. Are you able to interpret those messages? – Genadinik Mar 24 '11 at 19:45
1

which hg returns 0 if the hg binary is found. In addition, if you don't need to do this in an automated script, it will print whether or not the binary was found into stdout.

Edit: Obviously this doesn't tell whether or not the package is properly installed, for which you should use the dpkg command – which you did.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.