improved autorename of addremove

Herbert Griebel herbertg at gmx.at
Tue Mar 31 10:39:54 CDT 2009


Steve Borho wrote:
> On Tue, Mar 31, 2009 at 8:54 AM, Herbert Griebel <herbertg at gmx.at> wrote:
>> Again, the matching algorithm can only give most likely matches
>> based on content and pathname of the file and cannot guess the
>> user's intention. For example a->b has 90% matching, and
>> c->d has also 90% matching. Then it is quite likely you want
>> a->b and c->d, but it could be also vice versa, a->d and c->b
>> for other reasons than name and content matching. That's also
>> the reason why I thing the ultimate solution is not a command
>> line tool but a nice GUI which lets you choose correct matches
>> easily with the help of a good similarity matching.
> 
> I agree, that's why TortoiseHg has had this since 0.7.  'hgtk guess'

Wow!, thanks for mentioning, didn't know that feature, it's very nice and
exactly what I was looking for.

Normally the algorithm I have now finds a lot of correct matches, but
some are wrong. So it should be possible to do an automatic matching
first, and correcting a few wrong files. This can only be done with
multiple lists and file selecting.

I am currently working on better heristics for the matching. Currently
the file content is matched first, and then, in a 2nd step, for files
with the same similarity to each other only, the filename is matched
(this is one of the trickiest parts of the algorithm, not only because
comparing is defered until this point).
For moves and content changes at the same time, this is not the optimal
solution, so there should be some tradeoff between name-similarity and
content-similarity (possibly adjustable by the user).


Herbert



More information about the Mercurial-devel mailing list