Modern Linux distributions include a package manager to resolve dependencies and provide a repository with software packages, thus avoid problems like you've just encountered.
On openSUSE you generally have a choice of methods to install a .rpm package. Either on the command-line with
yast, (if available
yum) or over the graphical frontend YaST.
Note, that you have to append
sudo to the following commands, or issue them as root.
zypper install python mercurial
yum install python mercurial
yast provides an interactive console based GUI on which you can search and install software packages.
If you have a graphical frontend, you can also find YaST as a GUI in the menu.
All those package managers include the capability of searching for packages, so the next time you need one, use
yast or the command
As an example:
zypper search perl
will search and display all available
If you just want to install one (or more) locally available .rpm packages, you can simply use the given tool
rpm -i mercurial-1.5-3.1.x86_64.rpm
As you already saw, this will only work if all the dependencies are already installed.
See here for more information about package management on openSUSE.