Issue #379 duplicate

hg mv recorded as a remove/add ??

Sumit Chachra
created an issue

You guys don't seem to support the native mercurial mv or rename concept ? I don't see it in the html changeset diff and/or the raw diff ?

I really want to record moves as moves, not delete + add. Let me know.

Comments (3)

  1. Armin Ronacher

    hg is tracking a move as a delete and add. What bitbucket shows is exactly what mercurial sees as well. However mercurial is pretty clever figuring out what belonged to what before that "delete / recreate". So it will do the right thing even though it actually seems like the newly created file has nothing to do with the old one.

  2. Jesper Nøhr

    It *is* possible to potentially track renames given certain conditions, like this:

    • If any given file, A, has either source or destination /dev/null, then store the checksum together with the filename,
    • If the list of stored checksums' length exceeds or is equal to 2, find a match with the same checksum

    Given that file A with checksum XYZ123, destination /dev/null, and file B with source /dev/null and checksum XYZ123, one can conclude that A was moved to B.

    This completely falls apart if someone changes the content of a file after they 'hg move' it, and before they 'hg commit' it, though, but it's better than nothing.

  3. Log in to comment