[PATCH] add `hg guessrenames` extension

Matt Mackall mpm at selenic.com
Thu Jun 12 11:56:53 CDT 2008


On Thu, 2008-06-12 at 15:13 +0200, Peter Arrenbrecht wrote:
> The background for this extension is that I very often either forget
> to specify -s to `hg addrem` entirely, or only discover too late that
> the similarity level wasn't quite right. (Yes, I know about -n, but I
> usually forget it too.)
> 
> Then I try to revert and that is a mess. And recently I lost work
> because of such a revert --no-backup (yes, silly). So this extension
> changes the workflow such that guessing renames is a separate, easily
> repeatable operation.

This is pretty much a losing proposition.

Any time you have to explicitly mark data in an uncommon fashion for
later use, you will invariably do it wrong more often than you do it
right. That applies for file encodings, line endings, binary, and things
like renames too. If I can forget to record a rename, I will, and I
won't notice until I actually try to merge, by which time it's way too
late to fix things up.

So instead of putting more smarts into the check-in side of things, we
should instead put more smarts into the merge side and teach it how to
guess renames. It's better to guess on the merge side anyway, because we
don't end up recording mere guesses as official history unless we're
happy with the merge.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list