Re: More aggressive tracking of renaming/copying? – inode numbers?

František Kučera konference at frantovo.cz
Sun Nov 24 10:49:17 UTC 2019


BTW: Has anyone considered move detection based on inode numbers? Same inode could be a good hint that it is the same file, even if the content is very different – it is improbable that anyone will reuse the same file (same inode) for completely different file for which the former history does not make sense.

If I rename a file and change indentation of many lines, the automv extension will not detect the move. However hg diff -w is happy with such indentation and will show only relevant changes. So I say it explicitly through hg mv or hg mv --after and Mercurial will track the history. I am quite OK with current state, but many people might loose their history because they are not so careful and realize the missing history when it is too late (several commits later).

Use case is for example: move the body of a static function to a method of a new class, which changes the indentation and at the same time is also often linked to a file rename.

This would require tracking of inode numbers in a temporary file under .hg. Does it make sense? Or is it better to just do during the detection the same as diff -w does?

Franta





More information about the Mercurial mailing list