Note:
This page is primarily intended for developers of Mercurial.
Technical Debt
This page describes areas of Mercurial that most need refactoring and why.
1. 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.
2. 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)
3. Danger list
Several areas are in danger of becoming troublespots:
- subrepo support (not well-contained)
- bookmark support (not well-contained)
4. Tools for refactoring
The most successful refactorings introduce natural high-level abstractions that simplify complex code. For instance:
- contexts
- revsets