Source Code

The Adblock Plus project consists of multiple repositories. The modules page has a good overview of the most important ones.

Getting the source code from the Mercurial repositories

The Adblock Plus source code is hosted on our Mercurial server. You can see a list of all repositories through the web interface.

Here's how you clone the Adblock Plus for Firefox repository:

hg clone -u master https://hg.adblockplus.org/adblockplus/

Here's how you get the source code for a specific version (e.g. Adblock Plus 2.3.1):

hg update -r 2.3.1

Mercurial bookmarks

We are using Mercurial bookmarks for branching. All of our repositories (except for adblockbrowser, see below) have a master bookmark that points to the latest development version. When cloning a repository, you have to activate that bookmark. If you ran hg clone -u master as shown above, this has already happened. If you cloned without the -u option, you will need to run hg update master once.

Mercurial documentation

The adblockbrowser repository

The adblockbrowser repository is a bit different, because it is a fork of Mozilla's mozilla-release repository. All of our changes are not in the default branch, but in the adblockbrowser branch, we prefix all of our tag names with abb- to avoid conflicts with upstream, and we do not use Mercurial bookmarks there at this point. Here's how you would clone it:

hg clone -u adblockbrowser https://hg.adblockplus.org/adblockbrowser/

Getting the source code from the GitHub mirrors

If you prefer to use Git, you can - we have GitHub mirrors for most of our public repositories.

Please note: We are maintaining the GitHub mirrors to make it easier for new contributors to contribute to the Adblock Plus project without having to learn new tools. For regular contributors, using Mercurial is recommended.

Here's how you clone the Adblock Plus for Firefox repository from GitHub:

git clone https://github.com/adblockplus/adblockplus/

Here's how you get the source code for a specific version (e.g. Adblock Plus 2.3.1):

git checkout 2.3.1

Build instructions

Most of our repositories have README.md files with build instructions, please refer to those.