How To Install hgsvn on Ubuntu 18.04

In this tutorial we learn how to install hgsvn on Ubuntu 18.04. hgsvn is Scripts to work locally on Subversion checkouts using Mercurial

Introduction

In this tutorial we learn how to install hgsvn on Ubuntu 18.04.

What is hgsvn

hgsvn is:

This set of scripts allows to work locally on Subversion-managed projects using the Mercurial distributed version control system.

Why use Mercurial ? You can do local (disconnected) work, pull the latest changes from the SVN server, manage private branches, submit patches to project maintainers, etc. And of course you have fast local operations like “hg log”, “hg annotate”…

Currenly three scripts are provided: hgimportsvn, hgpullsvn, and hgpushsvn.

hgimportsvn initializes an SVN checkout which is also a Mercurial repository.

hgpullsvn pulls the latest changes from the SVN repository, and updates the Mercurial repository accordingly. It can be run multiple times.

hgpushsvn pushes your local Mercurial commits back to the SVN repository.

There are three methods to install hgsvn on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install hgsvn Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install hgsvn using apt-get by running the following command:

sudo apt-get -y install hgsvn

Install hgsvn Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install hgsvn using apt by running the following command:

sudo apt -y install hgsvn

Install hgsvn Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install hgsvn using aptitude by running the following command:

sudo aptitude -y install hgsvn

How To Uninstall hgsvn on Ubuntu 18.04

To uninstall only the hgsvn package we can use the following command:

sudo apt-get remove hgsvn

Uninstall hgsvn And Its Dependencies

To uninstall hgsvn and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove hgsvn

Remove hgsvn Configurations and Data

To remove hgsvn configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge hgsvn

Remove hgsvn configuration, data, and all of its dependencies

We can use the following command to remove hgsvn configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge hgsvn

References

Summary

In this tutorial we learn how to install hgsvn package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.