Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

.. -*- restructuredtext -*-

fixrenames extension

Mercurial relies on an accurate record of renames in order to do
merges properly. If a file is moved without informing Mercurial about
it (with ``mv old new``, say), then Mercurial thinks that the old file
has disappeared and it wont know anything about the new file. The
status output will be::

  $ hg status
  ! old
  ? new

Simply adding the new file and removing the old with::

  $ hg remove --after old
  $ hg add new

is not good enough: Mercurial will then not know about the rename.
The ``hg addremove`` command can be used to detect such renames and
record a proper rename::

  $ hg addremove
  adding new
  removing old
  recording removal of old as rename to new (100% similar)

However, this must be done *before* the commit is made and one cannot
fix old mistakes that way. This extension can be used to replay old
history to record the missing rename information.


This work was done for the `OLAT project`_ at the `University of
Zurich`_ by `aragost Trifork`_. Feel free to contact `aragost
Trifork`_ to discuss any further improvements to the extension.


Martin Geisler <>

.. _OLAT project:
.. _University of Zurich:
.. _aragost Trifork:

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.