This page is primarily intended for Mercurial's developers.
#pragma section-numbers 2
This page describes areas of Mercurial that most need refactoring and why.
What is technical debt?
Technical debt is the cost incurred by writing hard-to-maintain code. It is effectively developer time that is owed to the future.
Most wanted list
Several areas have accumulated substantial debt to the point that they are now very challenging to extend or bugfix:
- The log command (consider replacing core logic with revsets)
- changegroupsubset (very poorly understood, consider refactoring with contexts)
- copy/rename handling
- MQ (doesn't handle exceptions well)
Several areas are in danger of becoming troublespots:
- subrepo support (not well-contained)
- bookmark support (not well-contained)
Tools for refactoring
The most successful refactorings introduce natural high-level abstractions that simplify complex code. For instance: