Issue #2439 open

Potential renamed/moved files should be detected on commit

Jason Meisel
created an issue

One of the most common misuses of Hg I see (on many different projects with many different people) is the accidental "delete/add" of a file that was clearly moved or renamed on the filesystem. It would be very useful if, upon attempting to commit, a warning popped up stating that some files should likely be marked as renamed, with the option to ignore or go to the rename files window. This warning is not insimilar to the "pushing new branch" warning that appears on commit.

It should be configurable in the settings window, allowing users to disable the feature or modify what percentage "similar" files must be to trigger it.

Comments (5)

  1. Steve Borho

    it could be implemented somewhat efficiently if it used logic like:

    if wctx.added() and wctx.removed() and repo.ui.configbool('tortoisehg.checkrename'):
          for a in wctx.added():
              # check wctx[a].copied()
          if notcopied:
              # warn user of potentially missed renames
    
  2. Log in to comment