Hello everybody,

I wish to write a patch that would perform a lookup on missing targets when
SVN_ERR_ILLEGAL_TARGET occurs and would display a suggested correction to
the path alongside the error message.

Suggested implementation: the algorithm will identify which part of the
path is valid (starting from root), substitute the invalid element with
other directories found in the path (not recursive) and test if that makes
the path a valid target. I don't see a simple method for suggesting
corrections to mistyped files without a full-fledged autocorrection engine,
therefore only the directories can be substituted.

The implementation I proposed above is hopefully simple enough to not
warrant a drawn out debate on what kinds of mistakes in the path and in
what way should be handled before receiving a go-ahead.

Feel free to respond with any objections or suggestions.

Maybe I'm spoiled by modern C compilers literally writing code for me when
I make a typo but this missing feature really irks me for some reason. I'm
glad to contribute a proper autocorrection system server-side instead of my
simple algorithm if my imagined opposition to the idea turns out to be, in
fact, imaginary. I reckon the problem of rating strings by similarity is a
solved problem in computing and there is a properly-licensed library to
plug into the codebase or an open-source algorithm at the least.

Reply via email to